Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recaf crash - JFX validation failed, could not find 'VersionInfo' class #878

Open
defaultuser1 opened this issue Nov 15, 2024 · 7 comments

Comments

@defaultuser1
Copy link

Can't seem to get this to run.
Steps:

  1. Run recaf-gui-0.6.0.jar
  2. Update recaf/javafx
  3. Tried with OpenJDK22U-jdk_x64_windows_hotspot_22.0.2_9 and openjdk-23.0.1_windows-x64_bin

Diagnostics:


20:06:38.978 [AccessPatcher/main] DEBUG: Opening access to all packages
20:06:38.989 [AccessPatcher/main] DEBUG: Patching package reflection restrictions
20:06:39.053 [JFXValidation/main] ERROR: JFX validation failed, could not find 'VersionInfo' class
java.lang.ClassNotFoundException: com.sun.javafx.runtime.VersionInfo
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:413)
	at java.base/java.lang.Class.forName(Class.java:404)
	at software.coley.recaf.util.JFXValidation.validateJFX(JFXValidation.java:26)
	at software.coley.recaf.Main.main(Main.java:77)
Exit code: 101
Java
 - Version (Runtime): 22.0.2+9
 - Version (Raw):     22
 - Vendor:            Eclipse Adoptium
 - Home:              E:\Applications\OpenJDK22U-jdk_x64_windows_hotspot_22.0.2_9\jdk-22.0.2+9
JavaFX
 - Version (Runtime): <uninitialized>
 - Version (Raw):     <uninitialized>
Operating System
 - Name:           Windows 10
 - Version:        10.0
 - Architecture:   amd64
 - Processors:     24
 - Path Separator: ;
Recaf
 - Version:    4.0.0-SNAPSHOT
 - Build hash: 7c5746f05d140072a326cce78723242509d3e763
 - Build date: 2024 11/14 09:06
Launch
 - Args: software.coley.recaf.Main
Classpath:
 - File: recaf.jar
   - SHA1: 3d83959f39548e0a5e53367d09199f163ddd3f53
Threads
 - Signal Dispatcher [RUNNABLE]
 - Notification Thread [RUNNABLE]
 - Common-Cleaner [TIMED_WAITING]
   - [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
   - [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:269)
   - [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1847)
   - [email protected]/java.lang.ref.ReferenceQueue.await(ReferenceQueue.java:71)
   - [email protected]/java.lang.ref.ReferenceQueue.remove0(ReferenceQueue.java:143)
   - [email protected]/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:218)
   - [email protected]/jdk.internal.ref.CleanerImpl.run(CleanerImpl.java:140)
   - [email protected]/java.lang.Thread.runWith(Thread.java:1583)
   - [email protected]/java.lang.Thread.run(Thread.java:1570)
   - [email protected]/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:186)
 - Reference Handler [RUNNABLE]
   - [email protected]/java.lang.ref.Reference.waitForReferencePendingList(Native Method)
   - [email protected]/java.lang.ref.Reference.processPendingReferences(Reference.java:246)
   - [email protected]/java.lang.ref.Reference$ReferenceHandler.run(Reference.java:208)
 - Finalizer [WAITING]
   - [email protected]/java.lang.Object.wait0(Native Method)
   - [email protected]/java.lang.Object.wait(Object.java:375)
   - [email protected]/java.lang.Object.wait(Object.java:348)
   - [email protected]/java.lang.ref.NativeReferenceQueue.await(NativeReferenceQueue.java:48)
   - [email protected]/java.lang.ref.ReferenceQueue.remove0(ReferenceQueue.java:158)
   - [email protected]/java.lang.ref.NativeReferenceQueue.remove(NativeReferenceQueue.java:89)
   - [email protected]/java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:173)
 - Attach Listener [RUNNABLE]
 - main [RUNNABLE]
   - [email protected]/java.lang.Thread.dumpThreads(Native Method)
   - [email protected]/java.lang.Thread.getAllStackTraces(Thread.java:2489)
   - app//software.coley.recaf.ExitDebugLoggingHook.handle(ExitDebugLoggingHook.java:191)
   - app//software.coley.recaf.ExitDebugLoggingHook.run(ExitDebugLoggingHook.java:67)
   - app//software.coley.recaf.ExitDebugLoggingHook$$Lambda/0x00000152140edcb8.run(Unknown Source)
   - [email protected]/java.lang.Shutdown.runHooks(Shutdown.java:130)
   - [email protected]/java.lang.Shutdown.exit(Shutdown.java:167)
   - [email protected]/java.lang.Runtime.exit(Runtime.java:188)
   - [email protected]/java.lang.System.exit(System.java:1925)
   - app//software.coley.recaf.ExitDebugLoggingHook.exit(ExitDebugLoggingHook.java:220)
   - app//software.coley.recaf.Main.main(Main.java:79)


@Col-E
Copy link
Owner

Col-E commented Nov 15, 2024

Exit code: 101
Classpath:
 - File: recaf.jar
   - SHA1: 3d83959f39548e0a5e53367d09199f163ddd3f53

Looks like JavaFX wasn't downloaded. The launcher adds the %RECAF%/dependencies dir as a -cp so if that directory is empty Recaf won't run.

Whats in your directory?

@defaultuser1
Copy link
Author

Ok so the problem was running the recaf-gui with java8 causes it to launch with the wrong args.
Java8: E:\Applications\OpenJDK22U-jdk_x64_windows_hotspot_22.0.2_9\jdk-22.0.2+9\bin\java.exe -cp recaf.jar software.coley.recaf.Main

Java 22:
E:\Applications\OpenJDK22U-jdk_x64_windows_hotspot_22.0.2_9\jdk-22.0.2+9\bin\java.exe -cp recaf.jar;dependencies\javafx-base-24-ea+15-win.jar;dependencies\javafx-controls-24-ea+15-win.jar;dependencies\javafx-graphics-24-ea+15-win.jar;dependencies\javafx-media-24-ea+15-win.jar software.coley.recaf.Main

@defaultuser1
Copy link
Author

Exit code: 101
Classpath:
 - File: recaf.jar
   - SHA1: 3d83959f39548e0a5e53367d09199f163ddd3f53

Looks like JavaFX wasn't downloaded. The launcher adds the %RECAF%/dependencies dir as a -cp so if that directory is empty Recaf won't run.

Whats in your directory?

Ah just saw this sorry. Thanks for your super fast reply! That directory is there with javafx-base-24-ea+15-win.jar, javafx-controls-24-ea+15-win.jar, javafx-graphics-24-ea+15-win.jar, javafx-media-24-ea+15-win.jar and was there before I tried running recaf-gui with Java22. Not sure if recaf-gui is supposed to work with Java8 or not, feel free to close this if not.

@Col-E
Copy link
Owner

Col-E commented Nov 15, 2024

Not sure if recaf-gui is supposed to work with Java8 or not, feel free to close this if not.

The launcher is designed so that you can run it with older versions of Java like version 8. Recaf requires 22+ and the launcher lets you point to that version when it starts Recaf.

That directory is there with ...

Hmmm, that's odd that its not picking up the files in there. I'll take a look at the launcher along with some other updates I'm making to it today/tomorrow.

@defaultuser1
Copy link
Author

Hmm so looks like maybe my Java8 install also has a JavaFX and it's picking that up, whereas the Java22 doesn't have it so it explicitly goes and adds it from the dependencies.
Java8

E:\Applications>java.exe -jar recaf-gui-0.6.0.jar
Looking in 'C:\Users\lachl\AppData\Roaming\Recaf' for Recaf/dependencies...
Attempting to resolve JFX version in current classpath...
JFX found in classpath, checking for version info...
Getting version info from classpath JFX 'VersionInfo' class...
Classpath's JavaFX version reported: '8.0.281'
Running Recaf '4.0.0-SNAPSHOT' with JavaFX '8:win'
22:45:30.742 [AccessPatcher/main] DEBUG: Opening access to all packages
22:45:30.754 [AccessPatcher/main] DEBUG: Patching package reflection restrictions
22:45:30.825 [JFXValidation/main] ERROR: JFX validation failed, could not find
'VersionInfo' class

Java22:

E:\Applications>E:\Applications\OpenJDK22U-jdk_x64_windows_hotspot_22.0.2_9\jdk-22.0.2+9\bin\java.exe -jar recaf-gui-0.6.0.jar
Looking in 'C:\Users\lachl\AppData\Roaming\Recaf' for Recaf/dependencies...
Attempting to resolve JFX version in current classpath...
No JavaFX version class found in the current classpath
Running Recaf '4.0.0-SNAPSHOT' with JavaFX '24-ea+15:win'
22:47:05.175 [AccessPatcher/main] DEBUG: Opening access to all packages
22:47:05.187 [AccessPatcher/main] DEBUG: Patching package reflection restrictions
22:47:05.278 [JFXValidation/main] INFO : JavaFX successfully initialized: 24-ea

@Col-E
Copy link
Owner

Col-E commented Nov 16, 2024

Good catch, I reworked the launch logic in the latest launcher version so that should solve the issue here

https://github.com/Col-E/Recaf-Launcher/releases/tag/0.7.0

@defaultuser1
Copy link
Author

Just tested it, looks good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants