Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

RMI Server from client in eclipse

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • Quote
  • Report post to moderator
I already solved using sockets, thanks
 
ice is for people that are not already cool. Chill with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic