ICTCLAS09 共享版各种问题。 试用期到了,报错。 多线程之间的实例共享,会报错。 多个实例之间,关闭打开的顺序不对,还会报错。这样是可以的ICTCLAS30 seg1 = new ICTCLAS30(); if (seg1.ICTCLAS_Init(Configuration.getInstance().getICTCLAS_CONFIGURATION_FILE().getBytes("GBK")) == false) { System.out.println("Init Fail!"); throw new RuntimeException(); } ICTCLAS30 seg2 = new ICTCLAS30(); if (seg2.ICTCLAS_Init(Configuration.getInstance().getICTCLAS_CONFIGURATION_FILE().getBytes("utf-8")) == false) { System.out.println("Init Fail!"); throw new RuntimeException(); } seg1.ICTCLAS_Exit(); seg1 = new ICTCLAS30(); if (seg1.ICTCLAS_Init(Configuration.getInstance().getICTCLAS_CONFIGURATION_FILE().getBytes("GBK")) == false) { System.out.println("Init Fail!"); throw new RuntimeException(); } seg2.ICTCLAS_Exit(); seg2 = new ICTCLAS30(); if (seg2.ICTCLAS_Init(Configuration.getInstance().getICTCLAS_CONFIGURATION_FILE().getBytes("utf-8")) == false) { System.out.println("Init Fail!"); throw new RuntimeException(); } 但是,稍稍换动一下exit的位置,就会使得虚拟机崩溃ICTCLAS30 seg1 = new ICTCLAS30(); if (seg1.ICTCLAS_Init(Configuration.getInstance().getICTCLAS_CONFIGURATION_FILE().getBytes("GBK")) == false) { System.out.println("Init Fail!"); throw new RuntimeException(); } ICTCLAS30 seg2 = new ICTCLAS30(); if (seg2.ICTCLAS_Init(Configuration.getInstance().getICTCLAS_CONFIGURATION_FILE().getBytes("utf-8")) == false) { System.out.println("Init Fail!"); throw new RuntimeException(); } seg1.ICTCLAS_Exit(); seg2.ICTCLAS_Exit(); seg1 = new ICTCLAS30(); if (seg1.ICTCLAS_Init(Configuration.getInstance().getICTCLAS_CONFIGURATION_FILE().getBytes("GBK")) == false) { System.out.println("Init Fail!"); throw new RuntimeException(); } seg2 = new ICTCLAS30(); if (seg2.ICTCLAS_Init(Configuration.getInstance().getICTCLAS_CONFIGURATION_FILE().getBytes("utf-8")) == false) { System.out.println("Init Fail!"); throw new RuntimeException(); } 唉……