Re: SableVM on ARM fails to run HelloWorld
Chris Develder <[email protected]> Mon, 28 Nov 2005 17:45:20 +0100
| Newsgroups | gmane.comp.java.vm.sablevm.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, I found that copying the HelloWorld.class file to <install-dir>/share/sablevm-classpath (alongside the jars) makes 'sablevm HelloWorld' work. This lead me to believe that the current working directory was not checked when looking for HelloWorld.class. Yet, without the .class file in <install-dir>/share/sablevm-classpath, I did find (using strace) that the file in the pwd was looked for and opened... But then the java.lang.ClassFormatError occurs. Apparently files in the classpath and pwd are not treated in the same way? > Can you check what happens when mmap() is used to read the class file > insrc/libsablevm/class_loader.c (or src/libsablevm/zip_file_reader.c). As for mmap: I added printfs before all mmap calls, but they were never reached. I did notice failing open() calls using strace, where attempts are made to acces files that are actually in the jars in the classpath. (Making/installing sablevm-classpath uncompressed makes the open() calls work) I guess that it is normal that in case of sablevm-classpath with compressed classfiles _svmf_bootcl_internal_load_ondisk_class_file is called and fails (for the .class files are in the jar)? Cheers, Chris Etienne Gagnon wrote: > Hi Chris, > > Can you check what happens when mmap() is used to read the class file > insrc/libsablevm/class_loader.c (or in src/libsablevm/zip_file_reader.c). > > Etienne > > Chris Develder wrote: > >>On the ARM system, the Java_java_lang_VMClassLoader_nativeDefineClass >>(libsablevm/java_lang_VMClassLoader.c) fails where it calls >>_svmh_parse_class_file (in libsablevm/class_file_parser.c), because the >> class_file_length == 0 (which causes the first _svmh_parse_u32 call to >>retrieve the magic number from the .class file to fail). >> >>So it seems something goes wrong when reading the HelloWorld.class file... > > > > ------------------------------------------------------------------------ > > _______________________________________________ > SableVM-user mailing list > [email protected] > http://sablevm.org/lists/control/listinfo/sablevm-user