+ private static boolean checkJVMSymlink(String testBin)
+ {
+ File testBinFile = new File(testBin);
+ if (!testBinFile.exists())
+ {
+ return false;
+ }
+ File targetFile = null;
+ try
+ {
+ targetFile = testBinFile.getCanonicalFile();
+ } catch (IOException e)
+ {
+ return false;
+ }
+ if (targetFile != null && ("java".equals(targetFile.getName())
+ || "java.exe".equals(targetFile.getName())))
+ {
+ return true;
+ }
+ return false;
+ }
+