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.
> set a system property
> 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
> enable assertions
> disable assertions
> -esa | -enablesystemassertions
> enable system assertions
> -dsa | -disablesystemassertions
> disable system assertions
> What am I doing wrong?
> Thank you,
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.