I have a project running perfectly in netbeans, windows 8, I build the jar file project-> build with dependencies. When I try to run it from command prompt with this command:
java -jar OracleBackup.jar
it throws this error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/mycompany/datalayer/DB
at com.mycompany.oraclebackup.App.main<App.java:12>
caused by: java.lang.classNotFoundException: com.mycompany.datalayer.DB
at java.net.URLClassLoader$1.run<unknown source>
I have searched a lot, I have made some changes, but it still doesn't work.
more details:
path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.7.0_17\bin
When I open the .jar file:
1) I can see DB.class in com/mycompany/datalayer/DB
2)Manifest file exists and this is the content: Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: Apache Maven Built-By: Moises David Build-Jdk: 1.7.0_17 Main-Class: com.mycompany.oraclebackup.App
Should I mention my .jar dependencies in here too?
Can someone tell me what the problem is and how I can solve it?
Thank you so much!!!