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"/>
    </fileset>

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

    <!-- 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>

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

    <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"/>
        </jar>
    </target>

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

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

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:
http://java.sun.com/docs/books/tutorial/java/concepts/class.html

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?

Member Avatar for iamthwee

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.

???

I will look at and see if that helps at all

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.