Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 188616 - [launcher] -showversion VM argument not printed to console
Summary: [launcher] -showversion VM argument not printed to console
Status: CLOSED WONTFIX
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Launcher (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-23 06:40 EDT by Markus Keller CLA
Modified: 2021-09-01 03:09 EDT (History)
3 users (show)

See Also:


Attachments
default.ee file with javaw.exe and java.exe variants (341 bytes, application/octet-stream)
2010-05-06 08:33 EDT, Martin Oberhuber CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2007-05-23 06:40:06 EDT
I20070523-0010

Running Eclipse with
> eclipsec.exe -data abc -consolelog -console -vmargs -showversion

... should print the VM version to the console, e.g.:

java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)

This used to work with the old launcher but doesn't work any more with eclipse.exe nor with eclipsec.exe.
Comment 1 Thomas Watson CLA 2007-07-31 16:02:52 EDT
This is still an issue with the latest launchers.

Andrew, is it possible the native launcher has not connected the streams in time to see the message get printed?
Comment 2 Dani Megert CLA 2007-10-29 10:47:25 EDT
Ping. Due to this I have to use my own scripts which don't use the *.exe.
Comment 3 Andrew Niefer CLA 2007-10-29 11:30:28 EDT
If it is not working with eclipsec, then I doubt it is a streams problem.

Rather, I expect that it is java.exe that handles this particular argument.  This means that we would need to handle this argument ourselves when launching via JNI.

The easiest way to do this would be in Main by checking the java.vm.name, java.vm.version, java.runtime.name, java.runtime.version system properties.
Comment 4 Martin Oberhuber CLA 2010-05-06 08:33:50 EDT
Created attachment 167290 [details]
default.ee file with javaw.exe and java.exe variants

Andrew is right, this works when using the java.exe VM:

D:\Eclipse\eclipse3.6m7\eclipse>eclipsec -vm D:\Apps\Java\jdk1.5.0_11\bin\java.e
xe -vmargs -showversion
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

But it fails with the JNI Launcher, which seems to be the default:

D:\Eclipse\eclipse3.6m7\eclipse>eclipsec -vm D:\Apps\Java\jdk1.5.0_11\jre\bin\cl
ient\jvm.dll -vmargs -showversion


One could argue that the "eclipsec" launcher should pick the java.exe VM by default rather than the JNI method when both are available, such that this would work out of the box. In fact with attached default.ee file put into ${eclipse.home}\jre\bin , the eclipsec launcher does properly pick the java.exe console variant instead of the non-console javaw.exe variant.

I'm not sure what advantages the JNI launching variant has over java.exe console launching (other than it does seem to be a little bit faster).

Andrew & Team, would it be acceptable to disable JNI launching from the eclipsec launcher, when a console variant is available?

Markus / Dani, would it be acceptable for you that you explicitly specify -vm on the commandline in order to get the -showversion output (such that this could be closed as WORKSFORME or WONTFIX)?
Comment 5 Markus Keller CLA 2010-11-03 07:12:38 EDT
> Markus / Dani, would it be acceptable for you that you explicitly specify -vm
> on the commandline in order to get the -showversion output (such that this
> could be closed as WORKSFORME or WONTFIX)?

That kind of defeats the point of this bug. If you already pass a vm, then you likely know what version it is. So it's not WORKSFORME. You could set it to WONTFIX, but I'd still prefer the solution at the end of comment 3.
Comment 6 Dani Megert CLA 2010-11-03 07:30:24 EDT
(In reply to comment #5)
> > Markus / Dani, would it be acceptable for you that you explicitly specify -vm
> > on the commandline in order to get the -showversion output (such that this
> > could be closed as WORKSFORME or WONTFIX)?
> 
> That kind of defeats the point of this bug. If you already pass a vm, then you
> likely know what version it is. So it's not WORKSFORME. You could set it to
> WONTFIX, but I'd still prefer the solution at the end of comment 3.
+1
Comment 7 Eclipse Webmaster CLA 2019-09-06 15:34:49 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 8 Eclipse Genie CLA 2021-09-01 03:09:21 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.