Have any of you encountered the following issue with NetBeans 8.0.2/ Java: I have multiple packages in the projects, and I have set the Main Class for execution in the project properties. Compiling the project works perfectly, but when I Build and Clean, and then execute the app from command line, it says the following:
> Exception in thread "main" java.lang.NoClassDefFoundError: #projectname omitted#
Any help and suggestions will be appreciated!
Thanks
Edit:
This is the build and clean log from NetBeans:
("..." is a folder name which I have omitted for certain purposes)
ant -f "C:\\Program Files\\...\\WhoWhatIMS" -Dnb.internal.action.name=rebuild clean jar
init:
deps-clean:
Created dir: C:\Program Files\...\WhoWhatIMS\build
Updating property file: C:\Program Files\...\WhoWhatIMS\build\built-clean.properties
Deleting directory C:\Program Files\...\WhoWhatIMS\build
clean:
init:
deps-jar:
Created dir: C:\Program Files\...\WhoWhatIMS\build
Updating property file: C:\Program Files\...\WhoWhatIMS\build\built-jar.properties
Created dir: C:\Program Files\...\WhoWhatIMS\build\classes
Created dir: C:\Program Files\...\WhoWhatIMS\build\empty
Created dir: C:\Program Files\...\WhoWhatIMS\build\generated-sources\ap-source-output
Compiling 8 source files to C:\Program Files\...\WhoWhatIMS\build\classes
Copying 10 files to C:\Program Files\...\WhoWhatIMS\build\classes
Copied 2 empty directories to 1 empty directory under C:\Program Files\...\WhoWhatIMS\build\classes
compile:
Created dir: C:\Program Files\...\WhoWhatIMS\dist
Copying 1 file to C:\Program Files\...\WhoWhatIMS\build
Copy libraries to C:\Program Files\...\WhoWhatIMS\dist\lib.
Building jar: C:\Program Files\...\WhoWhatIMS\dist\WhoWhatIMS.jar
To run this application from the command line without Ant, try:
java -jar "C:\Program Files\...\WhoWhatIMS\dist\WhoWhatIMS.jar"