Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Launcher finds Sun VM instead of IBM VM on Windows.
Launcher finds Sun VM instead of IBM VM on Windows. [message #656772] Mon, 28 February 2011 14:40 Go to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 205
Registered: July 2009
Senior Member
I have an IBM VM as my system VM (the IBM java.exe is in \windows\system32

When I start Memory Analyzer it uses the Sun VM instead. I think this is because org.eclipse.equinox.executable/library/win32/eclipseWin.c doesn't find a JRE/SDK directory for the java.exe, so goes straight to using registry keys to find the VM.

I know I could use -vm to chose a VM, but I think the launcher could do better. The simplest solution would be to use isSunVM() on the executable, and only use the registry keys if it is a Sun VM. Starting the java.exe otherwise for IBM VMs would be acceptable for me, though using the IBM registry keys and linking to java.dll would be even better.

C:\Documents and Settings\Administrator>java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pwi3260sr8fp1ifix-20100903_02(SR8 FP1+IZ83654))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260sr8-20100401_55940 (JIT enabled, AOT enabled)
J9VM - 20100401_055940
JIT  - r9_20100401_15339
GC   - 20100308_AA)
JCL  - 20100903_02


C:\Documents and Settings\Administrator>"c:\Program Files\IBM\Java60\jre\bin\java.exe" -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pwi3260sr8fp1ifix-20100903_02(SR8 FP1+IZ83654))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260sr8-20100401_55940 (JIT enabled, AOT enabled)
J9VM - 20100401_055940
JIT  - r9_20100401_15339
GC   - 20100308_AA)
JCL  - 20100903_02


*** System properties:
awt.toolkit=sun.awt.windows.WToolkit
eclipse.commands=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat\MemoryAnalyzer.exe
-name
MemoryAnalyzer
--launcher.library
C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519\eclipse_1206.dll
-startup
C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat\plugins\org.eclipse.equinox.launcher_1.0.200.v20090520.jar
-vm
C:\Program Files\Java\jre6\bin\client\jvm.dll
eclipse.home.location=file:/C:/m5/MemoryAnalyzer-1.0.1.20100809-win32.win32.x86/mat/
eclipse.launcher=C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat\MemoryAnalyzer.exe
eclipse.product=org.eclipse.mat.ui.rcp.MemoryAnalyzer
eclipse.startTime=1298901024062
eclipse.vm=C:\Program Files\Java\jre6\bin\client\jvm.dll
eclipse.vmargs=-Xmx1024m
-Djava.class.path=C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat\plugins\org.eclipse.equinox.launcher_1.0.200.v20090520.jar
file.encoding=Cp1252
file.encoding.pkg=sun.io
file.separator=\
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.awt.printerjob=sun.awt.windows.WPrinterJob
java.class.path=C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat\plugins\org.eclipse.equinox.launcher_1.0.200.v20090520.jar
java.class.version=50.0
java.endorsed.dirs=C:\Program Files\Java\jre6\lib\endorsed
java.ext.dirs=C:\Program Files\Java\jre6\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
java.home=C:\Program Files\Java\jre6
java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
java.library.path=C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Program Files\ThinkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\IBM\Infoprint Select;C:\Notes;C:\Program Files\XLView;C:\lotus\compnent;C:\Utilities;C:\Program Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace Facility\;C:\Program Files\ThinkPad\ConnectUtilities;C:\WINDOWS\Downloaded Program Files;C:\Program Files\ObjREXX;C:\Program Files\ObjREXX\OODIALOG;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Common Files\Lenovo;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\IBM\CMVCDC50
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.6.0_18-b07
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.6
java.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
java.version=1.6.0_18
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) Client VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.vendor=Sun Microsystems Inc.
java.vm.version=16.0-b13
line.separator=




Re: Launcher finds Sun VM instead of IBM VM on Windows. [message #656820 is a reply to message #656772] Mon, 28 February 2011 17:37 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Andrew,

The launcher has a JRE tab. By default it uses the same JRE you used to
run Eclipse itself, I think. But you can configure other JREs and use
those.


Andrew Johnson wrote:
> I have an IBM VM as my system VM (the IBM java.exe is in
> \windows\system32
>
> When I start Memory Analyzer it uses the Sun VM instead. I think this
> is because org.eclipse.equinox.executable/library/win32/eclipseWin.c
> doesn't find a JRE/SDK directory for the java.exe, so goes straight to
> using registry keys to find the VM.
>
> I know I could use -vm to chose a VM, but I think the launcher could
> do better. The simplest solution would be to use isSunVM() on the
> executable, and only use the registry keys if it is a Sun VM. Starting
> the java.exe otherwise for IBM VMs would be acceptable for me, though
> using the IBM registry keys and linking to java.dll would be even better.
>
>
> C:\Documents and Settings\Administrator>java -version
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build
> pwi3260sr8fp1ifix-20100903_02(SR8 FP1+IZ83654))
> IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows XP x86-32
> jvmwi3260sr8-20100401_55940 (JIT enabled, AOT enabled)
> J9VM - 20100401_055940
> JIT - r9_20100401_15339
> GC - 20100308_AA)
> JCL - 20100903_02
>
>
>
> C:\Documents and Settings\Administrator>"c:\Program
> Files\IBM\Java60\jre\bin\java.exe" -version
> java version "1.6.0"
> Java(TM) SE Runtime Environment (build
> pwi3260sr8fp1ifix-20100903_02(SR8 FP1+IZ83654))
> IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows XP x86-32
> jvmwi3260sr8-20100401_55940 (JIT enabled, AOT enabled)
> J9VM - 20100401_055940
> JIT - r9_20100401_15339
> GC - 20100308_AA)
> JCL - 20100903_02
>
>
>
> *** System properties:
> awt.toolkit=sun.awt.windows.WToolkit
> eclipse.commands=-os
> win32
> -ws
> win32
> -arch
> x86
> -showsplash
> -launcher
> C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat\Memo ryAnalyzer.exe
>
> -name
> MemoryAnalyzer
> --launcher.library
> C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat\plug ins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20 090519\eclipse_1206.dll
>
> -startup
> C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.win32.x86\mat\plug ins\org.eclipse.equinox.launcher_1.0.200.v20090520.jar
>
> -vm
> C:\Program Files\Java\jre6\bin\client\jvm.dll
> eclipse.home.location=file:/C:/m5/MemoryAnalyzer-1.0.1.20100 809-win32.win32.x86/mat/
>
> eclipse.launcher=C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.w in32.x86\mat\MemoryAnalyzer.exe
>
> eclipse.product=org.eclipse.mat.ui.rcp.MemoryAnalyzer
> eclipse.startTime=1298901024062
> eclipse.vm=C:\Program Files\Java\jre6\bin\client\jvm.dll
> eclipse.vmargs=-Xmx1024m
> -Djava.class.path=C:\m5\MemoryAnalyzer-1.0.1.20100809-win32. win32.x86\mat\plugins\org.eclipse.equinox.launcher_1.0.200.v 20090520.jar
>
> file.encoding=Cp1252
> file.encoding.pkg=sun.io
> file.separator=\
> java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
> java.awt.printerjob=sun.awt.windows.WPrinterJob
> java.class.path=C:\m5\MemoryAnalyzer-1.0.1.20100809-win32.wi n32.x86\mat\plugins\org.eclipse.equinox.launcher_1.0.200.v20 090520.jar
>
> java.class.version=50.0
> java.endorsed.dirs=C:\Program Files\Java\jre6\lib\endorsed
> java.ext.dirs=C:\Program
> Files\Java\jre6\lib\ext;C:\WINDOWS\Sun\Java\lib\ext
> java.home=C:\Program Files\Java\jre6
> java.io.tmpdir=C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
> java.library.path=C:\m5\MemoryAnalyzer-1.0.1.20100809-win32. win32.x86\mat;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32; C:\WINDOWS;C:/Program
> Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Program
> Files\ThinkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\W INDOWS\System32\Wbem;C:\Program
> Files\IBM\Infoprint Select;C:\Notes;C:\Program
> Files\XLView;C:\lotus\compnent;C:\Utilities;C:\Program
> Files\IBM\Personal Communications\;C:\Program Files\IBM\Trace
> Facility\;C:\Program
> Files\ThinkPad\ConnectUtilities;C:\WINDOWS\Downloaded Program
> Files;C:\Program Files\ObjREXX;C:\Program
> Files\ObjREXX\OODIALOG;C:\Program Files\ATI
> Technologies\ATI.ACE\Core-Static;C:\Program Files\Common
> Files\Lenovo;C:\Program Files\QuickTime\QTSystem\;C:\Program
> Files\IBM\CMVCDC50
> java.runtime.name=Java(TM) SE Runtime Environment
> java.runtime.version=1.6.0_18-b07
> java.specification.name=Java Platform API Specification
> java.specification.vendor=Sun Microsystems Inc.
> java.specification.version=1.6
> java.vendor=Sun Microsystems Inc.
> java.vendor.url=http://java.sun.com/
> java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
> java.version=1.6.0_18
> java.vm.info=mixed mode
> java.vm.name=Java HotSpot(TM) Client VM
> java.vm.specification.name=Java Virtual Machine Specification
> java.vm.specification.vendor=Sun Microsystems Inc.
> java.vm.specification.version=1.0
> java.vm.vendor=Sun Microsystems Inc.
> java.vm.version=16.0-b13
> line.separator=
>
>
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Launcher finds Sun VM instead of IBM VM on Windows. [message #656988 is a reply to message #656820] Tue, 01 March 2011 09:47 Go to previous messageGo to next message
Andrew Johnson is currently offline Andrew JohnsonFriend
Messages: 205
Registered: July 2009
Senior Member
The problem occurs when running Memory Analyzer as an RCP product, not when launching Memory Analyzer from inside Eclipse.

The problem also occurs when running Eclipse without the -vm option.

Help->About->Installation Details->Configuration
shows the Sun VM even though the system VM is an IBM one.

eclipseWin.c
Re: Launcher finds Sun VM instead of IBM VM on Windows. [message #657106 is a reply to message #656988] Tue, 01 March 2011 15:32 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Andrew,

If you really want something in the implementation to change, you'll
need to open a bugzilla and then wait very patiently.


Andrew Johnson wrote:
> The problem occurs when running Memory Analyzer as an RCP product, not
> when launching Memory Analyzer from inside Eclipse.
>
> The problem also occurs when running Eclipse without the -vm option.
>
> Help->About->Installation Details->Configuration shows the Sun VM even
> though the system VM is an IBM one.
>
> http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.equino x/framework/bundles/org.eclipse.equinox.executable/library/w in32/eclipseWin.c?view=markup&root=RT_Project
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Eclipse Extension Point search
Next Topic:whole word file search
Goto Forum:
  


Current Time: Thu Apr 25 15:29:46 GMT 2024

Powered by FUDForum. Page generated in 0.03136 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top