col-e / recaf-launcher Goto Github PK
View Code? Open in Web Editor NEWA simple launcher for Recaf 4.X and above
Home Page: https://recaf.coley.software/
A simple launcher for Recaf 4.X and above
Home Page: https://recaf.coley.software/
dependencies
folder in appdata\recaf isnt created automatically :(((
Failed downloading FX artifact: ' https://repo1.maven.org/maven2/org/openjfx/javafx-media/22-ea+16/javafx-media-22-ea+16-win.jar'
java.nio.file.NoSuchFileException: C:\Users\yeah\AppData\Roaming\Recaf\dependencies\javafx-media-22-ea+16-win.jar
at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at java.base/sun.nio.fs.WindowsFileSystemProvider.newByteChannel(Unknown Source)
at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(Unknown Source)
at java.base/java.nio.file.Files.newOutputStream(Unknown Source)
at java.base/java.nio.file.Files.copy(Unknown Source)
at software.coley.recaf.launch.commands.UpdateJavaFX.updateTo(UpdateJavaFX.java:200)
at software.coley.recaf.launch.commands.UpdateJavaFX.update(UpdateJavaFX.java:159)
at software.coley.recaf.launch.commands.UpdateJavaFX.call(UpdateJavaFX.java:44)
at software.coley.recaf.launch.commands.UpdateJavaFX.call(UpdateJavaFX.java:24)
at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at software.coley.recaf.launch.Launcher.main(Launcher.java:51)
```
Here's the stdout generated when using Azul Zulu 21: stdout_zulu21.txt
Same thing with Eclipse Adoptium 17: stdout_adoptium17.txt
The exception java.lang.UnsatisfiedLinkError: 'java.lang.String com.sun.javafx.font.PrismFontFactory.regReadFontLink(java.lang.String)'
is probably generated by some JavaFX incompatibility. I'm unsure if either of these runtimes have JavaFX bundled, but a quick find
for jfx/javafx in the install directory yields nothing. Thanks in advance.
For example, when I open the launcher.jar it doesn't open, I don't see MessageBox with error, to understand what happened, I have to open recaf-launcher.log to find the line with an error.
In that case log is:
Attempting to resolve installed Recaf version...
Recaf jar file not found: 'C:\Users\u\AppData\Roaming\Recaf\recaf.jar'
It would be nice to see a MessageBox with error:
Recaf jar file not found:
``C:\Users\u\AppData\Roaming\Recaf\recaf.jar''.
I think it won't be a problem to make MessageBox display via jfx
To be able to double click jars and to swifty open projects. It is common to make the argument of the runnable being a path to the destination to open.
As such, please add an argument to the 4.x launcher to open Recaf with he desired workspace (jar, directory, ...).
This would allow the user via the GUI or CLI to choose what happens when they provide no arguments to the launcher. The main options would be run
and update-and-run
. This would allow the launcher to seamlessly open Recaf without any intermediate steps or required user input.
First time installing the launcher. When running java -jar recaf-launcher-0.1.3.jar update-jfx
, it attempts to download dependencies into AppData\Roaming\Recaf\dependencies
. In my case, the dependencies
directory did not exist and the launcher did not make an attempt to create the directory automatically. This caused the dependency download to fail.
runed java -jar update-jfx
and the following error appeared
java.nio.file.NoSuchFileException: C:\Users\neilhuang007\AppData\Roaming\Recaf\dependencies at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) at java.base/sun.nio.fs.WindowsDirectoryStream.<init>(WindowsDirectoryStream.java:86) at java.base/sun.nio.fs.WindowsFileSystemProvider.newDirectoryStream(WindowsFileSystemProvider.java:541) at java.base/java.nio.file.Files.newDirectoryStream(Files.java:481) at java.base/java.nio.file.Files.list(Files.java:3767) at software.coley.recaf.launch.info.JavaFxVersion.getLocalVersion(JavaFxVersion.java:66) at software.coley.recaf.launch.commands.UpdateJavaFX.update(UpdateJavaFX.java:153) at software.coley.recaf.launch.commands.UpdateJavaFX.call(UpdateJavaFX.java:44) at software.coley.recaf.launch.commands.UpdateJavaFX.call(UpdateJavaFX.java:24) at picocli.CommandLine.executeUserObject(CommandLine.java:2041) at picocli.CommandLine.access$1500(CommandLine.java:148) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) at picocli.CommandLine.execute(CommandLine.java:2170) at software.coley.recaf.launch.Launcher.main(Launcher.java:51)
In your readme, you're saying:
This is, in fact, not true. When I try to run Recaf using java -jar launcher.jar run, I get the error:
No local cached version of JavaFX found.
- Try running with 'update-jfx'
Based on the code from src/main/java/software/coley/recaf/launch/commands/Run.java
, it indeed checks only for the locally cached version of JavaFX and ignores any bundled version (line 61: JavaFxVersion javaFxVersion = JavaFxVersion.getLocalVersion();
).
I don't want to force downloading JavaFX separately. The whole reason for using JDK with bundled JFX is to not occupy additional disk space for a copy of JavaFX for every Java app that might use it.
My proposal for a fix is:
if (javaFxVersion != null)
and don't do classpathItems.addAll(javafxDependencies);
if it's not true.This will assume JavaFX is bundled with JDK and try to run Recaf with it. Of course, bundled JavaFX could probably be checked in some way (like how the Java runtime itself does when running a JAR with javafx Application subclass as the main class).
https://bugs.openjdk.org/browse/JDK-8325993
JavaFX 23 updates the compile target from 17 to 21. Recaf 4x currently is on 17 as a baseline. Before fetching newer versions than 22 the launcher should check if the current JVM is on version 21 or higher.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.