com.Joesen.sysinfo.sysinfo不是一个属性文件。

解决方案 »

  1.   

    把com.Joesen.sysinfo.sysinfo这个文件放在跟webPro.class同一个目录下面;
      

  2.   

    是同一个目录webpro.calss也在 com.Joesen.sysinfo目录
      

  3.   

    public webPro()
        {
            this.dbProps = new Properties();
            try {
                dbProps.load(is);
            } catch (IOException ioe) {
                ioe.printStackTrace();
            }
        }
    这样就不会报错了。
      

  4.   

    我现在改成这样,可以编译通过,但是Jsp文件使用,现现错误:
    Jsp文件:<%=webPro.getHy("cfg_leftmargin")%>出现错误
    java.lang.IncompatibleClassChangeError
    at _jspoa._index__jsp._jspService(/jspoa/index.jsp:232)
    at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
    at com.caucho.jsp.Page.subservice(Page.java:497)
    at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
    at com.caucho.server.http.Invocation.service(Invocation.java:312)
    at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
    at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:342)
    at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:272)
    at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
    at java.lang.Thread.run(Thread.java:536)
    Java:public class webPro
    {
        static Properties dbProps;    public webPro()
        {
            init();
        }    private void init()   {
            InputStream is = getClass().getResourceAsStream("/info.properties");
            Properties dbProps = new Properties();  //创建一个Properties对象
            try  {
               dbProps.load(is);  //装入db.properties文件,并寻打logfile特性
            } catch (Exception e) {
               System.out.println("Can't read the properties file. Make sure db.properties is in the CLASSPATH");
            }
        }    public static String getHy(String rsb1)
        {
            if(rsb1 != null)
                rsb1 = dbProps.getProperty(rsb1);
            return rsb1;
        }}
      

  5.   

    都是些什么人啊?
    放在
    try
    catch
    里面ok?