JDK-6765774 : new launcher behavior in jdk 7 b38
  • Type: Bug
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 7,7u6
  • Priority: P3
  • Status: Resolved
  • Resolution: Future Project
  • OS: generic,linux
  • CPU: generic,arm
  • Submitted: 2008-10-30
  • Updated: 2014-11-25
  • Resolved: 2014-03-13
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.
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
There is a class with no "main" method and a reference to another, nonexistent class.
When attempting to start JVM using the referencing class as initial:

b37 complains about missing "main" method
b38 complains about missing referenced class

Which behaviour is correct?

We really can't do anything in the launcher until JDK-6823296 is fixed, so closing for now.

Same fix version as the jbs it depends on: https://jbs.oracle.com/bugs/browse/JDK-6823296

SUGGESTED FIX The a suitable fix is to use getDeclaredMethods and iterate through the methods to find a main to get the diagnostic information we are looking for.

EVALUATION Its not clear what the behaviour should be, whether NoSuchMethod or some class initialization, regardless the underpinning problem here is that it is that getDeclaredMethods or getDeclaredMethod causes undesirable extra class loading. And this bug and how we present the error to the user is dependent on the resolution of 6823296.