IDEMPIERE-367 Java 7 support
This commit is contained in:
parent
f28f327cbe
commit
8c5c4ff1d7
|
@ -52,6 +52,8 @@ syntax: regexp
|
|||
^org\.adempiere\.ui\.zk/dist$
|
||||
^org\.adempiere\.ui\.zk/WEB-INF/classes/.*\.class$
|
||||
^org\.adempiere\.ui\.zk/WEB-INF/classes/.*\.xml$
|
||||
^org\.adempiere\.ui\.zk/WEB-INF/classes/.*\.js$
|
||||
^org\.adempiere\.ui\.zk/WEB-INF/classes/.*\.wpd$
|
||||
|
||||
syntax: regexp
|
||||
^lib/plugins$
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
*****************************************************************************/
|
||||
package org.compiere.util;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.Principal;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
|
@ -106,32 +104,25 @@ public class Login
|
|||
{
|
||||
// Java System version check
|
||||
String jVersion = System.getProperty("java.version");
|
||||
if (jVersion.startsWith("1.5.0"))
|
||||
//vpj-cd e-evolution support to java 6
|
||||
if (jVersion.startsWith("1.6.0"))
|
||||
return true;
|
||||
//vpj-cd e-evolution support to java 6
|
||||
if (jVersion.startsWith("1.6.0"))
|
||||
//end
|
||||
if (jVersion.startsWith("1.7.0"))
|
||||
return true;
|
||||
//end
|
||||
// Warning
|
||||
boolean ok = false;
|
||||
// if (jVersion.startsWith("1.4")
|
||||
// || jVersion.startsWith("1.5.1")) // later/earlier release
|
||||
// ok = true;
|
||||
|
||||
// Error Message
|
||||
StringBuffer msg = new StringBuffer();
|
||||
msg.append(System.getProperty("java.vm.name")).append(" - ").append(jVersion);
|
||||
if (ok)
|
||||
msg.append("(untested)");
|
||||
msg.append(" <> 1.5.0");
|
||||
msg.append(" <> 1.6.0 | 1.7.0");
|
||||
//
|
||||
if (isClient)
|
||||
JOptionPane.showMessageDialog(null, msg.toString(),
|
||||
org.compiere.Adempiere.getName() + " - Java Version Check",
|
||||
ok ? JOptionPane.WARNING_MESSAGE : JOptionPane.ERROR_MESSAGE);
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
else
|
||||
log.severe(msg.toString());
|
||||
return ok;
|
||||
return false;
|
||||
} // isJavaOK
|
||||
|
||||
|
||||
|
|
|
@ -30,16 +30,13 @@ import java.awt.geom.RectangularShape;
|
|||
import java.awt.geom.RoundRectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.JComponent;
|
||||
|
||||
import com.sun.image.codec.jpeg.JPEGCodec;
|
||||
import com.sun.image.codec.jpeg.JPEGImageDecoder;
|
||||
|
||||
/**
|
||||
* UI utilities
|
||||
|
@ -420,30 +417,15 @@ public class CompiereUtils
|
|||
BufferedImage image = null;
|
||||
if (url != null)
|
||||
{
|
||||
InputStream in = null;
|
||||
try
|
||||
{
|
||||
in = url.openStream();
|
||||
JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(in);
|
||||
image = decoder.decodeAsBufferedImage();
|
||||
image = ImageIO.read(url);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.severe("URL: " + url + " - " + e.getMessage());
|
||||
image = null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
try
|
||||
{
|
||||
if (in != null)
|
||||
in.close();
|
||||
}
|
||||
catch (IOException ioe)
|
||||
{
|
||||
log.severe("URL: " + url + " - " + ioe.getMessage());
|
||||
}
|
||||
}
|
||||
if (image != null)
|
||||
{
|
||||
log.config("Image type : " + image.getType());
|
||||
|
|
|
@ -130,7 +130,7 @@ public class Viewer extends CFrame
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3453340777183200393L;
|
||||
private static final long serialVersionUID = 3766771249690413641L;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
|
@ -467,7 +467,7 @@ public class Viewer extends CFrame
|
|||
/**
|
||||
* Revalidate settings after change of environment
|
||||
*/
|
||||
private void revalidate()
|
||||
public void revalidate()
|
||||
{
|
||||
m_pageMax = m_viewPanel.getPageCount();
|
||||
spinnerModel.setMaximum(new Integer(m_pageMax));
|
||||
|
|
Loading…
Reference in New Issue