• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

Build Failed

Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

After running this ANT (for RMI), I came across an Error "Build Failed : Java Returned 1"

I can't understand it. Please can anyone help me.

Sourse code:


<target name="compile">
<javac srcdir="D:\Practise\RMI">
<include name="myRMIClient.java"/>
<include name="myRMIServer.java"/>

<target name="stub" depends="compile">
<rmic classname="myRMIImpl" base="D:\Practise\RMI"/>

<target name="background" depends="stub">
<exec executable="cmd" spawn="true">
<arg line="/c start rmiregistry" />

<target name="RunServer" depends="background">
<jar destfile="D:\Practise\RMI\myRMIServer.jar"
<attribute name="Main-Class" value="myRMIServer"/>

<java jar="D:\Practise\RMI\myRMIServer.jar" fork="true" failonerror="true" >
<pathelement location="D:\Practise\RMI\" />
<pathelement path="myRMIImpl_Skel.class, myRMIImpl_Stub.class," />
<echo message = "Server Running --- Waiting for Client Request " />

Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Was it the java element in the RunServer target that threw the exception? The contents of the classpath element looks wrong in there - it should point at directories or JAR files, not at specific classes... besides - it looks like you are running from "myRMIServer.jar" directly - if you aren't using any classes outside of this JAR or the default Java classes that come with the JDK - you shouldn't need to set the classpath anyway.

Also, usually there is more information about why the build failed... that would help, too, if this doesn't fix your problem...
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic