Help with adding a native method

Staffan Larsen staffan.larsen at
Wed Mar 21 08:44:07 PDT 2012

Read the following thread. The error looks very similar and perhaps there is some good information in there.


On 21 mar 2012, at 16:18, Ilya Mirsky wrote:

> Hi,
> 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
> <jdk7u2.patch>

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-dev mailing list