Hello,
I have a project directory in /home/researcher
I have in my project/src three packages:A (contains the main class), B and C and I have 2 jar-files file1.jar file2.jar files in the project/my-jars
In Class A I import other classes from the other packages
I compiled as follows: package per package
Quote:
javac-classpath / home/researcher/file1.jar:/home/researcher/file2.jar:/home/ researcher/src *. java
-> It works (i have the. Class in each package)
I run as follows:
Quote:
cd /home/researcher/project/src/A
java-cp / home/researcher/file1.jar:/home/researcher/file2.jar:/home/researcher /src Main
it does not work! have you any idea?
Exception in thread "main" java.lang.NoClassDefFoundError: Main
Please, how to export. class in packages and all in one. jar file so I can do java-jar project.jar?