我能将这个JAR包解压出来用吗?
例如
<APPLET CODE = "com.genersoft.report.applet.StartApplet.class" JAVA_CODEBASE = "." WIDTH = "100%" HEIGHT = "97%" NAME = "reportDefine.jar" ALIGN = "middle" VSPACE = "0" HSPACE = "0">我将JAR包解压出来然后用
<APPLET CODE = "com.genersoft.report.applet.StartApplet.class" JAVA_CODEBASE = "." WIDTH = "100%" HEIGHT = "97%" ALIGN = "middle" VSPACE = "0" HSPACE = "0">这样能执行吗?

解决方案 »

  1.   

    再描述下问题:
    第一个问题:我在本机运行一JAR包中的APPLET程序,但出现一问题如果此程序在同事的WEBLOGIC的环境下能正常运行,而在我机子上的WebSphere的环境下运行就经常出现 eofexeption 异常,此异常还是那种无规律的出现,有时能运行,有时报错,我现在想请教各位,这是属于程序问题,还是属于机器配置环境的问题呢?我反编译了下他的程序,我怀疑是不是此方法处理有问题呢? private Object getData(Object outObject) throws ReportException {
            log("取数参数:"+outObject);
            Object data = null;
            URL url = null;
            URLConnection con = null;
            ObjectInputStream in = null;
            ObjectOutputStream out = null;
            try {
                URL documentBase = this.getDocumentBase();
                String protocol = documentBase.getProtocol();
                String host = documentBase.getHost();
                int port = documentBase.getPort();            url = new URL(protocol, host, port, requestURL + "/reportservlet");
                //url = new URL("http://gsjnchenzw:8080/netbank/reportservlet");            //System.out.println(url.toString());
                con = url.openConnection();            con.setUseCaches(true);
                con.setDoOutput(true);
                con.setDoInput(true);            //输出对象到Servlet
                out = new ObjectOutputStream(con.getOutputStream());
                out.writeObject(outObject);
                out.flush();            in = new ObjectInputStream(con.getInputStream());
                data = in.readObject();        } catch (IOException e) {
                e.printStackTrace();
                throw new ReportException(e);
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
                throw new ReportException(e);
            } finally {
                try {
                    if (in != null)
                        in.close();
                } catch (Exception e) {
                    System.out.println("StartApplet:getData:" + e);
                }
                try {
                    if (out != null)
                        out.close();
                } catch (Exception e) {
                    System.out.println("StartApplet:getData:" + e);
                }
            }
            log("返回结果:"+data);        return data;
        }第二个问题:
    我如何将这个JAR包解压出来用呢? 
      

  2.   

    EOFException 问题,请问这段代码有什么问题呢?老在这个方法里报这个异常private Object getData(Object outObject)
            throws ReportException
        {        Object data;
            ObjectInputStream in;
            ObjectOutputStream out;
            Exception exception;        log("È¡Êý²ÎÊý£º" + outObject);
            System.out.println("È¡Êý²ÎÊý666666666666666£º" + outObject);        data = null;
            URL url = null;
            URLConnection con = null;
            in = null;
            out = null;
            try
            {            URL documentBase = getDocumentBase();            String protocol = documentBase.getProtocol();            String host = documentBase.getHost();            int port = documentBase.getPort();            url = new URL(protocol, host, port, requestURL + "/reportservlet");            con = url.openConnection();            con.setUseCaches(true);            con.setDoOutput(true);            con.setDoInput(true);            out = new ObjectOutputStream(con.getOutputStream());            out.writeObject(outObject);            out.flush();            System.out.println("**********************************************15");
                in = new ObjectInputStream(con.getInputStream());//代码执行到这里时出EOF异常
                data = in.readObject();
         
            }
            catch (IOException e) {
                e.printStackTrace();
                throw new ReportException(e);
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
                throw new ReportException(e);
            } finally {
                try {
                    if (in != null)
                        in.close();
                } catch (Exception e) {
                    System.out.println("StartApplet:getData:" + e);
                }
                try {
                    if (out != null)
                        out.close();
                } catch (Exception e) {
                    System.out.println("StartApplet:getData:" + e);
                }
            }
            log("·µ»Ø½á¹û£º" + data);
            System.out.println("·µ»Ø½á¹û6666666666£º" + data);
            System.out.println("**********************************************18");
            return data;
        }