添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
B4X is a set of simple and powerful cross platform RAD tools:
  • B4A (free) - Android development
  • B4J (free) - Desktop and Server development
  • B4i - iOS development
  • B4R (free) - Arduino, ESP8266 and ESP32 development
  • All developers, with any skill level, are welcome to join the B4X community .

    B4J Question [SOLVED] Exception in thread "JavaFX Application Thread"

    I have a small project to show images.
    It's very simple and integrates a floating window for some specific functions.
    The program worked without problems until I had to format the PC and reinstall everything.
    I have no problems running the program directly from the IDE, but if I run the JAR file directly, the following error occurs:
    C:\desenv\Mostra form\Objects>java -jar mostraform.jar
    Exception in thread "JavaFX Application Thread" Exception in thread "main" java.lang.UnsupportedClassVersionError: b4j/example/main has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$2(LauncherImpl.java:352)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$null$4(WinApplication.java:185)
    at java.lang.Thread.run(Unknown Source)
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
    Caused by: java.lang.NullPointerException
    at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:383)
    at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
    ... 5 more Could anyone help?
    Complete project attached (it's very simple).
    The program needs the c:/desenv/telas folder with some .png files in it.

    Attachments

    From the look of it you have Java 8 installed and that is what is trying to run the jar when you type that command line. Java 11 by default does not execute from the command line when installed.
    From the look of it you have Java 8 installed and that is what is trying to run the jar when you type that command line. Java 11 by default does not execute from the command line when installed.
    From the look of it you have Java 8 installed and that is what is trying to run the jar when you type that command line. Java 11 by default does not execute from the command line when installed.
    This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies. Accept Learn more…