---------- Forwarded message ---------- From: Nirmal Fernando <[email protected]> Date: Sat, Apr 10, 2010 at 8:43 PM Subject: Re: Fw: Juni Tests To: [email protected]
Hi Bryan & Knut, Thanks for your reply. But unfortunately it still not working. Following is the junitAll.out file content: java.lang.NoClassDefFoundError: junit/textui/TestRunner Caused by: java.lang.ClassNotFoundException: junit.textui.TestRunner at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) Could not find the main class: junit.textui.TestRunner. Program will exit. Exception in thread "main" I set all the environment variables needed in CLASSPATH manually, and set the CLASSPATH manually as well. Thanks!!! On Sat, Apr 10, 2010 at 8:12 PM, Bryan Pendleton <[email protected] > wrote: > Nirmal Fernando wrote: > >> Yes, I have placed it tools/java. Can you think of any other reason? >> >> On Sat, Apr 10, 2010 at 4:58 PM, Tiago Espinha <[email protected] >> Did you place the JUnit jar in the classpath? That error basically >> >> says that Java isn't finding the JUnit classes, so make sure you >> have included it. >> > > Hi Nirmal, > > Just placing the jar file into tools/java does not automatically include > it in your classpath. You have to either set CLASSPATH environment variable > or set the -cp flag when running java. > > Try something like: > > > CLASSPATH=$tooljardir/junit.jar:$tooljardir/jakarta-oro-2.0.8.jar:$jardir/derbyrun.jar:$jardir/derbyTesting.jar > export CLASSPATH > echo "classpath=$CLASSPATH" > > java -Xmx512m -XX:MaxPermSize=128m junit.textui.TestRunner > org.apache.derbyTesting.functionTests.suites.All >junitAll.out 2>&1 > > thanks, > > bryan > > -- Best Regards, Nirmal C.S.Nirmal J. Fernando Department of Computer Science & Engineering, Faculty of Engineering, University of Moratuwa, Sri Lanka. -- Best Regards, Nirmal C.S.Nirmal J. Fernando Department of Computer Science & Engineering, Faculty of Engineering, University of Moratuwa, Sri Lanka.
