IDEMPIERE-3798:Move iDempiere default branch to openjdk 10 (keystore/check java version)
This commit is contained in:
parent
7c98168706
commit
d17e9db662
|
@ -3,6 +3,7 @@
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-10">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-10">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="module" value="true"/>
|
<attribute name="module" value="true"/>
|
||||||
|
<attribute name="add-exports" value="java.base/sun.security.tools.keytool=ALL-UNNAMED"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
<accessrules>
|
<accessrules>
|
||||||
<accessrule kind="accessible" pattern="sun/security/tools/*"/>
|
<accessrule kind="accessible" pattern="sun/security/tools/*"/>
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class ConfigVM extends Config
|
||||||
System.setProperty(ConfigurationData.JAVA_HOME, javaHome.getAbsolutePath());
|
System.setProperty(ConfigurationData.JAVA_HOME, javaHome.getAbsolutePath());
|
||||||
|
|
||||||
// Java Version
|
// Java Version
|
||||||
final String[] versions = new String[]{"1.7.0", "1.8.0"};
|
final String[] versions = new String[]{"1.7.0", "1.8.0", "10.", "11.", "12."};
|
||||||
pass = false;
|
pass = false;
|
||||||
String thisJV = System.getProperty("java.version");
|
String thisJV = System.getProperty("java.version");
|
||||||
for(String version : versions)
|
for(String version : versions)
|
||||||
|
|
|
@ -19,7 +19,6 @@ package org.compiere.install;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.security.Key;
|
import java.security.Key;
|
||||||
import java.security.KeyStore;
|
import java.security.KeyStore;
|
||||||
|
@ -35,6 +34,8 @@ import org.compiere.Adempiere;
|
||||||
import org.compiere.util.CLogMgt;
|
import org.compiere.util.CLogMgt;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
|
|
||||||
|
import sun.security.tools.keytool.Main;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage SSL KeyStore
|
* Class to manage SSL KeyStore
|
||||||
*
|
*
|
||||||
|
@ -459,16 +460,7 @@ public class KeyStoreMgt
|
||||||
//vpj-cd add support java 6
|
//vpj-cd add support java 6
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Class<?> keyTool = null;
|
Main.main(args);;
|
||||||
try{
|
|
||||||
// java 7
|
|
||||||
keyTool = Class.forName("sun.security.tools.KeyTool");
|
|
||||||
}catch (ClassNotFoundException ex){
|
|
||||||
// java 8
|
|
||||||
keyTool = Class.forName("sun.security.tools.keytool.Main");
|
|
||||||
}
|
|
||||||
Method mainMethod = keyTool.getDeclaredMethod("main", String[].class);
|
|
||||||
mainMethod.invoke(null, new Object[]{args});
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue