Summary: | [Serviceability] Workbench should check JDK version on startup | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Nick Edgar <n.a.edgar> |
Component: | Resources | Assignee: | DJ Houghton <dj.houghton> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P1 | CC: | kcornell, Mike_Wilson, wolfgang.frech |
Version: | 2.0 | ||
Target Milestone: | 2.0 F3 | ||
Hardware: | Other | ||
OS: | other | ||
Whiteboard: |
Description
Nick Edgar
2002-02-04 09:57:36 EST
Should this be done in the UI or Core? I'm assuming UI since we're the first application to run. It would make sense for core.runtime to know which versions are good, however it can't present a UI if the test fails. Need API from Core returning the JDK versions that can be used. Once we have the API, we can open a dialog warning the user. Moving to Core for comments. *** Bug 9154 has been marked as a duplicate of this bug. *** Investigate for 2.0. After discussions with other, have decided that this must be checked before the UI is around since there could be differences in the class loader, etc. Recommend making the change in the Main.java. Adding McQ and KC to CC for changes in executable. Recommend we have a special return code which informs the user that they need to run with a VM with a newer version. Recommend that the return code be "14". I'm assuming KC will handle this. The main launcher detects the JVM terminates with exit code 14. Is the following message sufficient? Please use a newer VM. Eclipse requires at least 1.3.1. Launcher changes have been committed. Error message is as above. My apologies, I thought that it should be 1.3.1 until I double-checked tonight before releasing and realized that the project plan says 1.3.0. Changing the code in Main.java to accept at least 1.3.0 VM and querying to see if the project plan is true or out of date. Keeping bug open until required version issue is resolved. If 1.3.1 is minimum then I will change Main.java. If 1.3.0 is minimum then error message should be changed. Sorry for not confirming this sooner. Backing out of this change for now due to bug 18635. Will determine which System property is correct. Note that IBM and Sun return "1.3.0" for "java.vm.version" but J9 returns "15" so this presumably can be an internal number. See bug 18635 for a list of J9's System.getProperties() on Photon. You need to check "java.version", not "java.vm.version". What is the net result of the required version issue. 1). Is eclipse still checking the JVM version and returning exit code 14 if the version is too old? 2). If exit code 14 is returned, should the launcher message indicate the required version should be at least 1.3.0 or 1.3.1? I believe that the code and message will remain as is. Its not a P1 so it won't change. Net result is: - 1.2.2 VM -> user gets message to upgrade to 1.3.1 - 1.3.0 VM -> Eclipse starts - 1.3.1 VM -> Eclipse starts What is the intended behavior on a 1.4 VM? Feature request 9154 was: check if VM is supported, unsupported, or unknown; display a warning if not supported; try to start anyway. Resolving bug 6587 as invalid because of unsupported VM could have been easier if the Eclipse platform had displayed a warning, instead of starting up, and terminating later at the first Java compile, both without any message. Both bugs are effectively folded into this thread. *** Bug 18962 has been marked as a duplicate of this bug. *** The intent is for Eclipse to start with a 1.3.0 or greater VM and fail (with a message to the user) otherwise. Does Eclipse run ok on a 1.4 Java environment? My observation in bug 6587 was: with Sun's 1.4 it did not, with 1.3 the problem did not occur. As I read the test reports, nobody tests against 1.4. So what is the intended behavior for Eclipse starting on a 1.4 environment? I propose: warn the user and try to start. As TeX says: "Proceed with fingers crossed." I would like to add in here that the following JVM (from blackdown's debian packages) fail: java version "1.3.1" Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.3.1-FCS) Java HotSpot(TM) Client VM (build Blackdown-1.3.1-FCS, mixed mode) While this following JVM (Sun's 1.4.0 for linux) works perfectly: java version "1.4.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92) Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode) As would be expected, the IBM 1.3.1 JVM for linux works fine as well: java version "1.3.1" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1) Classic VM (build 1.3.1, J2RE 1.3.1 IBM build cxia32131-20020410 (JIT enabled: jitc)) (I am running debian sid/unstable) mike Kevin, can we change the executable's message to print out 1.3.0 instead of 1.3.1? This would bring it in line with the code which is checking compatibility. The launcher's error message has been changed to: Please use a newer VM. Eclipse requires at least 1.3.0. Fixed. Reviewed. Released. Tested against 1.2.2, 1.3.0, 1.3.1, 1.4, and 1.4.1 VMs. Also tested against J9 (WinXP and Photon) Closing. Also verified by Adam S in F3. F3 works, even in my weirdo debian/blackdown configuration, cheers! |