I can’t run the class or jar file it gives me the “Error cannot open file”.
I’m using the following commands:
javac src/*.java
jar cfe MyJar.jar src.Main src/*.class
java -jar MyJar.jar
Output:
javac src/*.java
jar cfe MyJar.jar src.Main src/*.class
java -jar MyJar.jar
Error cannot open file
C^%
I’m using linux/ubuntu and java:
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
Content of MANIFEST.MF:
Manifest-Version: 1.0
Created-By: 1.6.0_24 (Sun Microsystems Inc.)
Main-Class: src.Main
The error was actually output from the FileHandler class I made. I feel kinda ashamed now. I’m going to look into it why it didn’t print more than the caught exception. Thank you for taking your time and make me notice.