Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319459

Summary: the help doc about the -vm argument is not clear enough
Product: [Eclipse Project] Platform Reporter: redstun
Component: DocAssignee: Platform-Doc-Inbox <platform-doc-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: bokowski
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description redstun CLA 2010-07-10 06:01:48 EDT
Build Identifier: Helios

In the 'Running Eclipse' page, http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm, more specifically, the 'Eclipse Startup Parameters' table, the explannation of the -vm argument is not clear enough, it asks for "The location of Java Runtime Environment (JRE)", I tried to pass it %JAVA_HOME% (which has a valid value), and C:\jdk\ (valid as well), and C:\jdk\jre, and C:\jdk\jre\bin\client\jvm.dll, none of them works.

Luckily the laucher reports that it requires a directory where it can find either "default.ee", or "javaw.exe", or "jvm.dll"

Note the typo here in "default.ee", it seems should be "default.exe", in which the 'x' is missing from the file extension.

Returning to the documentation part, I found an example in that help page, which indicates that "c:\jdk1.4.2\jre\bin\javaw" is also a valid value, hmmm, there's some inconsistency between the doc and the error message as well.

In case the an invalid path is passed to the -vm argument, it just says "..No Java virtual machine was found after searching the following locations..", not giving indication of the expected form/pattern of value.

Conclusion
1. in the table "Eclipse Startup Parameters', for the -vm argument, it should tell that it needs - either 
  A) the path to either the java executable 
  or 
  B)the parent directory of the java executable (and/or jvm.dll thing).

2. the error message should be improved, either to present the same info in the doc, or to provide a simple example then a link to the doc.

BTW, why I cannot pass C:\jdk\jre\bin\client\jvm.dll, at least in the About Eclipse dialog, Configuration tab, that is the reported value.

Reproducible: Always

Steps to Reproduce:
1. open eclipse.ini, provide a wrnong vm location to the -vm argument, such as an not existing path, and an existing path but not including the jvm luancher
2. check the error message
3. check the online doc http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm
Comment 1 redstun CLA 2010-07-10 06:22:22 EDT
So I guess I'm asking for change in both the doc and the message in the launcher. the current situation is a little messy. 

I feel that besides fixing the doc and error message, the code to find/locate the jvm launcher should be consolidated, probably the user should just pass in JAVA_HOME (such as c:\jdk) or JRE_HOME (such as c:\jdk\jre) to the -vm argument.

Then the launcher should follow the jdk/jre directory layout to locate the jvm launcher.

Regarding where to use the client vm or server vm, this should be decided by the -client/-server string passed to the -vmargs parameter. This way it's not necessary to ask for the c:\jdk\jre\bin\client, or c:\jdk\jre\bin\server to use the expected jvm.dll

This way the situation would be dramatically simplified, IMHO.

For this I change the Component to "Platform/IDE" although I mean "Platform/Launcher".

Thanks
Comment 2 Boris Bokowski CLA 2010-07-30 17:10:36 EDT
The launcher belongs to the Equinox project. (No, there is no way for you to know this)
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:11:01 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 4 Eclipse Genie CLA 2021-10-15 13:04:03 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.