3

I'm trying to run Equinox and antRunner in "headless" mode with a custom eclipse.ini file. The "--launcher.ini" option should work according to: http://wiki.eclipse.org/Equinox_Launcher .

However, when I run the following command line:

java.exe 
  -cp "C:\Program Files\eclipse\plugins\org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar" \
  org.eclipse.core.launcher.Main \
  --launcher.ini "C:\ini\my_eclipse.ini" \
  -application org.eclipse.ant.core.antRunner \
  -console \
  -data "c:\my_workspace" \
  -file "c:\my_buildfiles\build.xml" \

I get the following error message:

osgi> Unknown argument: --launcher.ini 
Unknown target: C:\ini\my_eclipse.ini
Buildfile: .\build.xml

How can I load a custom eclipse.ini when starting Eclipse with Equinox from the command line?

thesam
  • 130
  • 7

1 Answers1

2

The problem is that you are trying to launch using only the Java part of the launcher, while the wiki page describes the arguments for the native part of the launcher (eclipse.exe or any name you want).

The launcher.ini describes how to setup the Java process (memory size, vm location, arguments to vm, etc.). So, it makes sense that you pass refernece to the launcher.ini to the native launcher.

Danail Nachev
  • 19,231
  • 3
  • 21
  • 17
  • 1
    This is my conclusion after trying almost everything to get the launcher jar to take my .ini file... The .ini file contains VM arguments and command-line arguments for starting the Java application in the launcher jar. Passing this information is the responsibility of whoever starts Java to run the Java application. Normally this would be the native launcher that reads the .ini file and passes the options to the Java launcher application. When you start this application directly, you are responsibly for passing these arguments to Java yourself. It will not read the .ini by itself. – Henno Vermeulen Aug 02 '15 at 14:16