I am brand new to the world of java and was working on a tutorial from the java website. I was feeling all cool writing my code and getting it and then when i tried to compile a bycycle program i got a error message reading:

[/Users/Sam/Bicycle/build.xml:29: Compile failed; see the compiler error output for details.]

so then i went to the Copiler error thingy and got alot og code

[<?xml version="1.0" encoding="UTF-8"?>
<project name="Bicycle" default="jar" basedir=".">
    <property name="src" location="src"/>
    <property name="bin" location="bin"/>
    <property name="lib" location="lib"/>
    <property name="dist" location="dist"/>
    <property name="jarfile" location="${dist}/${ant.project.name}.jar"/>
    <property name="compile.debug" value="true"/>

    <fileset id="lib.jars" dir="${lib}">
        <include name="**/*.jar"/>

    <path id="lib.path">
        <fileset refid="lib.jars"/>

    <!-- Stub install target.  Install should depend on the 'jar' target,
         and copy the built objects to the 'dist' directory. -->
    <target name="install" description="Install jar" depends="jar">

    <target name="compile" description="Compile code">
        <mkdir dir="${bin}"/>
        <mkdir dir="${lib}"/>
        <javac srcdir="${src}" destdir="${bin}"
               source="1.3" target="1.3"
               classpathref="lib.path" debug="${compile.debug}">

    <target name="jar" depends="compile" description="Build jar">
        <mkdir dir="${dist}"/>
        <jar jarfile="${jarfile}" basedir="${bin}" manifest="Manifest">
            <!-- Merge library jars into final jar file -->
            <zipgroupfileset refid="lib.jars"/>

    <target name="run" depends="jar" description="Run jar file">
        <java jar="${jarfile}" fork="yes" failonerror="true"/>

    <target name="clean" description="Remove build and dist directories">
        <delete dir="${bin}"/>
        <delete dir="${dist}"/>

being new to this this mines well be spanish
all i know for sure is that this line was highlighted:

classpathref="lib.path" debug="${compile.debug}">

and this is the link to the tutorial i was working on:

and I am woriking on Xcode
so i am wondering is this due to bad progamming by me or something wrong with Xcode and can i fix it?

Edited by pyTony: fixed formating

10 Years
Discussion Span
Last Post by mesamb1

That bicycle program is very simple, from the looks of it.

Therefore I would guess your problem is that you haven't set the path to your compiler correctly or something similar.

It's something you invariably have to do at some point. So you might as well learn it now.


This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.