0

referring to this: Runnable jar with jvm args

I know it's possible to build/export a runnable jar from netbeans with embedded VM arguments. But i'm trying to move to eclipse and try stuff out. Is there any way to do this in eclipse without having to get an external launcher like a batch or wrapper?

EDIT: I tried having a second main class start the jar with the arguments and it's still doesn't seem to be working:

    public static void main(String[] args) {

     try {
            Process exec = Runtime.getRuntime().exec("java -Dsun.java2d.opengl=true -splash:splash.png -jar Radiance.jar");
        } catch (IOException e) {

            e.printStackTrace();
        }

     }
Community
  • 1
  • 1
Sammy Guergachi
  • 1,986
  • 4
  • 26
  • 52

1 Answers1

0

The only way to do this is that have the default program, start a second program using your JAR with the desired VM arguments. i.e. the JAR is also your launcher program. You can have any number of main(String[]) in your JAR.

Peter Lawrey
  • 525,659
  • 79
  • 751
  • 1,130