How can you run jtreg with jdk-base-image?

Sean Mullan sean.mullan at oracle.com
Wed Aug 31 13:36:36 PDT 2011


On 8/31/11 4:29 PM, Alan Bateman wrote:
> Sean Mullan wrote:
>> I'm trying to run tests with only a jdk-base-image but I am getting errors
>> because jtreg can't find classes that aren't in the installed modules. Is it
>> possible to run jtreg with this type of setup?
>>   
> Is it classes that jtreg needs or classes that the tests need? 

jtreg. Here's the exception stack trace:

Exception in thread "main" java.lang.NoClassDefFoundError:
java/awt/IllegalComponentStateException
	at javax.help.HelpSet.findHelpSet(HelpSet.java:169)
	at javax.help.HelpSet.findHelpSet(HelpSet.java:200)
	at javax.help.HelpSet.findHelpSet(HelpSet.java:213)
	at com.sun.interview.Interview.setHelpSet(Interview.java:380)
	at com.sun.javatest.interview.TestsInterview.<init>(TestsInterview.java:72)
	at
com.sun.javatest.interview.BasicInterviewParameters.createTestsInterview(BasicInterviewParameters.java:96)
	at
com.sun.javatest.interview.BasicInterviewParameters.<init>(BasicInterviewParameters.java:64)
	at
com.sun.javatest.interview.BasicInterviewParameters.<init>(BasicInterviewParameters.java:83)
	at
com.sun.javatest.regtest.RegressionParameters.<init>(RegressionParameters.java:56)
	at
com.sun.javatest.regtest.RegressionTestSuite.createInterview(RegressionTestSuite.java:106)
	at com.sun.javatest.regtest.Main.createParameters(Main.java:1434)
	at com.sun.javatest.regtest.Main.run(Main.java:979)
	at com.sun.javatest.regtest.Main.run(Main.java:877)
	at com.sun.javatest.regtest.Main.main(Main.java:821)

> I recall 
> there were issues with jtreg (may have been JavaTest, which jtreg uses) 
> needing JavaHelp and AWT and I remember having to do a bit of hacking to 
> get it to work. 

yep - do you remember what you did?

> The jdk-base-image has the compiler and tools so we 
> should be able to get this to work. The other useful thing to know is 
> the -compilejdk option so we should be able to run tests with a 
> jre-base-image too. 

Is that a jtreg option?

> Anyway, once you get past that then the real fun 
> begins because our tests aren't organized by module and will have 
> dependency on modules that aren't in the base image (and since jtreg 
> will be running the tests in legacy mode then it means ClassNotFoundErrors).

I'm mostly interested in running the security tests, validating signed modules
and so forth.

--Sean



More information about the jigsaw-dev mailing list