Help with adding a native method

Ilya Mirsky ilya.mirsky at
Wed Mar 21 08:18:49 PDT 2012


Following my post from a week ago, I'm trying to add a native method to the
unsafe class.
For a start I'm trying to duplicate an existing method (CompareAndSwap).
I added the new method, and registered it in the unsafe.cpp file and in
vmSymbols.hpp (a patch is attached).
When I'm compiling the jdk I get the following error from test_gamma:

cd linux_i486_compiler2/product && ./test_gamma
> java full version "1.6.0_22-b22"
> Using java runtime at: /usr/lib/jvm/java-6-openjdk/jre
> Error occurred during initialization of VM
> java.lang.NullPointerException
> at java.util.Hashtable.put(
>  at java.lang.System.initProperties(Native Method)
> at java.lang.System.initializeSystemClass(

What am I doing wrong?
Any help will be highly appreciated

Best Regards,
Ilya Mirsky
<>  <>
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jdk7u2.patch
Type: application/octet-stream
Size: 4922 bytes
Desc: not available
Url : 

More information about the hotspot-dev mailing list