I have generated .jar file in windows.
I have to execute that .jar file in unix .
I am running that command (java -jar myJar.jar
), but it's giving
java.lang.UnsupportedVersionError
I am using java version 1.5.0.12 in Unix.
When we see the main window of JD-GUI, we can either open our JAR file by navigating the menu “File -> Open File…” or just drag-and-drop the JAR file in the window. Once we open a JAR file, all the classes in the JAR file will be decompiled.
To run an application in a nonexecutable JAR file, we have to use -cp option instead of -jar. We'll use the -cp option (short for classpath) to specify the JAR file that contains the class file we want to execute: java -cp jar-file-name main-class-name [args …]
Same as under Windows.
java -jar file.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With