Jump to: navigation, search

Talk:Starting Eclipse Commandline With Equinox Launcher



I just changed the batch file code snippet because what was there did not work at all (and I am running Windows XP). The dir command was entirely wrong, and when executing as an executable JAR file you don't need to specify the org.eclipse.equinox.launcher.Main part.

I also updated the match pattern in the bash script to reflect reality as well.

Oh - and some time ago I added an Ant 1.7 version that does not involve copying resources around.

--User:Mark_melvin.amis.com 17:45, 15 May 2007 (EDT)


Thoughts in order of priority:

  1. Thank you for contributing and updating this, Mark!
  2. You must be using XP Pro (NT kernel), not XP Home (Windows 95 kernel), which does things differently at the commandline. Can you update the wiki again to reflect which version of XP you tested this with (and which service pack, too)
  3. I believe the equinox jar has more than one Main class (or it used to when I first wrote this). Are you sure it always finds the right one if you aren't explicit about which one you want? More to the point, what's wrong with being explicit? ;-)

--nickb 01:08, 16 May 2007 (EDT)


Hi Nick. Sorry - I didn't realize XP Home and XP Pro woul dbehave differently. I don't have XP home to test my change so I hope I am not ping-ponging here. At any rate, I updated the line to reflect XP Pro SP2.

With regards to the Main class, yes being explicit is good but the problem is I don't think you can specify a main class when using 'java -jar' like that can you? If I try to run the old command line (in particular 'java -jar %EQUINOXJAR% org.eclipse.equinox.launcher.Main ...', and in my case in the context of a headless PDE build) I get the following error:

BUILD FAILED Target "org.eclipse.equinox.launcher.Main" does not exist in the project "Build file wrapper around the PDE build's builder.".

Obviously it is taking the Main class argument as my build target. As far as I know, the 'java -jar' format requires the Main-Class: manifest header, which is defined in the equinox plugin to be 'Main-Class: org.eclipse.equinox.launcher.Main'. That's explicit, isn't it? ;o)


Thanks again.

As to Main class thing, you're right, if the manifest specifies it, that ought to be sufficient. Ultimately, if it works, it works. ;-) --nickb 15:22, 16 May 2007 (EDT)