Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » ANT rmic task failing from Eclipse
ANT rmic task failing from Eclipse [message #94636] Thu, 11 September 2003 11:55 Go to next message
Eclipse UserFriend
Originally posted by: mewing4.csc.com

Hi:

I'm trying to set up a project so that RMI *_Skel and *_Stub files are
generated automatically as part of a build, but I'm having a problem.
My environment is: OS - Win2000, Eclipse v. 2.1.1. I've created a test
project and defined the following build.xml file in it:

<?xml version="1.0" encoding="UTF-8"?>
<project name="HELLO.makeremote" default="makeremote" basedir=".">
<target name="makeremote" description="Build _Skel and _Stub
files">
<rmic classname="examples.hello.HelloImpl" base="bin"/>
</target>
</project>

I've set this up as a project builder and it is being invoked as
expected, however I get an ant error from the rmic task. Here's the
output to the console

Buildfile: C:\Tools\eclipse\workspace\Hello\build.xml

makeremote:
[rmic] RMI Compiling 1 class to
C:\Tools\eclipse\workspace\Hello\bin
[rmic] BUILD FAILED:
file:C:/Tools/eclipse/workspace/Hello/build.xml:5: Cannot use SUN
rmic, as it is not available. A common solution is to set the
environment variable JAVA_HOME or CLASSPATH.
Total time: 671 milliseconds

My JAVA_HOME and CLASSPATH environment variables look okay to me and
if I invoke ant from the Windows command prompt everything works just
peachy. It only fails when ant is lauched through Eclise.

Can anybody tell me what's going on here?

Mike
Re: ANT rmic task failing from Eclipse [message #94682 is a reply to message #94636] Thu, 11 September 2003 12:18 Go to previous messageGo to next message
Eclipse UserFriend
Do you have a tools.jar on your Ant runtime classpath?
(Window>Preferences>Ant>Runtime)
Starting eclipse using the -vm arg will allow Eclipse to automatically add
the tools.jar to your Ant runtime classpath.
The JAVA_HOME etc message is coming through from Apache Ant and are a bit of
a red herring.

HTH
Darins

"Ewing, Mike" <mewing4@csc.com> wrote in message
news:bjq5mp$ftj$2@eclipse.org...
> Hi:
>
> I'm trying to set up a project so that RMI *_Skel and *_Stub files are
> generated automatically as part of a build, but I'm having a problem.
> My environment is: OS - Win2000, Eclipse v. 2.1.1. I've created a test
> project and defined the following build.xml file in it:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="HELLO.makeremote" default="makeremote" basedir=".">
> <target name="makeremote" description="Build _Skel and _Stub
> files">
> <rmic classname="examples.hello.HelloImpl" base="bin"/>
> </target>
> </project>
>
> I've set this up as a project builder and it is being invoked as
> expected, however I get an ant error from the rmic task. Here's the
> output to the console
>
> Buildfile: C:\Tools\eclipse\workspace\Hello\build.xml
>
> makeremote:
> [rmic] RMI Compiling 1 class to
> C:\Tools\eclipse\workspace\Hello\bin
> [rmic] BUILD FAILED:
> file:C:/Tools/eclipse/workspace/Hello/build.xml:5: Cannot use SUN
> rmic, as it is not available. A common solution is to set the
> environment variable JAVA_HOME or CLASSPATH.
> Total time: 671 milliseconds
>
> My JAVA_HOME and CLASSPATH environment variables look okay to me and
> if I invoke ant from the Windows command prompt everything works just
> peachy. It only fails when ant is lauched through Eclise.
>
> Can anybody tell me what's going on here?
>
> Mike
>
>
Re: ANT rmic task failing from Eclipse [message #95237 is a reply to message #94682] Fri, 12 September 2003 10:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mewing4.csc.com

Many thanks Darins. You nailed it and saved me a ton of time.

Mike
Re: ANT rmic task failing from Eclipse [message #95462 is a reply to message #94636] Sat, 13 September 2003 16:31 Go to previous messageGo to next message
Eclipse UserFriend
An even better idea would be to use the RMI Plugin which automatically
runs the RMI compiler when needed.

You can download it from http://www.genady.net/rmi/

Genady

Ewing, Mike wrote:

> Hi:
>
> I'm trying to set up a project so that RMI *_Skel and *_Stub files are
> generated automatically as part of a build, but I'm having a problem.
> My environment is: OS - Win2000, Eclipse v. 2.1.1. I've created a test
> project and defined the following build.xml file in it:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="HELLO.makeremote" default="makeremote" basedir=".">
> <target name="makeremote" description="Build _Skel and _Stub
> files">
> <rmic classname="examples.hello.HelloImpl" base="bin"/>
> </target>
> </project>
>
> I've set this up as a project builder and it is being invoked as
> expected, however I get an ant error from the rmic task. Here's the
> output to the console
>
> Buildfile: C:\Tools\eclipse\workspace\Hello\build.xml
>
> makeremote:
> [rmic] RMI Compiling 1 class to
> C:\Tools\eclipse\workspace\Hello\bin
> [rmic] BUILD FAILED:
> file:C:/Tools/eclipse/workspace/Hello/build.xml:5: Cannot use SUN
> rmic, as it is not available. A common solution is to set the
> environment variable JAVA_HOME or CLASSPATH.
> Total time: 671 milliseconds
>
> My JAVA_HOME and CLASSPATH environment variables look okay to me and
> if I invoke ant from the Windows command prompt everything works just
> peachy. It only fails when ant is lauched through Eclise.
>
> Can anybody tell me what's going on here?
>
> Mike
>
>
Re: ANT rmic task failing from Eclipse [message #95893 is a reply to message #95462] Mon, 15 September 2003 14:40 Go to previous message
Eclipse UserFriend
Originally posted by: mewing4.csc.com

"Genady" <eclipse@genady.org> wrote in message
news:3F637EA9.8090108@genady.org...
> An even better idea would be to use the RMI Plugin which
automatically
> runs the RMI compiler when needed.
>
> You can download it from http://www.genady.net/rmi/
>
> Genady

Thanks Genady. I will check this out.

Mike
Previous Topic:Plug-in needs to load the class which source it's called on, got ClassNotFoundException
Next Topic:Eclipse
Goto Forum:
  


Current Time: Tue Jul 22 02:52:23 EDT 2025

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

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

Back to the top