• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Deploy an RMI Java app in Unix  RSS feed

 
Sourav Satyajit Mishra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to UNIX and have always worked on Windows Environment for JAVA development.

I have a Java RMI application which is on a particular Server, i have to migrate that application from the UNIX box to another UNIX box.

I have no idea how to proceed, though i think i have to look into the areas of ClassPath and then probably just configure the Paths to the new UNIX box.

Can someone suggest me how do i proceed, i mean in terms of What wud be the effect if i dont change any paths and just copy the Application on the Other UNIX Box


 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not quite sure I understand your question.

What JAR files do you need to run your Java app? You will need the same JARs on the second box, and set your classpath up accordingly on that box.

You will also need a JVM on the second box, and possibly set JAVA_HOME or add the JVM's bin directory to the PATH.

But this is the same thing you would have had to do initially to get the app to run on the first UNIX box.

Or are you asking something entirely different?
 
Sourav Satyajit Mishra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter


Actually i did not deploy the RMI app in the First UNIX box...

Now that you have said, i checked the 2nd UNIX box for JAVA(JVM) it is present in the PATH

I think, now should I copy the App from 1st into 2nd Box and compile them to the path of my App in 2nd box...





 
Peter Johnson
author
Bartender
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No compiling is necessary, just copy the files to the second box. Java is platform independent - compiled Java code should run anywhere that has a JVM.
 
Pat Farrell
Rancher
Posts: 4686
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Peter said, just copy the class files, or jar file, and it should run.

But, can I ask why you are using RMI? It is so last century. Its hard to get it to run through a lot of firewalls.

Modern cost usually used REST over HTTP rather than RMI.
 
Tim Holloway
Saloon Keeper
Posts: 18789
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pat Farrell wrote:As Peter said, just copy the class files, or jar file, and it should run.

But, can I ask why you are using RMI? It is so last century. Its hard to get it to run through a lot of firewalls.

Modern cost usually used REST over HTTP rather than RMI.


HEY! I resent that. I was using it in 2005!

Not every application needs to make it through a firewall. Some are strictly internal. If they are, it's often the case that it's simpler and more efficient (both in developer and machine resource terms) to use RMI. Also, unlike HTTP, RMI can do callbacks.

There's sort of a progression running from local execution, shared resources on a local host, RMI, CORBA, REST, and then SOAP, and you could probably add a few more if you wished. As you move up the ladder, the portability increases, but the performance mostly decreases. Generally an app that's doing process-to-process communications will have a "sweet spot" where the costs and benefits balance out, although developer familiarity with technologies, shop standards, and other non-technical issues may shift it somewhat.

I should point out, just in case there are those unfamiliar with the sordid details, that RMI does go through firewalls better than the original CORBA did. CORBA was based on grabbing any port that was convenient at the time, which meant that you might as well switch off the firewall entirely. RMI uses ports that are commonly blocked, but they're few in number and (unlike CORBA), predictable.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!