Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to use RMI with Eclipse
How to use RMI with Eclipse [message #157523] Thu, 06 May 2004 14:24 Go to next message
Eclipse UserFriend
Originally posted by: andras.basler.sap.com

Hi,

I try to use RMI. I allways get a classnotfoundexception bescause eclipse
is not finding the stub-class.

I allready tried to put the stub in the classpath, but it doesnŽt work.

Have anybody an idea?

Thanks
Andreas
Re: How to use RMI with Eclipse [message #157619 is a reply to message #157523] Thu, 06 May 2004 21:08 Go to previous messageGo to next message
Genady Beryozkin is currently offline Genady BeryozkinFriend
Messages: 410
Registered: July 2009
Senior Member
If you are developing an RMI application, you can use the RMI Plugin for
Eclipse.
(It's free for personal use.)
Website: http://www.genady.net/rmi/

If you are talking about developing a plugin that communicates with the
outer world using RMI,
it's a little complicated but I think it's doable.

Genady

Andreas Basler wrote:

>Hi,
>
>I try to use RMI. I allways get a classnotfoundexception bescause eclipse
>is not finding the stub-class.
>
>I allready tried to put the stub in the classpath, but it doesnŽt work.
>
>Have anybody an idea?
>
>Thanks
>Andreas
>
>
>

--
Genady Beryozkin
http://www.genady.net/
Re: How to use RMI with Eclipse [message #158685 is a reply to message #157523] Thu, 13 May 2004 21:02 Go to previous message
Eclipse UserFriend
Originally posted by: junk.junk.net

Andreas Basler wrote:
> Hi,
>
> I try to use RMI. I allways get a classnotfoundexception bescause eclipse
> is not finding the stub-class.
>
> I allready tried to put the stub in the classpath, but it doesnŽt work.
>
> Have anybody an idea?
>
> Thanks
> Andreas
>
In order to work with RMI in Eclipse I've done the following things.

1. Created a small ant build.xml file that will rmic the needed files.
An example is below.

2. Added the ant build to the standard build process. From the project
properties window select "Builders". Then select "New..." and then "Ant
Build". Find the build.xml and select the correct rmic target.
Ensure that the ant build comes after the "Java Builder".

Once this is done the rmic compiler will be invoked each time the
project is rebuilt.

3. Modify my local java.policy file. This is located in the users home
directory. Example java.policy file is given below.

4. Once all of the above is setup I run the nameserver from within
Eclipse, then launch the server and the client.


Cheers

Frank Rouse



Ant build.xml file

<?xml version="1.0"?>
<project name="rmi_compile" default="rmic" basedir=".">

<!-- Standard Directory Identifiers-->
<property name="java.dest.dir" value="${basedir}"/>

<!-- RMI Target -->
<target name="rmic" >
<rmic
base="${java.dest.dir}"
classname="engine.ComputeEngine"
/>
</target>

</project>

java.policy file

grant codeBase
"file:///d:/Devel/Eclipse/3.0M6_Sandbox/RMI_example_local/*" {
permission java.net.SocketPermission "47.142.166.14:1024-65535",
"accept, connect, listen, resolve";
permission java.net.SocketPermission "localhost:1014-65535", "accept,
connect, listen, resolve";
};
Previous Topic:refactoring inspires net activity
Next Topic:Compiler error (assert keyword) : It just doesn't work
Goto Forum:
  


Current Time: Sat Jul 27 13:27:43 GMT 2024

Powered by FUDForum. Page generated in 0.03736 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top