IDEMPIERE-5617 Add Java Options field to iDempiere Server Setup dialog (#1708)

This commit is contained in:
hengsin 2023-03-09 21:11:52 +08:00 committed by GitHub
parent b88b8e9ed5
commit a55a1bfbcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 107 additions and 61 deletions

View File

@ -72,6 +72,8 @@ public class ConfigVM extends Config
setProperty(ConfigurationData.JAVA_HOME, javaHome.getAbsolutePath());
System.setProperty(ConfigurationData.JAVA_HOME, javaHome.getAbsolutePath());
setProperty(ConfigurationData.IDEMPIERE_JAVA_OPTIONS, p_data.getJavaOptions());
// Java Version
pass = false;
String thisJV = System.getProperty("java.version");

View File

@ -223,7 +223,7 @@ public class ConfigurationData
*/
public boolean load()
{
// Load C:\idempiere\idempiereEnv.properties
// Load idempiereEnv.properties
String adempiereHome = System.getProperty(IDEMPIERE_HOME);
if (adempiereHome == null || adempiereHome.length() == 0)
adempiereHome = System.getProperty("user.dir");
@ -269,6 +269,8 @@ public class ConfigurationData
initJava();
if (loaded.containsKey(JAVA_HOME))
setJavaHome((String)loaded.get(JAVA_HOME));
if (loaded.containsKey(IDEMPIERE_JAVA_OPTIONS))
setJavaOptions((String)loaded.get(IDEMPIERE_JAVA_OPTIONS));
//
setAdempiereHome((String)p_properties.get(IDEMPIERE_HOME));
String s = (String)p_properties.get(ADEMPIERE_KEYSTOREPASS);
@ -1098,6 +1100,28 @@ public class ConfigurationData
updateProperty(JAVA_HOME, javaHome);
}
/**
* @return Java Options
*/
public String getJavaOptions()
{
if (p_panel != null)
return p_panel.fJavaOptions.getText();
else
return (String)p_properties.get(IDEMPIERE_JAVA_OPTIONS);
}
/**
* @param javaOptions The javaOptions to set.
*/
public void setJavaOptions(String javaOptions)
{
if (p_panel != null)
p_panel.fJavaOptions.setText(javaOptions);
else
updateProperty(IDEMPIERE_JAVA_OPTIONS, javaOptions);
}
/**
* Init Apps Server
*/

View File

@ -105,6 +105,8 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
JTextField fJavaHome = new JTextField(FIELDLENGTH);
JCheckBox okJavaHome = new JCheckBox();
private JButton bJavaHome = new JButton(iOpen);
private JLabel lJavaOptions = new JLabel();
JTextField fJavaOptions = new JTextField(FIELDLENGTH);
// Adempiere - KeyStore
private JLabel lAdempiereHome = new JLabel();
JTextField fAdempiereHome = new JTextField(FIELDLENGTH);
@ -199,6 +201,13 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 2, 5), 0, 0));
this.add(bJavaHome, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
lJavaOptions.setText(res.getString("JavaOptions"));
this.add(lJavaOptions, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fJavaOptions, new GridBagConstraints(1, 3, 5, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 5, 0), 0, 0));
// AdempiereHome - KeyStore
lAdempiereHome.setToolTipText(res.getString("AdempiereHomeInfo"));
lAdempiereHome.setText(res.getString("AdempiereHome"));
@ -214,23 +223,23 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
sectionLabel = new JLabel("iDempiere");
sectionLabel.setForeground(titledBorder.getTitleColor());
separator = new JSeparator();
this.add(sectionLabel, new GridBagConstraints(0, 3, 7, 1, 0.0, 0.0
this.add(sectionLabel, new GridBagConstraints(0, 4, 7, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 0, 0), 0, 0));
this.add(separator, new GridBagConstraints(0, 4, 7, 1, 1.0, 0.0
this.add(separator, new GridBagConstraints(0, 5, 7, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 10), 0, 0));
this.add(lAdempiereHome, new GridBagConstraints(0, 5, 1, 1, 0.0, 0.0
this.add(lAdempiereHome, new GridBagConstraints(0, 6, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fAdempiereHome, new GridBagConstraints(1, 5, 1, 1, 0.5, 0.0
this.add(fAdempiereHome, new GridBagConstraints(1, 6, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 2, 0), 0, 0));
this.add(okAdempiereHome, new GridBagConstraints(2, 5, 1, 1, 0.0, 0.0
this.add(okAdempiereHome, new GridBagConstraints(2, 6, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 2, 5), 0, 0));
this.add(bAdempiereHome, new GridBagConstraints(3, 5, 1, 1, 0.0, 0.0
this.add(bAdempiereHome, new GridBagConstraints(3, 6, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.add(lKeyStore, new GridBagConstraints(4, 5, 1, 1, 0.0, 0.0
this.add(lKeyStore, new GridBagConstraints(4, 6, 1, 1, 0.0, 0.0
,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.add(fKeyStore, new GridBagConstraints(5, 5, 1, 1, 0.0, 0.0
this.add(fKeyStore, new GridBagConstraints(5, 6, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 2, 0), 0, 0));
this.add(okKeyStore, new GridBagConstraints(6, 5, 1, 1, 0.0, 0.0
this.add(okKeyStore, new GridBagConstraints(6, 6, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
// Apps Server - Type
lAppsServer.setToolTipText(res.getString("AppsServerInfo"));
@ -241,15 +250,15 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
sectionLabel = new JLabel(res.getString("AppsServer"));
sectionLabel.setForeground(titledBorder.getTitleColor());
separator = new JSeparator();
this.add(sectionLabel, new GridBagConstraints(0, 6, 6, 1, 0.0, 0.0
this.add(sectionLabel, new GridBagConstraints(0, 7, 6, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 0, 0), 0, 0));
this.add(separator, new GridBagConstraints(0, 7, 7, 1, 1.0, 0.0
this.add(separator, new GridBagConstraints(0, 8, 7, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 10), 0, 0));
this.add(lAppsServer, new GridBagConstraints(0, 8, 1, 1, 0.0, 0.0
this.add(lAppsServer, new GridBagConstraints(0, 9, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fAppsServer, new GridBagConstraints(1, 8, 1, 1, 0.5, 0.0
this.add(fAppsServer, new GridBagConstraints(1, 9, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 2, 0), 0, 0));
this.add(okAppsServer, new GridBagConstraints(2, 8, 1, 1, 0.0, 0.0
this.add(okAppsServer, new GridBagConstraints(2, 9, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 2, 5), 0, 0));
// Web Ports
lWebPort.setToolTipText(res.getString("WebPortInfo"));
@ -259,17 +268,17 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
lSSLPort.setText("SSL");
fSSLPort.setText(".");
okSSLPort.setEnabled(false);
this.add(lWebPort, new GridBagConstraints(0, 10, 1, 1, 0.0, 0.0
this.add(lWebPort, new GridBagConstraints(0, 11, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fWebPort, new GridBagConstraints(1, 10, 1, 1, 0.5, 0.0
this.add(fWebPort, new GridBagConstraints(1, 11, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0));
this.add(okWebPort, new GridBagConstraints(2, 10, 1, 1, 0.0, 0.0
this.add(okWebPort, new GridBagConstraints(2, 11, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0));
this.add(lSSLPort, new GridBagConstraints(4, 10, 1, 1, 0.0, 0.0
this.add(lSSLPort, new GridBagConstraints(4, 11, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fSSLPort, new GridBagConstraints(5, 10, 1, 1, 0.0, 0.0
this.add(fSSLPort, new GridBagConstraints(5, 11, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0));
this.add(okSSLPort, new GridBagConstraints(6, 10, 1, 1, 0.0, 0.0
this.add(okSSLPort, new GridBagConstraints(6, 11, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0));
// Database Server - Type
lDatabaseServer.setToolTipText(res.getString("DatabaseServerInfo"));
@ -285,23 +294,23 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
ldbExists.setToolTipText(res.getString("DbExists"));
ldbExists.setText(res.getString("DbExists"));
this.add(sectionLabel, new GridBagConstraints(0, 11, 6, 1, 0.0, 0.0
this.add(sectionLabel, new GridBagConstraints(0, 12, 6, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 0, 0), 0, 0));
this.add(separator, new GridBagConstraints(0, 12, 7, 1, 1.0, 0.0
this.add(separator, new GridBagConstraints(0, 13, 7, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 10), 0, 0));
this.add(ldbExists, new GridBagConstraints(0, 13, 1, 1, 0.0, 0.0
this.add(ldbExists, new GridBagConstraints(0, 14, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(okdbExists, new GridBagConstraints(1, 13, 1, 1, 0.0, 0.0
this.add(okdbExists, new GridBagConstraints(1, 14, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 2, 5), 0, 0));
this.add(lDatabaseServer, new GridBagConstraints(0, 14, 1, 1, 0.0, 0.0
this.add(lDatabaseServer, new GridBagConstraints(0, 15, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fDatabaseServer, new GridBagConstraints(1, 14, 1, 1, 0.5, 0.0
this.add(fDatabaseServer, new GridBagConstraints(1, 15, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 2, 0), 0, 0));
this.add(okDatabaseServer, new GridBagConstraints(2, 14, 1, 1, 0.0, 0.0
this.add(okDatabaseServer, new GridBagConstraints(2, 15, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 2, 5), 0, 0));
this.add(lDatabaseType, new GridBagConstraints(4, 14, 1, 1, 0.0, 0.0
this.add(lDatabaseType, new GridBagConstraints(4, 15, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fDatabaseType, new GridBagConstraints(5, 14, 1, 1, 0.0, 0.0
this.add(fDatabaseType, new GridBagConstraints(5, 15, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 2, 0), 0, 0));
//Database/Service Name
lDatabaseName.setToolTipText(res.getString("DatabaseNameInfo"));
@ -314,15 +323,15 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
fDatabaseDiscovered.setEditable(true);
fDatabaseDiscovered.setPreferredSize(fDatabaseName.getPreferredSize());
okDatabaseSQL.setEnabled(false);
this.add(lDatabaseName, new GridBagConstraints(0, 15, 1, 1, 0.0, 0.0
this.add(lDatabaseName, new GridBagConstraints(0, 16, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fDatabaseName, new GridBagConstraints(1, 15, 1, 1, 0.5, 0.0
this.add(fDatabaseName, new GridBagConstraints(1, 16, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0));
this.add(okDatabaseSQL, new GridBagConstraints(2, 15, 1, 1, 0.0, 0.0
this.add(okDatabaseSQL, new GridBagConstraints(2, 16, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0));
this.add(lDatabaseDiscovered, new GridBagConstraints(4, 15, 1, 1, 0.0, 0.0
this.add(lDatabaseDiscovered, new GridBagConstraints(4, 16, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0));
this.add(fDatabaseDiscovered, new GridBagConstraints(5, 15, 1, 1, 0.5, 0.0
this.add(fDatabaseDiscovered, new GridBagConstraints(5, 16, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0));
// Port - System
lDatabasePort.setToolTipText(res.getString("DatabasePortInfo"));
@ -332,15 +341,15 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
lSystemPassword.setText(res.getString("SystemPassword"));
fSystemPassword.setText(".");
okDatabaseSystem.setEnabled(false);
this.add(lDatabasePort, new GridBagConstraints(0, 16, 1, 1, 0.0, 0.0
this.add(lDatabasePort, new GridBagConstraints(0, 17, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fDatabasePort, new GridBagConstraints(1, 16, 1, 1, 0.5, 0.0
this.add(fDatabasePort, new GridBagConstraints(1, 17, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0));
this.add(lSystemPassword, new GridBagConstraints(4, 16, 1, 1, 0.0, 0.0
this.add(lSystemPassword, new GridBagConstraints(4, 17, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fSystemPassword, new GridBagConstraints(5, 16, 1, 1, 0.5, 0.0
this.add(fSystemPassword, new GridBagConstraints(5, 17, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 5, 2, 0), 0, 0));
this.add(okDatabaseSystem, new GridBagConstraints(6, 16, 1, 1, 0.0, 0.0
this.add(okDatabaseSystem, new GridBagConstraints(6, 17, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0));
// User - Password
@ -351,23 +360,23 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
lDatabasePassword.setText(res.getString("DatabasePassword"));
fDatabasePassword.setText(".");
okDatabaseUser.setEnabled(false);
this.add(lDatabaseUser, new GridBagConstraints(0, 17, 1, 1, 0.0, 0.0
this.add(lDatabaseUser, new GridBagConstraints(0, 18, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fDatabaseUser, new GridBagConstraints(1, 17, 1, 1, 0.5, 0.0
this.add(fDatabaseUser, new GridBagConstraints(1, 18, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0));
this.add(lDatabasePassword, new GridBagConstraints(4, 17, 1, 1, 0.0, 0.0
this.add(lDatabasePassword, new GridBagConstraints(4, 18, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fDatabasePassword, new GridBagConstraints(5, 17, 1, 1, 0.5, 0.0
this.add(fDatabasePassword, new GridBagConstraints(5, 18, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 5, 2, 0), 0, 0));
this.add(okDatabaseUser, new GridBagConstraints(6, 17, 1, 1, 0.0, 0.0
this.add(okDatabaseUser, new GridBagConstraints(6, 18, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0));
sectionLabel = new JLabel(res.getString("MailServer"));
sectionLabel.setForeground(titledBorder.getTitleColor());
separator = new JSeparator();
this.add(sectionLabel, new GridBagConstraints(0, 18, 6, 1, 0.0, 0.0
this.add(sectionLabel, new GridBagConstraints(0, 19, 6, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 0, 0), 0, 0));
this.add(separator, new GridBagConstraints(0, 19, 7, 1, 1.0, 0.0
this.add(separator, new GridBagConstraints(0, 20, 7, 1, 1.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 5, 0, 10), 0, 0));
// Mail Server - Email
lMailServer.setToolTipText(res.getString("MailServerInfo"));
@ -378,15 +387,15 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
lAdminEMail.setText(res.getString("AdminEMail"));
fAdminEMail.setText(".");
okMailServer.setEnabled(false);
this.add(lMailServer, new GridBagConstraints(0, 20, 1, 1, 0.0, 0.0
this.add(lMailServer, new GridBagConstraints(0, 21, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fMailServer, new GridBagConstraints(1, 20, 1, 1, 0.5, 0.0
this.add(fMailServer, new GridBagConstraints(1, 21, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 2, 0), 0, 0));
this.add(okMailServer, new GridBagConstraints(2, 20, 1, 1, 0.0, 0.0
this.add(okMailServer, new GridBagConstraints(2, 21, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 0, 2, 5), 0, 0));
this.add(lAdminEMail, new GridBagConstraints(4, 20, 1, 1, 0.0, 0.0
this.add(lAdminEMail, new GridBagConstraints(4, 21, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(5, 5, 2, 5), 0, 0));
this.add(fAdminEMail, new GridBagConstraints(5, 20, 1, 1, 0.5, 0.0
this.add(fAdminEMail, new GridBagConstraints(5, 21, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(5, 5, 2, 0), 0, 0));
// Mail User = Password
@ -397,22 +406,22 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
lMailPassword.setText(res.getString("MailPassword"));
fMailPassword.setText(".");
okMailUser.setEnabled(false);
this.add(lMailUser, new GridBagConstraints(0, 21, 1, 1, 0.0, 0.0
this.add(lMailUser, new GridBagConstraints(0, 22, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fMailUser, new GridBagConstraints(1, 21, 1, 1, 0.5, 0.0
this.add(fMailUser, new GridBagConstraints(1, 22, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(2, 5, 2, 0), 0, 0));
this.add(lMailPassword, new GridBagConstraints(4, 21, 1, 1, 0.0, 0.0
this.add(lMailPassword, new GridBagConstraints(4, 22, 1, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 5, 2, 5), 0, 0));
this.add(fMailPassword, new GridBagConstraints(5, 21, 1, 1, 0.5, 0.0
this.add(fMailPassword, new GridBagConstraints(5, 22, 1, 1, 0.5, 0.0
,GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 5, 2, 0), 0, 0));
this.add(okMailUser, new GridBagConstraints(6, 21, 1, 1, 0.0, 0.0
this.add(okMailUser, new GridBagConstraints(6, 22, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 2, 5), 0, 0));
//grap extra space when window is maximized
JPanel filler = new JPanel();
filler.setOpaque(false);
filler.setBorder(null);
this.add(filler, new GridBagConstraints(0, 22, 1, 1, 0.0, 1.0
this.add(filler, new GridBagConstraints(0, 23, 1, 1, 0.0, 1.0
,GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
// End
@ -421,11 +430,11 @@ public class ConfigurationPanel extends JPanel implements ActionListener, IDBCon
bSave.setToolTipText(res.getString("SaveInfo"));
bSave.setText(res.getString("Save"));
bHelp.setToolTipText(res.getString("HelpInfo"));
this.add(bTest, new GridBagConstraints(0, 23, 1, 1, 0.0, 0.0
this.add(bTest, new GridBagConstraints(0, 24, 1, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 10, 5), 0, 0));
this.add(bHelp, new GridBagConstraints(3, 23, 2, 1, 0.0, 0.0
this.add(bHelp, new GridBagConstraints(3, 24, 2, 1, 0.0, 0.0
,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(15, 5, 10, 5), 0, 0));
this.add(bSave, new GridBagConstraints(5, 23, 2, 1, 0.0, 0.0
this.add(bSave, new GridBagConstraints(5, 24, 2, 1, 0.0, 0.0
,GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(15, 5, 10, 5), 0, 0));
//
bAdempiereHome.addActionListener(this);

View File

@ -65,6 +65,7 @@ public class SetupRes extends ListResourceBundle
{ "DatabaseServer", "Database Server" },
{ "JavaHomeInfo", "Java Home Folder" },
{ "JavaHome", "Java Home" },
{ "JavaOptions", "Java Options" },
{ "JNPPortInfo", "Application Server JNP Port" },
{ "JNPPort", "JNP Port" },
{ "MailUserInfo", "iDempiere Mail User" },

View File

@ -45,6 +45,7 @@ public class ConfigurationConsole {
try {
jvmHome(reader, writer);
jvmOptions(reader, writer);
adempiereHome(reader, writer);
keyStorePass(reader, writer);
@ -425,6 +426,15 @@ public class ConfigurationConsole {
}
}
private void jvmOptions(BufferedReader reader, PrintWriter writer) throws IOException {
writer.println("Java Options ["+data.getJavaOptions()+"]:");
String input = reader.readLine();
if (input != null && input.trim().length() > 0)
{
data.setJavaOptions(input);
}
}
private void dbExists(BufferedReader reader, PrintWriter writer) throws IOException {
String dbExists = data.getDatabaseExists() ? "Y" : "N";