JDK-6475822 : SA:Fix vm version check for 1.7
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2006-09-27
  • Updated: 2012-02-02
  • Resolved: 2007-08-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Duplicate :  
Relates :  
Description
Fix sa version check for 1.7 release.
jtreg test:

    sun/tools/jinfo/Basic.sh

is failing due to this:

----------System.err:(54/3363)----------
Attaching to process ID 4683, please wait...
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at sun.tools.jinfo.JInfo.runTool(JInfo.java:79)
        at sun.tools.jinfo.JInfo.main(JInfo.java:53)
Caused by: sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported version
s are 1.6.0, 1.6.0_xx. Target VM is 1.7.0-ea-b02
        at sun.jvm.hotspot.runtime.VM.checkVMVersion(VM.java:197)
        at sun.jvm.hotspot.runtime.VM.<init>(VM.java:236)
        at sun.jvm.hotspot.runtime.VM.initialize(VM.java:289)
        at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:576)
        at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:476)
        at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:314)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:146)
        at sun.jvm.hotspot.tools.JInfo.main(JInfo.java:111)


See attached file "Basic.jtr"

Comments
EVALUATION Fix the version string check in SA.
27-09-2006

SUGGESTED FIX Fix is: private static void checkVMVersion(String version) { .... // This SA supports 1.7.0 and update releases only if (!m.matches() && !version.startsWith("1.7.0")) { throw new VMVersionMismatchException("1.7.0, 1.7.0_xx", version); } ...
27-09-2006