We are MSU students working on a project called Web-based robot control by using Java2 RMI. We are currently using the Java2 SDK 1.4.1_01, commapi (for port communication) and ACL robot control. However, with our limited knowledge on Java programming language, we encounter some problems. I wish to get help from any user who could help.
1. Write and compile code. The attachment contains the 5 parts of the program: - Robot.java (interface) - Move.java(interface) - RobotEngine(server) - RobotMove(client) - Sendtorobot(serial communication) 2. Running the program: a. We start the rmiregisty from the folder were our program is located b. In the next DOS-PROMT Window, first we set out class paths to:
The following are the problems occur while running the client,
C:\Robot>startclient.bat
C:\Robot>java -Djava.rmi.server.codebase=file:/c:\Robot/ -Djava.security.policy=java.policy client.RobotMove localhost con RobotMove exception: Error occurred in server thread; nested exception is: java.lang.NoClassDefFoundError java.rmi.ServerError: Error occurred in server thread; nested exception is: java.lang.NoClassDefFoundError at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:289) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:536) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall .java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) at engine.RobotEngine_Stub.executeTask(Unknown Source) at client.RobotMove.main(RobotMove.java:19) Caused by: java.lang.NoClassDefFoundError at client.Sendtorobot.doit(Sendtorobot.java:26) at client.Sendtorobot.execute(Sendtorobot.java:22) at engine.RobotEngine.executeTask(RobotEngine.java:15) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25) at java.lang.reflect.Method.invoke(Method.java:324) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) at java.lang.Thread.run(Thread.java:536) C:\Robot>
The following is the alternative we tried:
Another alternative we tried was to simplify the program only to serial communication. The serial communication called SimpleWrite and its compiled class is attached in the SW folder. Below is the problem that occurred. Port COM1 not found. We also tried to run java BlackBox from commapi directory to search for ports but again the massage came up to be no ports found.
C:\j2sdk1.4.1_02\bin>java SimpleWrite port COM1 not found.
We would like to ask for help with the above problems. Thank you very much!!