Bug#369574: Suggestion: Add support for gcj to libpg-java

Michael Koch konqueror at gmx.de
Tue May 30 18:33:23 UTC 2006


On Tue, May 30, 2006 at 07:52:16PM +0200, Ulrich Schmid wrote:
> Package: libpg-java
> Version: 8.1-405-1
> Severity: wishlist
> 
> 
> 
> -- System Information:
> Debian Release: testing/unstable
>   APT prefers testing
>   APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
> Shell:  /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.15-1-amd64-k8
> Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
> 
> Versions of packages libpg-java depends on:
> ii  gij [java1-runtime]           4:4.1.0-2  The GNU Java bytecode interpreter
> ii  gij-4.1 [java1-runtime]       4.1.0-2j1  The GNU Java bytecode interpreter
> 
> libpg-java recommends no packages.
> 
> -- no debconf information
> 
> Version of package gcj:
> ii  gcj            4.1.0-2        The GNU Java compiler
> 
> Hi,
> 
> using 'Class.forName("org.postgresql.Driver");' in a gcj-compiled programm failed with ClassNotFoundException:
> 
> ClassNotFoundException
> java.lang.ClassNotFoundException: org.postgresql.Driver not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
> 
> 'strace' showed that it tried to load the library lib-org-postgresql-Driver.so.
> 
> I tried to create this library by compiling /usr/share/java/postgresql.jar. It worked.
> 
> Therefore I would like to suggest adding lib-org-postgresql-Driver.so to libpg-java.

Why don't you just added postgresql.jar to the CLASSPATH when running
your app? The form of lib-org-postgresql-Driver.so looks you compiled
the jar to the old C++ ABI and not to the new BC ABI? The problems is
that the C++ ABI has several problems. When we finished the new Java
Policy we will have a standard way to build jars to BC-ABI native jars
easily. Then we can perhaps implement this. But doing this needs much
thinking about the pros and cons. Added the bytecode jar file to the
CLASSPATH is by far the most simple and recommended solution.


Cheers,
Michael
-- 
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html

Join the community at http://planet.classpath.org/




More information about the pkg-java-maintainers mailing list