Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

ant run

Thread view: 
gk - 30 Mar 2006 05:53 GMT
i have a root directory.

this root directory has

com.web   package and compiled classes  and a "lib" directory

c:\ROOT\com\web
c:\ROOT\lib
c:\ROOT\Main.java

i have a java program Main.java  at C:\ROOT  which imports those
packaged classes .

i want to run this Main.java  program.

How do i write my build.xml ?

the below does not work

<java classname="Main">

        <classpath>
          <pathelement location="lots of jars"/>
          <pathelement path="${java.class.path}"/>
        </classpath>
</java>
Wibble - 30 Mar 2006 13:18 GMT
> i have a root directory.
>
[quoted text clipped - 22 lines]
>          </classpath>
> </java>

YOu have to compile it first.
gk - 30 Mar 2006 13:51 GMT
the class has been compiled.
i have used the <javac   tag in my build.xml.  and  it has been
compiled.

how to run the code ?

i have these peoperties.

<property name="src.dir"     value="src"/>
<property name="classes.dir" value="classes"/>
<property name="lib.dir"     value="lib"/>

what should i  do to run a java program ?

in this example from the manual :
-------------------------

<java classname="Main">

       <classpath>
       <pathelement location="lots of jars"/>
       <pathelement path="${java.class.path}"/>
     </classpath>
</java>

what is java.class.path ?  what should i write in my build.xml for this
?
what is location=? i have lots of jars in the lib directory. how do i
use it here ?

to run a java  program in Ant , is it necessary to make JAR first ?

can you please provide  a sample example build.xml about running  a
java program ?

thank you

i have a  lib

> > i have a root directory.
> >
[quoted text clipped - 24 lines]
> >
> YOu have to compile it first.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.