java - Problem with JNIRegistry -


I am using the JNI registry API to access the Windows registry. Here is my code:

  import com.ice.jni.registry.Registry; Import com.ice.jni.registry.RegistryException; Import com.ice.jni.registry.RegistryKey; Import com.ice.jni.registry.RegistryValue; Public Square JNIERGrassist Example {Public Static Zero Main (String [] Args) {Registry Line = Registry Hke_ohlal_mac; Registry Key Key = Registry Open Sobki (Reggae, "Software \\ SMS \\ DHC", Registry. ACCCSEAD); Println (key.getFullName ()); Try {RegistryValue value = key.getValue ("ProntoPort"); String x = new string (value.getByteData ()); Println (x); } Hold (registry exception exemption) {ex.printStackTrace (); }}}  

This code works well for some registry keys, but not for others. For example, it works well for HKLM \ SOFTWARE \ MICROSOFT \ WINDOWS \ CurrentVersion \ ProgramFilesDir, but for many others it's not. (The example in the code does not work, and I'm 100% sure it is present in the registry, I can see it with the reg command).

Anyone?

Thank you!

try it ....

  registry reg = new registry (); Registry Key Top Key = Registry HKKURURURURR; Registry RK = Topki.OpenSub ("Software \\ Sparks System \\EA 400 \\ EA"); String path = rk.getStringValue ("install path");  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -