[kaffe] gnu.java.nio.charset.iconv.IconvCharset cannot be used

Ito Kazumitsu kaz at maczuka.gcd.org
Sat Jun 4 17:23:17 PDT 2005


Hi Guilhem. Thanks for taking interest in my problem.

> Could you add (*env)->ExceptionDescribe(env) at the point where there is
> a failed assertion. It should work now in any case. I guess that
> FindClass returns NULL because it cannot find RawData* but we must
> check.

Yes, the result of (*env)->ExceptionDescribe(env) follows:

java.lang.ClassNotFoundException: gnu.classpath.RawData32
   at java.lang.VMClassLoader.loadClass (VMClassLoader.java)
   at java.lang.Class.forName (Class.java:210)
   at gnu.java.nio.charset.iconv.IconvEncoder.openIconv (IconvEncoder.java)
   at gnu.java.nio.charset.iconv.IconvEncoder.<init> (IconvEncoder.java:68)
   at gnu.java.nio.charset.iconv.IconvCharset.newEncoder (IconvCharset.java:81)
   at gnu.java.nio.charset.iconv.IconvCharset.<init> (IconvCharset.java:54)
   at gnu.java.nio.charset.iconv.IconvProvider.charsetForName (IconvProvider.java:103)
   at TestCharsetProviderMain.main (TestCharsetProviderMain.java:21)

The following simple program also shows interesting results:

bash-2.05b$ cat TestClassForName.java 
public class TestClassForName {
  public static void main(String[] args) throws Exception {
    System.err.println(Class.forName(args[0]));
  }
}
bash-2.05b$ kaffe TestClassForName java.io.File
class java.io.File
bash-2.05b$ kaffe TestClassForName gnu.java.nio.charset.iconv.IconvCharset
class gnu.java.nio.charset.iconv.IconvCharset
bash-2.05b$ kaffe TestClassForName gnu.classpath.RawData32
java.lang.ClassNotFoundException: gnu.classpath.RawData32 not found in java.lang.ClassLoader$1{urls=[file:/home/kaz/javatest/testIconv/./], parent=null}
   at java.net.URLClassLoader.findClass (URLClassLoader.java:841)
   at java.lang.ClassLoader.loadClass (ClassLoader.java:349)
   at java.lang.ClassLoader$1.loadClass (ClassLoader.java:1090)
   at java.lang.ClassLoader.loadClass (ClassLoader.java:301)
   at java.lang.Class.forName (Class.java:219)
   at java.lang.Class.forName (Class.java:161)
   at TestClassForName.main (TestClassForName.java:3)
bash-2.05b$ kaffe TestClassForName gnu.classpath.SystemProperties
java.lang.ClassNotFoundException: gnu.classpath.SystemProperties not found in java.lang.ClassLoader$1{urls=[file:/home/kaz/javatest/testIconv/./], parent=null}
   at java.net.URLClassLoader.findClass (URLClassLoader.java:841)
   at java.lang.ClassLoader.loadClass (ClassLoader.java:349)
   at java.lang.ClassLoader$1.loadClass (ClassLoader.java:1090)
   at java.lang.ClassLoader.loadClass (ClassLoader.java:301)
   at java.lang.Class.forName (Class.java:219)
   at java.lang.Class.forName (Class.java:161)
   at TestClassForName.main (TestClassForName.java:3)

Why can't gnu.classpath.* be found?




More information about the kaffe mailing list