把文件conf\ConnectionPool.cfg
改为ConnectionPool.cfg,也就是直接放在工作目录下。我上次也是这样,无缘无故就是不行。你试试。

解决方案 »

  1.   

    打包后ConnectionPool.cfg文件就不能用常用的文件路径来访问了。你可以将ConnectionPool.cfg文件放在class文件目录里面
    然后调用
    java.io.InputStream is = <TestClass>.class.getResourceAsStream("ConnectionPool.cfg")
    或者URL url=com.todaynic.jft.Arrstatic.class.getResource("ConnectionPool.cfg");
    File big=new File(url.getPath());
    来调用
      

  2.   

    to  newman0708:
    这个方法我试过了也出现了同样的错误!!!
    谢谢
      

  3.   

    to ralihm:
    我有在主目录main中也有调用一个dgvip.xml的文件却可以的!!!
      

  4.   

    java.lang.Exception: ConnectionPool configuration file 'conf\ConnectionPool.cfg'not found
    这个异常是自己抛出的private boolean loadConfig(String name) throws Exception
    {
      boolean rc = false;
      // Get our class loader
      ClassLoader cl = getClass().getClassLoader();
      // Attempt to open an input stream to the configuration file.
      // The configuration file is considered to be a system
      // resource.
      java.io.InputStream in;
      if (cl != null) {
         in = cl.getResourceAsStream(name);
       }
      else {
        in = ClassLoader.getSystemResourceAsStream(name);
      }
      // If the input stream is null, then the configuration file
      // was not found
      if (in == null) {
        throw new Exception("ConnectionPool configuration file '" +name + "' not found");
      

  5.   

    把这个ConnectionPool.cfg文件单独拿出来,放到classpath内,
    或与.jar文件同一目录。视你内部的读取语句具体是什么。如果你懒得去查找具体语句,就按上面的办法各备份一份。
      

  6.   

    第二次不行是因为关闭窗体时javaw程序还留在内存里!!
    请问怎样把javaw这个给释放掉谢谢各位!!
      

  7.   


    who can help me!!!