Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当使用 OEM 为 10gas 时,我可以设置一些环境变量。如何从我的应用程序中读取这些信息?我尝试过使用 JNDI、System.getenv()(在 Java 1.4 上引发异常)、System.getProperty() .. 不走运。
您可以将系统属性设置为 VM 参数 ("-Dfoo=bar") 并使用 System.getProperty("foo") 读取它们。您将它们放在 opmn.xml 中,或者如果使用 OC4J 独立版,则放在环境变量 OC4J_JVM_ARGS 中。