how do I pass “-D” argument in Eclipse to my weblogic server

别等时光非礼了梦想. 提交于 2020-01-21 12:10:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!