I'm trying to compile a .java file that I created in JCreator however, I am having a problem. I'm getting this:
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.
-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
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
enable assertions with specified granularity
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
load native agent library by full pathname
load Java programming language agent, see java.lang.instrument
show splash screen with specified image
See [url=http://www.oracle.com/technetwork/java/javase/documentation/index.html]Java SE Documentation at a Glance[/url] for more details.
Re: Problem Compiling
I don't know JCreator, but that output comes from attempting to run a program, not compile it.
To compile you use the javac executable, not the java executable as shown in the output.
Maybe someone here can describe the process of how you compile. (there is nothing obvious on the vendor's website!) Otherwise check the product's documentation and make sure you are selecting "compile" rather than "run".
Re: Problem Compiling
Thanks for the reply!
I seemed to figure out the problem even though I don't understand it. Even after building the file then running it I was getting the error.
For some reason when I right click the .java file and click open with JCreator I get that error posted above.
However, if I open JCreator then open the .java file through JCreator it works fine.