K
Krystian
Hi
I've got a small application written in Java with RMI, but i can't get
it to work.
Here's my directory structure:
D:\Aplikacja\
-serwer\
com.krystian.info.jar
-klient\
test.jar
com.krystian.info.jar is a package with the server, which should send
some system info to the client.
test.jar is a package with client.
Here's what i do:
just fine and everything seems to be all right butarameter is the name to bind in the rmiregistry. Unfortunately when
the client starts i get:
Exception in thread "main" java.rmi.UnmarshalException: error
unmarshalling retu
rn; nested exception is:
java.lang.ClassNotFoundException: com.krystian.info.Info_Stub
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at test.Test.main(Test.java:14)
Caused by: java.lang.ClassNotFoundException:
com.krystian.info.Info_Stub
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
......
but the stub is there!
adding: com/krystian/(in = 0) (out= 0)(stored 0%)
adding: com/krystian/info/(in = 0) (out= 0)(stored 0%)
adding: com/krystian/info/Info.class(in = 2475) (out= 1298)(deflated
47%)
adding: com/krystian/info/InfoI.class(in = 267) (out= 188)(deflated
29%)
adding: com/krystian/info/Info_Skel.class(in = 1747) (out=
978)(deflated 44%)
adding: com/krystian/info/Info_Stub.class(in = 3370) (out=
1647)(deflated 51%)
adding: com/krystian/info/libuxinfo.sl(in = 20480) (out= 3857)(deflated
81%)
adding: com/krystian/info/Param.class(in = 1286) (out= 735)(deflated
42%)
adding: com/krystian/info/UxInfo.class(in = 2257) (out= 1175)(deflated
47%)
adding: com/krystian/info/WinInfo.class(in = 2279) (out= 1158)(deflated
49%)
adding: com/krystian/info/wininfo.dll(in = 492375) (out=
137023)(deflated 72%)
adding: com/krystian/info/Wyjatek.class(in = 1820) (out= 974)(deflated
46%)
Could somebody explain me what do i do wrong?
I would appreciate it.
Best regards,
Krystian
I've got a small application written in Java with RMI, but i can't get
it to work.
Here's my directory structure:
D:\Aplikacja\
-serwer\
com.krystian.info.jar
-klient\
test.jar
com.krystian.info.jar is a package with the server, which should send
some system info to the client.
test.jar is a package with client.
Here's what i do:
parameter is the name to bind in the rmiregistry, the server startsstart rmiregistry
java -Djava.rmi.server.codebase=file:\\D:\Aplikacja\serwer\com.krystian.info -Djava.server.policy=java.policy -classpath D:\Aplikacja\serwer\com.krystian.info.jar com.krystian.info.Info info
just fine and everything seems to be all right butarameter is the name to bind in the rmiregistry. Unfortunately when
the client starts i get:
Exception in thread "main" java.rmi.UnmarshalException: error
unmarshalling retu
rn; nested exception is:
java.lang.ClassNotFoundException: com.krystian.info.Info_Stub
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at test.Test.main(Test.java:14)
Caused by: java.lang.ClassNotFoundException:
com.krystian.info.Info_Stub
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
......
but the stub is there!
added manifestjar cvf com.krystian.info.jar com\*
adding: com/krystian/(in = 0) (out= 0)(stored 0%)
adding: com/krystian/info/(in = 0) (out= 0)(stored 0%)
adding: com/krystian/info/Info.class(in = 2475) (out= 1298)(deflated
47%)
adding: com/krystian/info/InfoI.class(in = 267) (out= 188)(deflated
29%)
adding: com/krystian/info/Info_Skel.class(in = 1747) (out=
978)(deflated 44%)
adding: com/krystian/info/Info_Stub.class(in = 3370) (out=
1647)(deflated 51%)
adding: com/krystian/info/libuxinfo.sl(in = 20480) (out= 3857)(deflated
81%)
adding: com/krystian/info/Param.class(in = 1286) (out= 735)(deflated
42%)
adding: com/krystian/info/UxInfo.class(in = 2257) (out= 1175)(deflated
47%)
adding: com/krystian/info/WinInfo.class(in = 2279) (out= 1158)(deflated
49%)
adding: com/krystian/info/wininfo.dll(in = 492375) (out=
137023)(deflated 72%)
adding: com/krystian/info/Wyjatek.class(in = 1820) (out= 974)(deflated
46%)
Could somebody explain me what do i do wrong?
I would appreciate it.
Best regards,
Krystian