jar file doesn't run on Fedora 27
mlangsdorf opened this issue · comments
I downloaded tokentool-2.0 on 25 Oct 2018 and attempted to run it on x86_64 Fedora 27:
$ java -jar tokentool-2.0.jar
Error: Could not find or load main class net.rptools.tokentool.client.TokenTool
I also tried using alien to convert the .deb package, but that quickly degenerated into dependency hell.
I am probably doing something wrong here, but there's no documentation that I can find.
Are you using Oracle JRE 10?
I tried with the default JRE and then OracleJRE-8u192. I can try installing Oracle JRE 11.
I can't find an Oracle JRE 10 to install, so I installed JDK-11 from https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html.
Now I'm up to:
$ java -jar tokentool-2.0.jar
Error: Could not find or load main class net.rptools.tokentool.client.TokenTool
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
It looks like something is wrong with the MANIFEST.MF file inside the JAR. Try running jar -tvf tokentool-2.0.jar
and make sure there's a net/RPTools/token tool/client/TokenTool.class
file within the JAR.
You can't use 11, it doesn't come with FX..... So ya, Application class would be missing...
You may be able to add appropriate openjfx sdk to your path...
Open JDK "may" work but not sure.
I will be building a 2.2 probably soon against JDK 11.
Very late answer for anyone looking into this. Indeed you need FX to run this, which does not seem to be provided by either AdoptOpenJDK, Corretto or Java.Net. For some of you, Oracle Java may not be an option and may still be looking for something better. You can look into Azul's Zulu which distributes a spin with FX included. It worked for me. (I'm a Fedora 29-30-31 user.)
If installing and managing Java versions is painful to you (it is to me >.<), you should look into sdkman, a Java version manager of the likes of rbenv and pyenv.