Lab3 test suite, NoClassDefFoundError

78 views
Skip to first unread message

Erik Hillbom

unread,
Feb 26, 2014, 6:53:24 AM2/26/14
to proglang-c...@googlegroups.com
There seems to be something wrong with the test suite for Lab3, we get this error for every test file:

----------------- end good/good17.cc -------------------
It printed this to standard error:
Exception in thread "main" java.lang.NoClassDefFoundError: good17
Caused by: java.lang.ClassNotFoundException: good17
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: good17. Program will exit.
 

Hampus Bengtsson

unread,
Feb 26, 2014, 6:55:57 AM2/26/14
to Erik Hillbom, proglang-c...@googlegroups.com
We spent hours trying to get the test utility run as expected. Ended up testing every file manually -- would have saved us a lot of time if we did this from the beginning.


--
You received this message because you are subscribed to the Google Groups "proglang-course-2014" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proglang-course-...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

John J. Camilleri

unread,
Feb 26, 2014, 7:02:38 AM2/26/14
to Erik Hillbom, proglang-c...@googlegroups.com
Make sure that the .class file is created in the same directory as the .cc file. This means that your good directory should be full of .class files after running the test suite.
Run the test script from inside the testsuite folder, as in lab 2, giving it the directory of your solution, e.g.:

testsuite$ ./progs-test-lab3 ../


--
Reply all
Reply to author
Forward
0 new messages