Bug 194483 - [Help] noexec flag no longer works with standalone help & infocenter
Summary: [Help] noexec flag no longer works with standalone help & infocenter
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.3.1   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 204529 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-26 15:02 EDT by Pierre Candela CLA
Modified: 2007-09-25 09:18 EDT (History)
2 users (show)

See Also:


Attachments
patch (2.82 KB, patch)
2007-06-27 14:13 EDT, Adam Archer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Candela CLA 2007-06-26 15:02:26 EDT
With Eclipse 3.3 RC4, when I launch the following command from my Eclipse installation directory
java -cp plugins/org.eclipse.help.base_3.3.0.v20070606.jar org.eclipse.help.standalone.Help -command displayHelp -noexec

I get this error message:
java.lang.Exception: File c:\eclipse\startup.jar does not exists.  Pass a correct -eclipsehome option
	at org.eclipse.help.internal.standalone.Eclipse.ensureStartupJarExists(Eclipse.java:177)
	at org.eclipse.help.internal.standalone.Eclipse.prepareCommand(Eclipse.java:49)
	at org.eclipse.help.internal.standalone.Eclipse.run(Eclipse.java:88)

I get the same error when I try to start the standalone Infocenter with the following command:
java -cp plugins/org.eclipse.help.base_3.3.0.v20070606.jar org.eclipse.help.standalone.Infocenter -command start -noexec

The "-noexec" option works with Eclipse 3.2.2, for instance.
Comment 1 Lee Anne Kowalski CLA 2007-06-26 17:41:53 EDT
Yes, I saw this too. The error message means that the -eclipsehome parameter is required. The -eclipsehome parameter is described here: http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/ua_help_setup_standalone.htm

-eclipsehome eclipseInstallPath - specifies Eclipse installation directory. This directory is a parent to "plugins" directory and eclipse executable. The option must be provided, when current directory from which infocenter is launched, is not the same as Eclipse installation directory.

Add to your command something like:
-eclipsehome <where_eclipse_is_installed>

For example:
java -cp plugins/org.eclipse.help.base_3.3.0.v20070606.jar
org.eclipse.help.standalone.Help -command displayHelp -eclipsehome eclipse -noexec

--Lee Anne
Comment 2 Pierre Candela CLA 2007-06-27 04:32:36 EDT
(In reply to comment #1)
> Yes, I saw this too. The error message means that the -eclipsehome parameter is
> required. 

I don't think that's the problem. As I previously mentioned, the directory from which I launch the standalone help (or infocenter) is the same as my Eclipse installation directory. So, according to the documentation, I shouldn't have to specify an eclipsehome parameter.

Furthermore, the following command works:
java -cp plugins/org.eclipse.help.base_3.3.0.v20070606.jar org.eclipse.help.standalone.Help -command displayHelp

The problem is that startup.jar no longer exists. org.eclipse.help.internal.standalone.Eclipse.java should be modified accordingly.

After applying the following workaround, my "-noexec" commands worked:
http://wiki.eclipse.org/Equinox_Launcher#Startup.jar

Btw, it says "copy this bundle...": is it safe to move the bundle, instead?
Comment 3 Adam Archer CLA 2007-06-27 09:52:27 EDT
My suspicion is that moving the bundle would break your eclipse.exe launcher, though I have not tried it. I imagine it could have other adverse side effects.

I have also reproduced the bug with and without the -eclipsehome flag.

This should certainly be fixed in the 3.4 stream and considered for 3.3.1.
Comment 4 Chris Goldthorpe CLA 2007-06-27 13:59:40 EDT
Yes, we need to fix this. Targeting 3.4.
Comment 5 Adam Archer CLA 2007-06-27 14:13:30 EDT
Created attachment 72635 [details]
patch

This was not an entirely trivial fix. The new startup jar has a version number on it, so it can't be hard coded like it was before. I changed the method that checks for existence of the startup jar to actually look through the plugins directory under eclipsehome for something that starts with "org.eclipse.equinox.launcher" and ends with ".jar". If it does not find one, it throws an exception as before. If it finds one, it returns the path.
Comment 6 Chris Goldthorpe CLA 2007-07-03 14:45:11 EDT
Fixed in HEAD
Comment 7 Chris Goldthorpe CLA 2007-07-03 14:46:46 EDT
Fixed in 3.3.1
Comment 8 Christian Georgi CLA 2007-09-25 09:18:37 EDT
*** Bug 204529 has been marked as a duplicate of this bug. ***