I'm working on my project using Eclipse 3.3.2, Java 1.4.2. Mu project is based on Java 1.4.
I've been reading the forum pages but I'm still not too sure how to generate the RMI stub. I tried to run "rmic -d <class name>" on the command prompt but it fails. Anyone can provide more detailed instructions?
Sorry abt this question. I'm not too sure abt RMI since I've not had any experience with it.
You can't use this JDK, or you'll fail In your assignment, you can find this statement:
"You may develop your code using any implementation of the Java 2 platform, but the submission that you return must have been tested and shown to work under a production (not development) version of the Sun Microsystems' Java 2 platform and that platform must not have been superseded by a new production version for more than 18 months by the time you make your submission."
Hey partner. Sorry for not effectively answering your question it's just that, for my server, I did not generate any stub all I have is an interface that extends Remote, and in the implementation, I call UnicastRemoteObject.exportObject.
My reading of the requirements for using a recent JDK is that you are allowed to use JDK 1.4 for development purposes, as long as you verify that it works with JDK 6 (or later if 7 comes out) before you submit it.
Personally I recommend against this though, as there is also the requirement that "Use of functionality provided by the core Java classes will be preferred to your own implementation of that functionality" - if you are not using the latest JDK for development, then there is a greater chance of you developing your own solution for some class or method that exists in the later JDK.
Originally posted by Roberto Perillo: ... I did not generate any stub ...
From the instructions I received (yours may be different): You must provide all classes pre-installed so that no dynamic class downloading occurs.
If you have not generated stubs, and you are using JDK 5 or later, then they will be dynamically generated and dynamically downloaded.
Personally I think that this is not checked for by the assessors. But I would not want to take the risk.
I didn't exactly understand what they really meant by this requirement, you know... I thought that it was just telling us not to use codebase in RMI, you know... and also, since the code that would be downloaded from the server would already be in the runme.jar file, I thought it would be ok. Anyway, let's see what happens now.
Simply in the scjd book you can find the command that generate stub class as follow : rmic [name of the remote class] ex: "rmic com.apple.cat.clock.WelcomeRemote" for your command: rmic -d .. here -d is used to specify where to put the generated stub class. complete example: the remote class found on : c:\project\build\com\apple\cat\clock\WelcomeRemote.class and defined in this class package as follow: package com.apple.cat.clock; so the codebase is "c:\project\build\." go to code base folder : c:\project\build\" and issue the above command: "rmic com.apple.cat.clock.WelcomeRemote" and after that you will see the WelcomeRemote_stub.class in the same folder: "c:\project\build\com\apple\cat\clock"
Neo Say Bin
Joined: May 19, 2008
I used the RMI Eclipse plugin to generate the RMI stub and the stub files are found in the "remote" folder.
I'm trying to execute the application using Eclipse 3.3, Java SDK 5, Windows OS, no firewall.
So not too sure why I can't execute the application in the network client mode.
Thks in advice for help rendered
Joined: Sep 04, 2005
i add my notes just for information about how can you generate the stub anyway;
for your problem i think you must check if the PORT number on rmi server is equal the port number the clinet connect to