| Summary: | [WorkbenchLauncher] Switch Workspace fails - eclipse.vm property has not been set | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dan Hoyt <dan.hoyt> |
| Component: | Runtime | Assignee: | platform-runtime-inbox <platform-runtime-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | bokowski, elias, maxime_daniel, Tod_Creasey, tom.seidel |
| Version: | 3.1.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Dan Hoyt
Somewhat related to workbench launcher. Moving to Runtime. Is there anything we should do differently, or is this a problem in core.runtime? Interesting new information. If I put the -vm parameter anywhere AFTER the -install parameter, the eclipse.vm property gets set properly -- but it still fails to switch the workspace, although with a different error. The new start line: Here's the Windows launch with parameters: start "RWB" /b /wait "C:\Program Files (x86)\RWB\eclipse.exe" -install "C:\Program Files (x86)\RWB" -configuration "C:\Program Files (x86)\RWB\configuration" -data "C:\Program Files (x86)\RWB\workspace" -vm "C:\Program Files (x86)\Java\j2re1.4.2_11\bin\javaw.exe" 1>>"C:\Program Files (x86)\RWB\workspace\.metadata\out.log" 2>>"C:\Program Files (x86)\RWB\workspace\.metadata\err.log" And the diff is (new file on the right): 29a30,31 > -vm > C:\Program Files (x86)\Java\j2re1.4.2_11\bin\javaw.exe 32c34,35 < eclipse.startTime=1160506768609 --- > eclipse.startTime=1160507000203 > eclipse.vm=C:\Program Files (x86)\Java\j2re1.4.2_11\bin\javaw.exe 34,36c37 < -vm C:\Program < Files < (x86)\Java\j2re1.4.2_11\bin\javaw.exe -vmargs -Xms40m -Xmx256m -jar C:\Program --- > -vm C:\WINDOWS\system32\javaw.exe -vmargs -Xms40m -Xmx256m -jar C:\Program 51c52 < java.library.path=C:\Program Files (x86)\Java\j2re1.4.2_11\bin;.;C:\WINDOWS\sy stem32;C:\WINDOWS;[snip] --- > java.library.path=C:\WINDOWS\system32;.;C:\WINDOWS\system32;C:\WINDOWS;[snip] The new error when attempting to switch workspace is: Title: Java Virtual Machine Launcher Message: Could not create the Java virtual machine. Followed by another message box with the title "Eclipse" and the message: C:\Program Files (x86)\Java\j2re1.4.2_11\bin\javaw.exe -os win32 -ws win32 -arch x86 -launcher C:\Program Files (x86)\RWB-2.0.RC2\\eclipse.exe -name Eclipse -showsplash 600 -exitdata f84_384 -install C:\Program Files (x86)\RWB -configuration C:\Program Files (x86)\RWB\\configuration -data C:\Program Files (x86)\RWB\\workspace -vm C:\Program Files (x86)\Java\j2re1.4.2_11\bin\javaw.exe -vm C:\WINDOWS\system32\javaw.exe -vmargs -Xms40m -Xmx256m -jar C:\Program Files (x86)\RWB\\startup.jar I have the same problem -> Switch Workspace fails - eclipse.vm property has not been set. I can switch the workspace once. If I try to do it a 2nd time it fails with the eclipse.vm message. I am sure that it worked more than once a week or 2 ago. I am not aware of any changes in my confguration... I did change something.... I removed the default workspace so that I get asked on startup for the workspace. I changed it back (passing in a workspace directory on startup) and now the switching to other workspaces works fine. This is preventing a switch workspace in a self hosted environment which is making it very challenging to test functionality on restart Is there a workaround for this? Dan, have you tried without specifying the -vm argument on the command line (for example setting it in the eclipse.ini file)? Have you tried with a more recent version of eclipse.exe (for example the one in 3.2)? From your second message it looks like somehow another -vm gets specified on the restart command line causing the problem. Tod, it is not possible to have the switch workspace operation working when self hosting because the code handling the restart is contained in the eclipse.exe, and the eclipse.exe is not used in this scenario. PDE directly starts java.exe. The only known workaround the selfhosting problem is to export your plugins, run the eclipse to which you exported in debug mode and attach to it using a "remote java application" launch configuration. note that we may be able to allow switch workspace while self hosting with the new launcher story. Details are still up in the air but there are is at least one scenario where this would work... Re: specifying the -vm argument and/or trying 3.2 No, to both. My installation is environment variable based, so putting the -vm parameter in the eclipse.ini isn't practical. Also, I've noticed that since the introduction of the eclipse.ini, eclipse no longer recognizes -vmargs on the command line, so I may need to eliminate the eclipse.ini file anyway. I ran across a bug report at some point noting that this behavior was designed, but it doesn't make sense for us, as we use a root/user type of install, and the eclipse.ini is in the root installation, but the user may need to override the RAM parameters in the user installation, depending on his machine's makeup. So if the Eclipse behavior with respect to the eclipse.ini file and command line parameters is either/or, meaning I have to pick only one, then command line parameters are more flexible. As to 3.2, I have had problems moving to 3.2 for the last release of our RWB product (a standalone Eclipse workbench based product), primarily because of problems upgrading to the 3.2 BIRT. We use only the charting part of the BIRT package, and the full prereqs for all of BIRT are much larger than I want to ship, so I have to create my own features with just the parts I need, and it's just not working right under 3.2. I'll be looking at a 3.2 upgrade again in the next couple weeks, so this whole thing may become a non-issue for me. I'll let you know. Update on the 3.2 upgrade: I managed to get our product working properly with the Eclipse 3.2.1 platform, by using the 3.1.2-compatible BIRT and prerequisites. Unfortunately, Switch Workspace still fails. I have a workaround that may shed more light on the problem: First, background. 1) I have upgraded to Eclipse 3.2.1 2) I have upgraded to the 3.2-compatible BIRT charts by creating my own feature with only the plugins neede for graphs (http://wiki.eclipse.org/index.php/BIRT/FAQ/Charts2.1#What_JARs_are_needed_on_the_classpath_to_deploy_the_Eclipse_Chart_Engine.3F). 3) I moved the "vm" parameter back to the beginning. Now, with 3.2.1, I found that if I have a "\" at the end of the "install" parameter (which comes right after the "vm" parameter), Switch Workspace fails. When I remove the trailing "\", it works! *** Bug 179700 has been marked as a duplicate of this bug. *** > Now, with 3.2.1, I found that if I have a "\" at the end of the "install" > parameter (which comes right after the "vm" parameter), Switch Workspace fails. > When I remove the trailing "\", it works! Ah, so this is a duplicate of bug 222107. *** This bug has been marked as a duplicate of bug 222107 *** |