Reputation: 19
Command : "C:\Program Files\Java\jdk1.7.0_07\bin\java.exe" -classpath "C:\Users\Zachsta\Downloads;C:\Program Files\Java\jdk1.7.0_07\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_07\lib\dt.jar;C:\Program Files\Java\jdk1.7.0_07\lib\tools.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext\zipfs.jar" Directory : C:\Users\Zachsta\Downloads
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.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
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
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
Process completed.
Upvotes: 0
Views: 1354
Reputation: 11
Don't bother your self for setting environment.
I had same problem and I was tired of it solving, this is very huge problem. Reason is you have to be known that Jcreator is working on x86 architecture, so you must install 32 bit Java Version, and in the configuration of Jcreator,
you must choose the path of 32 bit version of Java as -->
(C:\Program Files (x86)\Java\jdk1.8.0_66 )
Any time you may get this error so make sure to check the path of Java in Config of Jcreator.
My problem solved, hope it will work.
Upvotes: 1
Reputation: 33177
You haven't told Java to run anything - you just gave it a long classpath.
Append the name of the class with a public static void main(String[])
to the command (i.e.: java -classpath stuff MyClassWithMain
)
Also note that files inside the java lib folder do not need to be specified manually.
Upvotes: 0