简体   繁体   中英

Where is main config file in the Oracle Java JVM?

Where is main config file in the Oracle Java JVM?

I need to hardcode some config to the JVM, like config:

javax.xml.accessExternalSchema=all
http.proxyHos=proxy
http.proxyPort=8080
javax.net.ssl.trustStore=c:/qqq

I tried to write it to the management.properties, but it doesn't helped...

The JAVA_TOOL_OPTIONS environment variable allows you to set options like system properties globally in your environment. This means they will be picked up by every java command invokation.

Some examples: http://developer-should-know.tumblr.com/post/119751759112/javatooloptions-environment-variable

System.setProperties(properties object);

This will set the system properties.

If you want to set a specified property, then use

System.setProperty(key, value);//Both key and value should be string.

NOTE: This will first check the permission and then set it. If permission denied, then SecurityException may occur.

I am not sure you are looking for the same or not, but you can modify deployment.properties which is under below location in Windows:

C:\\Users\\user-name\\AppData\\LocalLow\\Sun\\Java\\Deployment

Note: Change the user-name with your userName.

Have a look on the below link:

Deployment Configuration

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM