Reputation: 33
Trying to set on variable up in my Command Prompt but not sure what syntax to use.
I've tried:
SET %JAVA_HOME%\bin\java -jar helloworld.jar=HELLO_WORLD
SET HELLO_WORLD
and also:
SET "%JAVA_HOME%\bin\java -jar helloworld.jar=HELLO_WORLD"
SET HELLO_WORLD
None of them seem to work. Anyone have any ideas how to get a variable for the above?
Thanks.
Upvotes: 0
Views: 48
Reputation: 291
you have to place the variable-name in front auf the equal-sign and the commandline:
C:\Windows\system32>set HELLO_WORLD=%JAVA_HOME%\bin\java -jar helloworld.jar
C:\Windows\system32>set HELLO_WORLD
HELLO_WORLD=%JAVA_HOME%\bin\java -jar helloworld.jar
Upvotes: 1