executing rmi program from the command line without eclipse

This is the place for general discussion of the RMI plugin for Eclipse and support questions

executing rmi program from the command line without eclipse

Postby fdm225 » Sat Sep 27, 2008 2:00 am

I apologize for the novice question but I am new to java and RMI and am attempting to learn for a class project. I have successfully written a RMI client and server that runs withing eclipse. I am now attempting to execute a RMI program from the command line without eclipse. I have went into the run dialog's "RMI VM Properties" page and copied the command to the clipboard. The issue is that every time I go to execute my program (from the command line) I get a wrong name exception (please see below). Any help would be appreciated!


Banana-Jr:pa1 davidmorrison$ pwd
Banana-Jr:pa1 davidmorrison$ ls
PA1 PA1.zip client common learning server
Banana-Jr:pa1 davidmorrison$ cd server
Banana-Jr:server davidmorrison$ lsbin src
Banana-Jr:server davidmorrison$ cd bin
Banana-Jr:bin davidmorrison$ ls
Banana-Jr:bin davidmorrison$ cd server/
Banana-Jr:server davidmorrison$ ls
HelloServerImpl.class HelloServerImpl_Stub.class ServerClass.class
Banana-Jr:server davidmorrison$ java -Djava.rmi.server.codebase="file:/Users/davidmorrison/Documents/IIT/CS550/pa1/server/bin/ file:/Users/davidmorrison/Documents/IIT/CS550/pa1/common/bin/" HelloServerImpl
Exception in thread "main" java.lang.NoClassDefFoundError: HelloServerImpl (wrong name: server/HelloServerImpl)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
Banana-Jr:server davidmorrison$
Posts: 1
Joined: Sat Sep 27, 2008 1:36 am

Return to General discussion and support

Who is online

Users browsing this forum: No registered users and 3 guests