I'm trying to create a .jar file for a small Java program that I wrote, but I cannot get it to execute. I know that I need to create a manifest file, but I cannot find a tutorial anywhere that tells me how to do it clearly enough...
I created a folder called META-INF and inside have a file called MANIFEST.MF, which contains the lines:
Manifest-Version: 1.0
Created-By: 1.6.0 (Sun Microsystems Inc.)
Main-Class: gabe.ScanningApp
where gabe is the package name, and ScanningApp is the name of the class with the main method. I cd to where the files are, then use the terminal:
jar cfm gabe.jar META-INF/MANIFEST.MF *.class
i get the jar file, and when i use jar tf gabe.jar, I get a list of everything, but when I double click it, I get
java.lang.NoClassDefFoundError: ibbabble/src/gabe/ScanningApp
Should I have kept everything in that directory path instead of moving it to the desktop to package it in a .jar file? I'm very confused here...
|fishinatree|
I created a folder called META-INF and inside have a file called MANIFEST.MF, which contains the lines:
Manifest-Version: 1.0
Created-By: 1.6.0 (Sun Microsystems Inc.)
Main-Class: gabe.ScanningApp
where gabe is the package name, and ScanningApp is the name of the class with the main method. I cd to where the files are, then use the terminal:
jar cfm gabe.jar META-INF/MANIFEST.MF *.class
i get the jar file, and when i use jar tf gabe.jar, I get a list of everything, but when I double click it, I get
java.lang.NoClassDefFoundError: ibbabble/src/gabe/ScanningApp
Should I have kept everything in that directory path instead of moving it to the desktop to package it in a .jar file? I'm very confused here...
|fishinatree|