Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get current directory in dll ?

878808Jul 28 2011 — edited Jul 30 2011
I use Jnative to access a native library A.dll. In the A.dll, I use GetModuleFileName method to get the current working directory, it's supposed to get the directory where the java class is, but unfortunately, I get "C:\Program Files\Java\jdk1.6.0_10\bin" ? How can I get my working directory in a dll when I use jnative? BTW, I can't change A.dll.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 26 2011
Added on Jul 28 2011
2 comments
1,330 views