JDK-8008089 : Delete OS dependent check in JdkFinder.getExecutable()
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-02-13
  • Updated: 2014-01-15
  • Resolved: 2013-02-20
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 JDK 8
7u40Fixed 8 b82Fixed
Description
The check below is too OS dependent and should be deleted.
...
        binPath += File.separatorChar + "bin" + File.separatorChar + executable;
        File toolFile = new File(binPath);
==>        if (!toolFile.exists()) {
            throw new RuntimeException(binPath + " does not exist");
        }
...

On windows if executable is specified as e.g. 'java', without '.exe', the File exists() will fail. But it's still possible to run executable.