We just purchased JNIWrapper (3.10) and are trying to use it in an application that is running as a Windows service using a org.tanukisoftware.wrapper.
When I try to open a Registry key (which I know exists), we get this exception:
com.jniwrapper.win32.registry.RegistryException: The system cannot find the file specified.
Here’s what the stack trace looks like once our code calls jniwrapper:
com.jniwrapper.win32.registry.RegistryKey.checkError(RegistryKey.java:223)
com.jniwrapper.win32.registry.RegistryKey.openSubKey(RegistryKey.java:549)
com.jniwrapper.win32.registry.RegistryKey.openSubKey(RegistryKey.java:518)
com.jniwrapper.win32.registry.RegistryKey.openSubKey(RegistryKey.java:502)
I wish it reported the file that couldn’t be found! Is it the native code DLL? The license file? Something else??
These are all in the same folder as jniwrap-3.10.jar. I have also tried *including* them in the jar (this worked for another team here):
jniwrap.dll and jniwrap64.dll in the root of the jar, jniwrap.lic in META-INF.
I do most of my coding as a .NET web developer, so a Java Windows service is unfamiliar in few ways! But other possibilities for the problem might
be file or registry permissions or 32 vs 64 bit issues.
Any suggestion would be most appreciated!
Steve Gruverman | Application Developer II
IDEXX Laboratories, Inc. | Steven-G...@idexx.com
Phone: + 1 207 556 6981
Mobile: + 1 207 798 2893
I think I may have solved this shortly after sending out this email:
We were trying to read Registry keys under HKEY_CURRENT_USER. HKEY_LOCAL_MACHINE is a better choice when a service is reading the Registry.
Steve Gruverman | Application Developer II
IDEXX Laboratories, Inc. | Steven-G...@idexx.com
Phone: + 1 207 556 6981
Mobile: + 1 207 798 2893
--
You received this message because you are subscribed to the Google Groups "JNIWrapper Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jniwrapper-for...@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/jniwrapper-forum/201509032111.t83L2knv011481%40mx0a-00116901.pphosted.com.
--
You received this message because you are subscribed to the Google Groups "JNIWrapper Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jniwrapper-for...@teamdev.com.
To view this discussion on the web visit https://groups.google.com/a/teamdev.com/d/msgid/jniwrapper-forum/201509032130.t83LNDPr031089%40mx0b-00116901.pphosted.com.