Hello all:
Has anyone tried one jar and received an error that the main class will not Load?
I used "ONE JAR" and created the executable and I altered the build file.
response from simon:
Main-Class: com\simontuffs\onejar.Boot One-Jar-Main-Class: musicSystems.src.view.Main
"Main-Class" is the "standard" Java JAR main class launcher, used by "java -jar" to know what to execute. It should point to the com.simontuffs.onejar.Boot class, which then reads the one-jar and launches the class pointed to by "One-Jar-Main-Class" -- your application.
above discribes how the one jar process is working
reads the one-jar and launches the class pointed to by "One-Jar-Main-Class"
This suggest that the build file is not in play. Do I need to do anyThing to
the build file found in the one-jar-sdk-0.97.zip provided?
Below are the command and the build file and errors:
Double clicking the musicSystems.jar that the One Jar produces:
A Java Exception has occurred.
C:\Program Files\Java\jdk1.7.0_01\bin>jar -cvfm C:\Users\Steves\Documents\ceyesu
mma\java_cache\my_projects\netbeans\musicSystems\target_musicSystems\BundlingToo
ls\musicSystems.jar C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\n
etbeans\musicSystems\target_musicSystems\BundlingTools\META-INF\MANIFEST.MF
added manifest
C:\Program Files\Java\jdk1.7.0_01\bin>jar -tvf C:\Users\Steves\Documents\ceyesum
ma\java_cache\my_projects\netbeans\musicSystems\target_musicSystems\BundlingTool
s\musicSystems.jar
0 Wed Jan 18 08:47:36 CST 2012 META-INF/
304 Wed Jan 18 08:47:36 CST 2012 META-INF/MANIFEST.MF
C:\Program Files\Java\jdk1.7.0_01\bin>java -jar -Xmx256m C:\Users\Steves\Documen
ts\ceyesumma\java_cache\my_projects\netbeans\musicSystems\target_musicSystems\Bu
ndlingTools\musicSystems.jar
Exception in thread "main" java.lang.NullPointerException
at sun.launcher.LauncherHelper.getMainClassFromJar(LauncherHelper.java:3
99)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:463)
C:\Program Files\Java\jdk1.7.0_01\bin>
Result from command :
Exception in thread "main" java.lang.NullPointerException
at sun.launcher.LauncherHelper.getMainClassFromJar(LauncherHelper.java:3
99)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:463) …