Board index » jbuilder » JUnit tutorial not working in JBuilder 9?

JUnit tutorial not working in JBuilder 9?


2003-10-28 02:55:44 AM
jbuilder8
Hello,
Something fundamental is going wrong with a basic JUnit test case from within JBuilder 9. (version JBuilder 9.0.125.0)
The "Tutorial: Creating and running test cases and test suites" fails in exactly the same way as my own test case.
The tutorial is online at: info.borland.com/techpubs/jbuilder/jbuilder9/bajb/unittest/testcasetutorial.html
Following the tutorial instructions, in order, I fail at Step 3, item 3, when I try to run the test. A dialog appears with the message "Could not find the main class. Program will exit".
The debug output (run command) is included below (for the tutorial example).
I believe my project runtime configurations are set up correctly. JUnit.jar exists on the expected classpath. The tutorial .class file exists on the expected classpath (as does my own test case .class file in my own project).
Any ideas?
Thanks,
R. Trevor
C:\JBuilder9\jdk1.4\bin\javaw -classpath "C:\JBuilder9\samples\DataExpress\ProviderResolver\classes;C:\JBuilder9\lib\dbswing.jar;C:\JBuilder9\lib\dx.jar;C:\JBuilder9\lib\beandt.jar;C:\JBuilder9\thirdparty\junit3.8\junit.jar;C:\JBuilder9\lib\unittest.jar;C:\JBuilder9\jdk1.4\jre\lib\rt.jar;C:\JBuilder9\jdk1.4\jre\lib\i18n.jar;C:\JBuilder9\jdk1.4\jre\lib\sunrsasign.jar;C:\JBuilder9\jdk1.4\jre\lib\jsse.jar;C:\JBuilder9\jdk1.4\jre\lib\jce.jar;C:\JBuilder9\jdk1.4\jre\lib\charsets.jar;C:\JBuilder9\jdk1.4\jre\classes;C:\JBuilder9\jdk1.4\lib\tools.jar" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=BCDEV:1165,suspend=y com.borland.jbuilder.unittest.JBTestRunner -socket BCDEV:1164 com.borland.samples.dx.providerresolver.TestResolverBean
Hit uncaught exception java.lang.ClassNotFoundException
 
 

Re:JUnit tutorial not working in JBuilder 9?

Sorry for the immediate add-on post.
The file C:\JBuilder9\lib\unittest.jar does not exist in my installation. Perhaps this is the problem. Any ideas on why this would not have been installed? (JBuilder Professional).
Thanks,
R. Trevor
"R. Trevor" < XXXX@XXXXX.COM >wrote:
Quote

Hello,

Something fundamental is going wrong with a basic JUnit test case from within JBuilder 9. (version JBuilder 9.0.125.0)

The "Tutorial: Creating and running test cases and test suites" fails in exactly the same way as my own test case.

The tutorial is online at: info.borland.com/techpubs/jbuilder/jbuilder9/bajb/unittest/testcasetutorial.html


Following the tutorial instructions, in order, I fail at Step 3, item 3, when I try to run the test. A dialog appears with the message "Could not find the main class. Program will exit".

The debug output (run command) is included below (for the tutorial example).

I believe my project runtime configurations are set up correctly. JUnit.jar exists on the expected classpath. The tutorial .class file exists on the expected classpath (as does my own test case .class file in my own project).

Any ideas?

Thanks,

R. Trevor

C:\JBuilder9\jdk1.4\bin\javaw -classpath "C:\JBuilder9\samples\DataExpress\ProviderResolver\classes;C:\JBuilder9\lib\dbswing.jar;C:\JBuilder9\lib\dx.jar;C:\JBuilder9\lib\beandt.jar;C:\JBuilder9\thirdparty\junit3.8\junit.jar;C:\JBuilder9\lib\unittest.jar;C:\JBuilder9\jdk1.4\jre\lib\rt.jar;C:\JBuilder9\jdk1.4\jre\lib\i18n.jar;C:\JBuilder9\jdk1.4\jre\lib\sunrsasign.jar;C:\JBuilder9\jdk1.4\jre\lib\jsse.jar;C:\JBuilder9\jdk1.4\jre\lib\jce.jar;C:\JBuilder9\jdk1.4\jre\lib\charsets.jar;C:\JBuilder9\jdk1.4\jre\classes;C:\JBuilder9\jdk1.4\lib\tools.jar"
-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=BCDEV:1165,suspend=y com.borland.jbuilder.unittest.JBTestRunner -socket BCDEV:1164 com.borland.samples.dx.providerresolver.TestResolverBean
Hit uncaught exception java.lang.ClassNotFoundException

 

Re:JUnit tutorial not working in JBuilder 9?

"R. Trevor" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote

Sorry for the immediate add-on post.

The file C:\JBuilder9\lib\unittest.jar does not exist in my installation.
Perhaps this is the problem. Any ideas on why this would not have been
installed? (JBuilder Professional).
Hmm, sounds odd, since usually the Professional SKU should also support the
basic JB JUnit capabilities.
Did you also installed the JBuilder9 updates or looked if those maybe fix or
add missing things for your Pro version?
See: www.borland.com/products/downloads/download_jbuilder.html#
-Valentino
 

{smallsort}

Re:JUnit tutorial not working in JBuilder 9?

Thanks for the response. I wasn't aware of the update. I installed update 2. Problem solved. Thanks again...
-Rich
"Valentino Kyriakides" < XXXX@XXXXX.COM >wrote:
Quote

"R. Trevor" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
news:3f9d79c3$ XXXX@XXXXX.COM ...
>
>Sorry for the immediate add-on post.
>
>The file C:\JBuilder9\lib\unittest.jar does not exist in my installation.
Perhaps this is the problem. Any ideas on why this would not have been
installed? (JBuilder Professional).

Hmm, sounds odd, since usually the Professional SKU should also support the
basic JB JUnit capabilities.

Did you also installed the JBuilder9 updates or looked if those maybe fix or
add missing things for your Pro version?

See: www.borland.com/products/downloads/download_jbuilder.html#

-Valentino