|
From: Rodolfo C. <cam...@gm...> - 2006-11-05 19:46:36
|
Dear list friends,
I'm having an error when trying to connect my client (programmed in jdk1.5)
to machines with Solaris 8, I do not have this problem consulting machines
with Solaris 9 & 10.
Here's my Client, there is one curious thing, when I run this program with
jdk1.4.2 there is no problem, but when I run it with jdk1.5 I've got a
ClassNotFound exception for java.security.KeyRep (this class was included i=
n
jdk1.5), I think the problem is with the RMI version.
I have to run this program using jdk1.5 because the rest of the client was
written using it and it will be very hard to bring it back to jdk1.4.2. Wha=
t
can I do?? I've been reading RMI specifications from sun documentation, but
still not have the answer.
Can I configure my JVM to run as lower versions of JVM??
import java.util.Enumeration;
import java.util.Vector;
import com.sun.wbem.cim.CIMException;
import com.sun.wbem.cim.CIMInstance;
import com.sun.wbem.cim.CIMNameSpace;
import com.sun.wbem.cim.CIMObjectPath;
import com.sun.wbem.cim.CIMProperty;
import com.sun.wbem.client.CIMClient;
import com.sun.wbem.security.PasswordCredential;
import com.sun.wbem.security.UserPrincipal;
public class TesterOld {
public static void main(String[] args) {
//Creando el espacio de nombre para el IP dado y root\cimv2
String ip =3D "citorgalt.dnsalias.net";//args[0];
CIMNameSpace cns =3D new CIMNameSpace(ip, "root\\cimv2");
UserPrincipal up =3D new UserPrincipal("root");
PasswordCredential pc =3D new PasswordCredential("root");
CIMClient cc =3D null;
try {
//Conectando
System.out.println(cns.getHost());
cc =3D new CIMClient(cns, up, pc);
System.out.println("Connected to: " + cc);
CIMObjectPath cop =3D new CIMObjectPath("Solaris_ComputerSystem=
");
Enumeration e =3D cc.enumerateInstances(cop, false, false, true=
,
false, null);
while (e.hasMoreElements()) {
CIMInstance ci =3D (CIMInstance) e.nextElement();
System.out.println("\nProperties of: " + ci.getClassName())=
;
Vector properties =3D ci.getProperties();
for (int j =3D 0; j < properties.size(); j++) {
CIMProperty cimprop =3D (CIMProperty) properties.get(j)=
;
//Imprimiendo propiedades
System.out.println(cimprop.getName() + ": "
+ cimprop.getValue());
}
}
} catch (CIMException e) {
e.printStackTrace();
try {
//Cerrando la conexi=F3n
cc.close();
} catch (CIMException e1) {
e1.printStackTrace();
}
}
}
}
Thanks in advance,
Rodolfo Campos.
|