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
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?
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.