asant problem- building the hello1 example

Discussions

General J2EE: asant problem- building the hello1 example

  1. asant problem- building the hello1 example (2 messages)

    asant problem- building the hello1 example
    Author: itay01 Jan 8, 2004 11:06 AM
     
    I am trying to run the first example from the tutorial.I followed the instructions as described in the tutorial and configured the environment variables. However, when I am trying to build the hello1 example I get the following message, as if I wrote just "java" in the command line:


    Usage: java [-options] class [args...]
               (to execute a class)
       or java [-options] -jar jarfile [args...]
               (to execute a jar file)

    where options include:
        -client to select the "client" VM
        -server to select the "server" VM
        -hotspot is a synonym for the "client" VM [deprecated]
                      The default VM is client.

        -cp <class search path of directories and zip/jar files>
        -classpath <class search path of directories and zip/jar files>
                      A ; separated list of directories, JAR archives,
                      and ZIP archives to search for class files.
        -D<name>=<value>
                      set a system property
        -verbose[:class|gc|jni]
                      enable verbose output
        -version print product version and exit
        -showversion print product version and continue
        -? -help print this help message
        -X print help on non-standard options
        -ea[:<packagename>...|:<classname>]
        -enableassertions[:<packagename>...|:<classname>]
                      enable assertions
        -da[:<packagename>...|:<classname>]
        -disableassertions[:<packagename>...|:<classname>]
                      disable assertions
        -esa | -enablesystemassertions
                      enable system assertions
        -dsa | -disablesystemassertions
                      disable system assertions

    What am I doing wrong?
    Thank you,
    Itay

    Threaded Messages (2)

  2. asant problem- building the hello1 example

    > Author: itay01 Jan 8, 2004 11:06 AM
    >  
    > I am trying to run the first example from the tutorial.I followed the instructions as described in the tutorial and configured the environment variables. However, when I am trying to build the hello1 example I get the following message, as if I wrote just "java" in the command line:
    >
    >
    > Usage: java [-options] class [args...]
    >            (to execute a class)
    >    or java [-options] -jar jarfile [args...]
    >            (to execute a jar file)
    >
    > where options include:
    >     -client to select the "client" VM
    >     -server to select the "server" VM
    >     -hotspot is a synonym for the "client" VM [deprecated]
    >                   The default VM is client.
    >
    >     -cp <class search path of directories and zip/jar files>
    >     -classpath <class search path of directories and zip/jar files>
    >                   A ; separated list of directories, JAR archives,
    >                   and ZIP archives to search for class files.
    >     -D<name>=<value>
    >                   set a system property
    >     -verbose[:class|gc|jni]
    >                   enable verbose output
    >     -version print product version and exit
    >     -showversion print product version and continue
    >     -? -help print this help message
    >     -X print help on non-standard options
    >     -ea[:<packagename>...|:<classname>]
    >     -enableassertions[:<packagename>...|:<classname>]
    >                   enable assertions
    >     -da[:<packagename>...|:<classname>]
    >     -disableassertions[:<packagename>...|:<classname>]
    >                   disable assertions
    >     -esa | -enablesystemassertions
    >                   enable system assertions
    >     -dsa | -disablesystemassertions
    >                   disable system assertions
    >
    > What am I doing wrong?
    > Thank you,
    > Itay

    Hi Itay,

       Are you trying to build or run your application? If it is build then the command you should be using is javac instead of java.
    For e.g. javac hello1.java

    and if you are running your program you should use java

    For e.g. java hello1 where hello1 is your class name and hello1.java is your file name.

    Thanks
    Saju Thomas
  3. asant[ Go to top ]

    just run "asant" at the command line in the same directory where build.xml file for hello1 resides.