Hi,
I would like to use Oracle java, as not all java software can use open jdk.
The problem is how to run a jar file.
I downloaded the latest java version from the oracle site, and unpacked it.
Then I downloaded a jar file to try it, and made it executable, but it does not run.
When I try to run it with openjdk, it says it needs oracle java.
When I try to run it with oracle java, I get this
I copied the jar file into the same directory as the java runtime and made it executable
and then I try to run it from the terminal.
marc@marc-samsung:/data/Downloads/jre1.8.0_241/bin$ ./java Mario.jar
or
marc@marc-samsung:/data/Downloads/jre1.8.0_241/bin$ ./java /data/Downloads/jre1.8.0_241/bin/Mario.jar
Error: Could not find or load main class .data.Downloads.jre1.8.0_241.bin.Mario.jar
I am an absolute beginner with java, so I may be overlooking something basic.
I would like to use Oracle java, as not all java software can use open jdk.
The problem is how to run a jar file.
I downloaded the latest java version from the oracle site, and unpacked it.
Then I downloaded a jar file to try it, and made it executable, but it does not run.
When I try to run it with openjdk, it says it needs oracle java.
When I try to run it with oracle java, I get this
I copied the jar file into the same directory as the java runtime and made it executable
and then I try to run it from the terminal.
marc@marc-samsung:/data/Downloads/jre1.8.0_241/bin$ ./java Mario.jar
or
marc@marc-samsung:/data/Downloads/jre1.8.0_241/bin$ ./java /data/Downloads/jre1.8.0_241/bin/Mario.jar
Error: Could not find or load main class .data.Downloads.jre1.8.0_241.bin.Mario.jar
I am an absolute beginner with java, so I may be overlooking something basic.
Comment