I am running the java program on windows server 2012, I want to set the JAVA_OPTS variable and use it, here is how I am doing it:
Open a command prompt in the bin of jdk where it is installed ,and executing the following command :
$set JAVA_OPTS = “-Xdebug , server=y”
Then in the next line in the command prompt only , when I try to run
$java $JAVA_OPTS –cp .Server
(where Server is the name of the java program), I get an error saying that: Could not find or load assembly $JAVA_OPTS. Please let me know what mistake I am doing here. I am not using IDE for this purpose.
on windows you have to set the variable like:
set JAVA_OPTS = “-Xdebug , server=y”
and use it this way
java %JAVA_OPTS% –cp .Server
Windows使用“%JAVA_OPTS%”而不是UNIX / LINUX的“ $ JAVA_OPTS”。您可以通过以下方式检查是否使用JAVA_OPTS更新了环境:echo%JAVA_OPTS%。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.