Hello Jaky,

You can put the example component's build.xml file in your own component.
build.xml files are very simple to understand.
It may possible that you will get the compilation error.
This kind of error can be solved by including the JAR files in your
"classpath" definition in build.xml file.

Suppose you are getting following kind of errors :

classes:
    [javac] Compiling 1 source file to
/home/ashish/ofbiz_dev/other/hot-deploy/practice/build/classes
    [javac]
/home/ashish/ofbiz_dev/other/hot-deploy/practice/src/org/ofbiz/practice/PracticeEvents.java:4:
package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpServletRequest;
    [javac]                           ^
    [javac]
/home/ashish/ofbiz_dev/other/hot-deploy/practice/src/org/ofbiz/practice/PracticeEvents.java:5:
package javax.servlet.http does not exist
    [javac] import javax.servlet.http.HttpServletResponse;
    [javac]                           ^

This kind of error is nothing but the Java file is unable to to find the
package.
This kind of error can be solved by putting the "j2eespecs" folder in the
classpath target.

See the below contents :-

    <target name="classpath">
        <path id="local.class.path">
            <fileset dir="../../framework/base/lib" includes="*.jar"/>
            <fileset dir="../../framework/base/lib/commons"
includes="*.jar"/>
            <fileset dir="../../framework/base/lib/j2eespecs"
includes="*.jar"/>
            <fileset dir="../../framework/base/build/lib" includes="*.jar"/>

I hope this will help you to come on right track.

--
Ashish

On Fri, May 23, 2008 at 1:20 AM, jaki <[EMAIL PROTECTED]> wrote:

>
> Hi,
> I was going through Si Chen's tutorials and working on the hello3 app. As
> part of that, I am required to write a java program but it seems to compile
> it you have to use ant and build.xml (new to java, so these concepts are
> new
> to me as well). The tutorial says build.xml can usually be copied over from
> the other ofbiz apps but a cross examination of the different build.xml
> files revealed some differences to me. So, what changes do I have to make
> to
> make it work for my app or I can, as the tut says, just copy it into my app
> folder? Kindly help
> --
> View this message in context:
> http://www.nabble.com/compiling-java-files-tp17418910p17418910.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>

Reply via email to