Instruction to test webrev

Thanh Hong Dai hdthanh at tma.com.vn
Tue Mar 29 08:17:49 UTC 2016


Dear Sherman,

I got this error when I run some test code on Java 9-ea+111 (can't use Java 8, since java/lang/invoke/StringConcatFactory is used in the code).

> Exception in thread "main" java.lang.IllegalAccessError: class jdk.java.util.regex.Pattern (in unnamed module @0xeec5a4a) cannot access class sun.text.Normalizer (in module java.base) because module java.base does not export sun.text to unnamed module @0xeec5a4a

Here is my command:

> "C:\Program Files\Java\jdk-9\bin\java.exe" -cp lib\regex.jar;bin CanonTest

Best regards,
Thanh Hong.

-----Original Message-----
From: Xueming Shen [mailto:xueming.shen at oracle.com] 
Sent: Saturday, 19 March, 2016 4:15 AM
To: hdthanh at tma.com.vn
Cc: core-libs-dev at openjdk.java.net
Subject: Re: Instruction to test webrev

Hi HongDai,

The easiest way to test the proposed regex change without building the jdk is to copy all source files from j.u.regex into a local directory, update them with the latest version from the webrev, change the "package ..." line of each file to some dummy package name (to avoid "java..."), and compile.
You now have a local copy of the regex to test on.

For example I have a regex.jar at

http://cr.openjdk.java.net/~sherman/regexBackTrack.Lamnda.CanonEQ/regex.jar

with the latest change I proposed in

http://cr.openjdk.java.net/~sherman/regexBackTrack.Lamnda.CanonEQ/webrev

You can test with the package name "jdk.java.util.regex" (I just added a prefix "jdk" to the official package name java.util.regex), for example do

import jdk.java.util.regex.*;

And compile your test code with

javac -cp regex.jar Test.java

and run with

java -cp regex.jar:./ Test

I know Vietnamese relies heavily on combining characters, it would be appreciated if you can help try out the latest regex changes to see if it works as expected under CANON_EQ mode.

Thanks
Sherman

On 03/18/2016 07:31 AM, Roger Riggs wrote:
> Hi,
>
> Jtreg can be passed a directory or individual .java file to be tested.
> The regex tests are in <tree>/jdk/test/java/util/regex/...
>
> jtreg -jdk:<tree>/build/.../images/jdk> -dir:<tree>jdk/test 
> java/util/regex
>
> For just compile and run the .java files in that directory.
>
> YMMV
>
> Roger
>
>
> On 3/18/2016 2:44 AM, Thanh Hong Dai wrote:
>> Hi,
>>
>> I'm interested in testing some of the webrev, esp. regex webrev, but I don't want to recompile the whole JDK just for this. Is there any way to test only the regex package?
>>
>> Best regards,
>> Hong Dai Thanh
>>
>




More information about the core-libs-dev mailing list