Classpath for interactive tests
I extract here a post from previous thread.
My question is the following, how to specify where JTHarness could find "serverpart" for interactive test when it's not indicate in the classpath ?
When I do not include it in the classpath, JTHarness does not show the interactive windows on the server side (it says, when I start it, that server side class are missing).
This does not occured before, when I used a different interview (today I use J2meDistributedTestSuite but before I used a TestMeInterview (sources are missing...) and it works well as you say under).
I think it links with the .jtt file here is my jtt :
classpath=$testSuiteRootDir$/classes lib/tck_jt.jar lib/j2mefw_jt.jar lib/server_tests.jar
Something wrong with it ?
PS : Vladimir, this question does not require a rapid response ( ;-) ). I do not want to abuse of your time !
Original Post (http://forums.java.net/jive/thread.jspa?threadID=65621&tstart=0) :
> I use two kind of scripts usually to launch harness :
> - from a shell :
> java -cp "./lib/*" com.sun.javatest.tool.Main -testsuite ./ -workDirectory -create -overwrite ./WorkDirectory
It is highly recommended to _not_ include everything in the classpath,
but only a javatest.jar.
So, in your case it would look like:
java -jar lib/javatest.jar -testsuite ./ .....
The reason for such recommendations is that JTHarnes uses its own
classloader to load the testsuite and testsuite related classes
(interview, custom test suite, etc). When the extra classes are in the
system classpath, this might lead to a *very* tricky and subtle bugs
(like some classes loaded by the system classloader and some others by
the JTHarness one), which are not immediately obvious, but still confusing.