File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes VM arguments, cmd line vs eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "VM arguments, cmd line vs eclipse" Watch "VM arguments, cmd line vs eclipse" New topic

VM arguments, cmd line vs eclipse

G Lambert

Joined: May 14, 2009
Posts: 11
I have a problem here. I'm trying to 'move' an app (jdk 1.4) that uses JBOSS 4.0 with a lot of batch files that load system properties at start up to run internal to eclipse 3.4 using the same JBOSS server.

Long story short: How does one input the values from batch files needed for the successful loading of the server into eclipse's 'internal' server? At the moment no matter what I try they are null.

When starting the server 'externally' I run a batch file that loads a range of values that populate These are executed in the usual VM '-D' fashion, i.e. -DKISConfigFilePath=%KIS_PROPS% for example. However, when launching the server inside eclipse I thought I could use the Launch Configuration settings window to post -DKISConfigFilePath="C:\myactualpath\" inside the VM Arguments window. However, it seems to ignore the values and I still end up with a stack nullPointer when launching the server where those values should be populated.

If I'm going about this wrong I would like to know. I know this is more an eclipse question, but I am at my wit's end. Apologies.

I appreciate any help.

John de Michele

Joined: Mar 09, 2009
Posts: 600
This is pretty easy:

1. Open up the Java file with your main method in an editor.
2. Right click in the editor.
3. Select Run As->Run Configurations...
4. In the Arguments tab, there are text boxes for program arguments and VM arguments.

G Lambert

Joined: May 14, 2009
Posts: 11
I was entering the arguments in the VM Argument window.

I found out the issue was a trailing white space. Thanks for the reply.
I agree. Here's the link:
subject: VM arguments, cmd line vs eclipse
It's not a secret anymore!