Col-E / Recaf

The modern Java bytecode editor
https://recaf.coley.software
MIT License
6.02k stars 465 forks source link

Does not run with Java 1.8.0_05 (MacOS 10.13) #74

Closed milo-trujillo closed 6 years ago

milo-trujillo commented 6 years ago

The latest Recaf release crashes on launch on MacOS:

$ java -jar recaf-1.5.1.jar 
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894)
    at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
    at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: javafx.scene.control.MenuBar.<init>([Ljavafx/scene/control/Menu;)V
    at me.coley.recaf.ui.FxWindow.start(FxWindow.java:66)
    at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
    at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
    at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

$ java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
Col-E commented 6 years ago
$ java -version
java version "1.8.0_05"

Can you update your java to the latest version of java 8?

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

I just downloaded it and when I disassembled javafx.scene.control.MenuBar the constructor that it says could not be found was right there:

  public javafx.scene.control.MenuBar(javafx.scene.control.Menu...);
    descriptor: ([Ljavafx/scene/control/Menu;)V
    flags: ACC_PUBLIC, ACC_VARARGS

For reference the version I'm using is listed in my java/lib/javafx.properties

javafx.runtime.version=8.0.131
javafx.runtime.build=b11

Try checking yours. It may be older.

Col-E commented 6 years ago

I had a friend with a macbook run recaf under the latest release of Java 8 and it loaded correctly. I'm going to close this with the solution being to update your java package.

milo-trujillo commented 6 years ago

Can confirm - updating Java solved the problem here, too. Thanks!