I currently have an open instance of the command prompt, it reads
java -cp .;jars/GUI.jar;jars/utils.jar;...(a bunch more jars in the same folder)... Test
where Test is my java program (class files already compiled).
When I hit enter, the program runs just fine. Now, I put the same exact line into a batch file for automatic runs but it gives me an error.
Batch File:
cd
java -cp .;jars/GUI.jar;jars/utils.jar;...(a bunch more jars in the same folder)... Test
pause
Error: Exception in Thread “Main” java.lang.NoClassDefFound Test (wrong name: Test)
I’ve been at this for hours today so at this point, this is the last thing I need to do, my brain is fried, am I missing something simple?
Or the Bash script doesn’t know where the PATH to the Java installation. I’d check the environment variables as well.