简单判断所选目录是否是jre_home
public static boolean isValidJre(String path) {
File jre = new File(path);
if (!jre.exists())
return false;
File javaExe = StandardVMType.findJavaExecutable(jre);
return (javaExe != null && javaExe.exists());
}
public static boolean isValidJre(String path) {
File jre = new File(path);
if (!jre.exists())
return false;
File javaExe = StandardVMType.findJavaExecutable(jre);
return (javaExe != null && javaExe.exists());
}
评论功能维护中,当前仅展示历史评论。
和在这里http://annewman.iteye.com/blog/699312我的回帖一样,
java.home这个property在JVM启动的时候时必须的,其值是JRE的物理位置。