2

For example:

java -Dcom.siebel.management.jmxapi.cfgFileName=C:\monitor\1srvr.xml Component

Where (in Eclipse) do I configure the -D flag with the name and the value? Component is a class file.

When I run my code in Eclipse, I get the following exception:

SEVERE: Configuration file name must be specified in com.siebel.management.jmxapi.cfgFileName system property
Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.siebel.management.jmxapi.JmxComponent.getState(JmxComponent.java:169)
    at Component.main(Component.java:21)
Caused by: java.lang.IllegalArgumentException: Configuration file name must be specified in com.siebel.management.jmxapi.cfgFileName system property
    at com.siebel.management.jmxapi.SiebelAgentUtil.<init>(SiebelAgentUtil.java:78)
    at com.siebel.management.jmxapi.SiebelAgentUtil.<clinit>(SiebelAgentUtil.java:43)
    ... 2 more
Melebius
  • 6,183
  • 4
  • 39
  • 52
Hesham Yassin
  • 4,341
  • 2
  • 21
  • 23

3 Answers3

3

There are a couple of easy ways to do this in Eclipse.

1) From the very top bar select Run->Run Configurations

or

2) Right click your project and select Run As->Run Configurations

Next, the common step is to select your project class(those that contain main method) in the left pane and in the corresponding neighboring pane on the right choose Arguments

Set the desired arguments(Program or VM arguments)

ZakiMak
  • 2,072
  • 2
  • 17
  • 26
  • According to my experience, `-D` flags should go to **VM arguments** in full form, i.e. including the initial `-D`. – Melebius Mar 28 '18 at 10:44
0

Editing the vm args of eclipse

Under the directory where eclipse has been installed you can find a file named eclipse.ini. Edit it to add additional parameters under the vmargs section.

Example

-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m

Editing the vm args of an application inside eclipse

If you want to edit this for an application that is run from eclipse, you'll need to provide the information under the arguments tab.

Deepak Bala
  • 11,095
  • 2
  • 38
  • 49
0

To solve my problem I did:

System.setProperty("com.siebel.management.jmxapi.cfgFileName", "C:\\siebelmonitor\\1srvr.xml");
double-beep
  • 5,031
  • 17
  • 33
  • 41
Hesham Yassin
  • 4,341
  • 2
  • 21
  • 23