简体   繁体   English

Oracle Java JVM中的主配置文件在哪里?

[英]Where is main config file in the Oracle Java JVM?

Where is main config file in the Oracle Java JVM? Oracle Java JVM中的主配置文件在哪里?

I need to hardcode some config to the JVM, like config: 我需要将一些配置硬编码到JVM,例如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... 我试图将其写入management.properties,但并没有帮助...

The JAVA_TOOL_OPTIONS environment variable allows you to set options like system properties globally in your environment. JAVA_TOOL_OPTIONS环境变量允许您在环境中全局设置选项,例如系统属性。 This means they will be picked up by every java command invokation. 这意味着它们将在每次Java命令调用中被拾取。

Some examples: http://developer-should-know.tumblr.com/post/119751759112/javatooloptions-environment-variable 一些示例: 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. 如果权限被拒绝,则可能会发生SecurityException

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: 我不确定您是否要查找相同的内容,但是可以修改Windows中以下位置下的deployment.properties

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

Note: Change the user-name with your userName. 注意:用用户名更改用户名。

Have a look on the below link: 看看下面的链接:

Deployment Configuration 部署配置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Oracle Java JVM for Java 8中实际存储的“ tz”时区数据库在哪里? - Where is the 'tz' time zone database physically stored in the Oracle JVM for Java 8? OpenJDK JVM是否与Oracle Java SE JVM相同? - Is the OpenJDK JVM the same as the Oracle Java SE JVM? JAVA,JVM,多个Main方法 - JAVA, JVM, Multiple Main methods 显示bash:/ usr / lib / jvm / java-7-oracle = / usr / lib / jvm / java-8-oracle:终端中没有这样的文件或目录 - showing bash: /usr/lib/jvm/java-7-oracle=/usr/lib/jvm/java-8-oracle: No such file or directory in terminal 重新启动Wildfly服务器期间出错:“ / usr / lib / jvm / java-8-oracle / bin / java”:没有这样的文件或目录 - Error during restart wildfly server : ”/usr/lib/jvm/java-8-oracle/bin/java”: No such file or directory 在JAVA中重新加载Kerberos配置而不重新启动JVM - Reload Kerberos config in JAVA without restarting JVM 从批处理文件调用Java-如何拆分JVM和主要方法参数? - Call java from batch file - how to split JVM and main method parameters? Java获取main所在的Java文件的dir的路径 - Java get path of dir of java file where main is located 请参考jvm.config中的相关文件 - Refer to relative file in jvm.config 调试在Oracle JVM中运行的Java代码 - Debugging a Java Code running in Oracle JVM
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM