Ok, I have this file I use for debugging purposes while I’m writing some code. However, I am looking to speed up the process by packing it in an executable .jar file. I have been creating a jar file via eclipse, and attempting to run it as is.
The contents of the jar (Derivitave Quiz.jar) are as follows:
DerivQuiz.javaDerivQuiz.classMeta-INF(empty folder)pass.txt
Also, would I have to re-write it to use a non-command line output, such as Jpane/JOptionPane, instead of System.out.print()?
My current code works fine in Eclipse, but not after porting to a jar.
I did have to change all my print statements to use
JOptionPane.showMessageDialog()instead ofSystem.out.print().Upon further inspection, the jar was being created without a manifest file, not allowing the jar to run.
I fixed this by adding a manifest file under
META-INF/manifest.xml, with the following code:Adding this allows the jar to run flawlessly, in addition to the other adjustments I made.