Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add more than one parameter to JAVA_TOOL_OPTIONS

Tags:

java

windows

I want to add the below parameters to JAVA_TOOL_OPTIONS. Could anyone please help me how to add these?

set JAVA_TOOL_OPTIONS=-Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF8

If i add like above, will it work?

I tried setting the above command but i am not sure whether java picks these two parameters or not?

Experts help would be much appreciated.

like image 802
J.P Avatar asked Jun 25 '13 10:06

J.P


1 Answers

I tried setting this variable in my windows environment with Java 7 and doing java -version it gives me it set this variable , as shown as follows

C:\Users\ajduke>set JAVA_TOOL_OPTIONS=-Djava.net.preferIPv4Stack=true -Dfile.e
ncoding=UTF8

C:\Users\ajduke>java -version
Picked up JAVA_TOOL_OPTIONS: -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF
8
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b145)
Java HotSpot(TM) Client VM (build 21.0-b15, mixed mode, sharing)
like image 91
ajduke Avatar answered Oct 19 '22 10:10

ajduke