Hallo, ich habe in eine Anwendung o. g. Package eingebunden.
Jetzt habe ich allerdings das Problem, dass ich beim Schreiben oder Verändern eines Registry-SubKeys folgenden Error bekomme:
java.lang.OutOfMemoryError: GetObjectField(data)
at com.ice.jni.registry.RegistryKey.setValue(Native Method)
at com.ice.jni.registry.RegistryKey.setValue(Registry Key.java:219)
Hier ist noch der Code, der diesen Fehler verursacht:
<PRE>
public void setPWDState(boolean pState) {
String topLevelKey = new String();
String value2Set = new String();
RegistryKey topKey = null;
RegistryKey localKey = null;
RegStringValue rValue = null;
try {
if (pState) {
value2Set = "Y";
}
else {
value2Set = "N";
}
topLevelKey = "HKCU";
topKey = Registry.getTopLevelKey(topLevelKey);
localKey = topKey.createSubKey(PATH_HORIZON, "OraclePasswordChanged", RegistryKey.ACCESS_WRITE);
rValue = new RegStringValue(localKey, value2Set);
localKey.setValue(rValue);
localKey.closeKey();
topKey.closeKey();
}
catch (Exception rex) {
rex.printStackTrace();
}
}
</PRE>
Weiss jemand, was ich falsch mache? Bin für jede Antwort dankbar!
Danke & Gruß,
Stefan
Jetzt habe ich allerdings das Problem, dass ich beim Schreiben oder Verändern eines Registry-SubKeys folgenden Error bekomme:
java.lang.OutOfMemoryError: GetObjectField(data)
at com.ice.jni.registry.RegistryKey.setValue(Native Method)
at com.ice.jni.registry.RegistryKey.setValue(Registry Key.java:219)
Hier ist noch der Code, der diesen Fehler verursacht:
<PRE>
public void setPWDState(boolean pState) {
String topLevelKey = new String();
String value2Set = new String();
RegistryKey topKey = null;
RegistryKey localKey = null;
RegStringValue rValue = null;
try {
if (pState) {
value2Set = "Y";
}
else {
value2Set = "N";
}
topLevelKey = "HKCU";
topKey = Registry.getTopLevelKey(topLevelKey);
localKey = topKey.createSubKey(PATH_HORIZON, "OraclePasswordChanged", RegistryKey.ACCESS_WRITE);
rValue = new RegStringValue(localKey, value2Set);
localKey.setValue(rValue);
localKey.closeKey();
topKey.closeKey();
}
catch (Exception rex) {
rex.printStackTrace();
}
}
</PRE>
Weiss jemand, was ich falsch mache? Bin für jede Antwort dankbar!
Danke & Gruß,
Stefan
Comment