• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem

 
Ambika Kumar
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
After I compiled all the classes , ie the interface class,implementation, server and client, if I go for 'rmic implementation' class, it says that class not found.
I just started it and I didn't find any solution.

Thanks
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your classes aren't in packages, simply go into the directory that contains the classfiles and try -


Where <;other_libs> holds a semicolon separated list of any other JARs or other directories of classes you may need (you may have none...). <impl_class> is the class name you want to build rmi stubs for. Remember *not* to put .class on the end! rmic knows to look for a .class file and if you put it in, it thinks you are looking for a class called "class" in the (probably non-existant)<impl_class> package.

If your code *is* using packages, it goes pretty much the same as above - only instead of using "-classpath .<;other_libs>" you will replace the "." with the path of the directory *directly above* the start of your package directory. For example, the class you want to create stubs for is located in "C:\projects\RMI_Stuff_1.3.3\build\com\me\server\ServerImpl.class". In this case you would set the classpath to "-classpath C:\projects\RMI_Stuff_1.3.3\build\<;other_libs>.

Hope this helps...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!