Question:
I have gotten the java and javac commands to work, but when I use the javaw, it does nothing?
Theran Slinkard
2011-12-21 18:22:16 UTC
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.


C:\Users\USERNAMEHERE>java


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
-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
-classpath
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D=
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:
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[:...|:]
-enableassertions[:...|:]
enable assertions with specified granularity
-da[:...|:]
-disableassertions[:...|:]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:[=]
load native agent library , e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:[=]
load native agent library by full pathname
-javaagent:[=]
load Java programming language agent, see java.lang.instrument

-splash:
show splash screen with specified image
See http://java.sun.com/javase/reference for more details.


C:\Users\USERNAMEHERE>javac


Usage: javac
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
sed
-classpath Specify where to find user class files and annotati
on processors
-cp Specify where to find user class files and annotati
on processors
-sourcepath Specify where to find input source files
-bootclasspath Override location of bootstrap class files
-extdirs Override location of installed extensions
-endorseddirs Override location of endorsed standards path
-proc:{none,only} Control whether annotation processing and/or compil
ation is done.
-processor [,,...] Names of the annotation processors
to run; bypasses default discovery process
-processorpath Specify where to find annotation processors
-d Specify where to place generated class files
-s Specify where to place generated source files
-implicit:{none,class} Specify whether or not to generate class files for
implicitly referenced files
-encoding Specify character encoding used by source files
-source Provide source compatibility with specified release

-target Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-Akey[=value] Options to pass to annotation processors
-X Print a synopsis of nonstandard options
-J Pass directly to the runtime system
-Werror Terminate compilation if warnings occur
@ Read options
Four answers:
?
2011-12-21 18:35:54 UTC
javaw has always worked like that. The purpose of javaw is to start up a java program without attaching it to a console window. Since it's not using the console window that started it, it has nowhere to output the same help text. Programs started with javaw are usually Java applications that will create, populate and render their own windows without writing anything to the console. If you don't specify the name of a class to execute, javaw will start up the Java JVM, find nothing to do, and exit.



javaw will, however, pop up a dialog box if it can't start up properly. To see that it is working, type something like: javaw noclassbythisname or javaw -fred and you should get error messages in dialog boxes.
b4iquit
2011-12-22 00:05:18 UTC
The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.



To demostrate that javaw works use the command javaw anything

You will get an error ping message saying it cannot find the class anything





Be safe, be sage
2016-10-02 04:38:52 UTC
you certainly might desire to characteristic the area of your JDK's bin itemizing to the path of you residing house windows, some utility additionally require a equipment ecosystem variable with the call "JAVA_HOME" and the cost is the path on your JDK. the path statement, tells the residing house windows working equipment the place to seem for an executable document.
2011-12-21 18:24:09 UTC
Did you specify your environmental path for Javaw as well? Or just java and javac?


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...