• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI Server from client in eclipse

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, thanks for reading this, well this is what happens, i have a RMI server (objRMI.jar) in a folder in my computer which i created and compiled from line commands, and i have an android application in eclipse IDE, now i want that my android application in eclipse works as a client for the RMI server that i have in another directory, the thing is that i don't know how to set the classpath to objRMI.jar, and also call the interface in the server i been doing it through commands lines from another client in the same directory like this
set CLASSPATH=%CLASSPATH%;.\objRMI.jar;.
but i dont know how to do it in eclipse
the invocation in the client that i have in the same diretory where the server is, is like this:
MyRMIinterface mri = (MyRMIinterface)java.rmi.Naming.lookup("//" +args[0] + ":" + args[1] + "/TestRMI");
but in eclipse, because they are not in the same directory it shows me an error, that i have to create the class MyRMIinterface.
i also want to be able to run a client in one machines to connect to the RMI server in another machine.
 
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just open Run Configurations and add the jar file pointer there.
 
Ivo Tantamango
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, that's one thing that i could do for setting the path, but when im invoking the interface it shows me an error because that interface is not in the same directory, im wondering on how to do it i separate machines.
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Everything you can do on a command line you can do with the Run Configurations.
 
Ivo Tantamango
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I already solved using sockets, thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic