问题
I am developing on Eclipse on ubuntu and deploy on weblogic. I am fething the system property values using System.getProperty("key") ... how do I pass "-Dxxx=yyy" argument in Eclipse to my weblogic server.
In Run -> Run configurations I dont have “Arguments” tab for weblogic server
回答1:
I found the solution:
Menu: Run > Run configurations > environment tab
add: JAVA_OPTIONS variable with arguments "-Dxxx=yyy -Daaa=bbb"
回答2:
I assume you have added the server to the Servers-View in Eclipse. If so you can double click on the server to open the configuration. Under the headline General Information
should be a button called Open launch configuration
. When you click this button a new window should be opened. Inside this window navigate to the tab called Arguments
. There you should be able to configure server arguments.
This works at least for me with Tomcat. I think it should work the same way with weblogic.
回答3:
My solution was: In the file ../user_projects/domains/mydomain/bin/startWebLogic.sh I added in the line with SAVE_JAVA_OPTIONS="${JAVA_OPTIONS}" the text -Dxxx=yyy, so the result is --> SAVE_JAVA_OPTIONS="${JAVA_OPTIONS} -Dxxx=yyy".
来源:https://stackoverflow.com/questions/14259452/how-do-i-pass-d-argument-in-eclipse-to-my-weblogic-server