<AWT Dev> Code not being run in JTREG environment
peter.brunet at oracle.com
Fri Jun 5 12:57:27 UTC 2015
On 6/5/15 1:06 AM, David Holmes wrote:
> Hi Peter,
> On 5/06/2015 4:01 PM, Pete Brunet wrote:
>> Hi, When I run java from the command line I can tell my code in
>> java.awt.Toolkit.getDefaultToolkit is running but when I run in a JTREG
>> environment I don't see any indication that the code is executing. The
>> jtr log shows that my test java is being invoked and when I use -version
>> the right version string appears in the log.
>> Any ideas on what I might be doing wrong?
> Need more info. How are you running jtreg? How is your test launched
> ie othervm ? Is output from the test itself seen?
Hi David, This is the invocation with the prompt at the client directory
of the local repo:
This is from the shell script:
# @bug 8055160
# @summary Unit test for javax.accessibility.AccessibilitySPI
# @build Load FooProvider BarProvider UnusedProvider
# @run shell basic.sh
# Command-line usage: sh basic.sh /path/to/build
This is from the jtr file:
Load pass FooProvider
Exception in thread "main" java.lang.RuntimeException: FooProvider was
I don't see any output from printlns (or existence of a debug file I
create) in java.awt.Toolkit.getDefaultToolkit but I do see all output
from my test.
This might not be a show stopper for me. I could call
java.awt.Toolkit.getDefaultToolkit from my test but I want to understand
why it's called when running my java.exe from the command line but not
from within jtreg. Maybe I am not using jtreg correctly.
I added awt-dev list in case that group might know the answer.
Later in the morning I'll put a Thread.dumpStack in getDefaultToolkit
and maybe that will give me a hint as to why it is called in the
non-jtreg case but not in the jtreg environment.
>> Thanks, Pete
More information about the awt-dev