Hy!!
My Problem is that my terminal doesn't know the command java. So i will solve the problem to access the java.exe directly.
Code:
'C:\Program Files\Java\jre6开发者_如何学Go\bin\java.exe' -blabla
Exception:
Wrong Syntax
Please help
For your terminal to recognize command java you must put the entry C:\Program Files\Java\jre6\bin\
in your Environmental Variables in the variable called PATH.
To do so on Windows:
- Right mouse click on "My Computer" and select "properties"
- Go to Advanced tab
- In "Advanced" click on button "Environmental Variables"
- In "System Variables" edit PATH entry adding
;
to the last entry - Save and restart terminal
EDIT: To run it like you want you should use "
instead of '
. So your command will look like:
"C:\Program Files\Java\jre6\bin\java.exe" -version
You probably need to add the path to the installed JAVA code to your enviroment PATH
variable. This will allow you to just type java.exe
at the command line and have it find the executable without needing the full path. Then you could type java -help
to see the options available.
精彩评论