public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Taufik Chowi <m4g1c14n2000@yahoo.com>
Cc: GCJ <java@gcc.gnu.org>
Subject: Re: GCJ Compile HSQLDB Problem.
Date: Fri, 12 Sep 2008 10:03:00 -0000	[thread overview]
Message-ID: <48CA3E17.7050008@redhat.com> (raw)
In-Reply-To: <431007.91848.qm@web54602.mail.re2.yahoo.com>

Taufik Chowi wrote:
> Dear Andrew,
> 
> Thanks a lot.
> 
> i tried the code on my linux server (OS Fedora) , and yes it works...
> my development environment runs on Windows OS, and it didnt works...

> D:\gcc-4.3\bin>Test_HSQLDB.exe
> Exception in thread "main" java.sql.SQLException: Software module not installed
>    at org.hsqldb.jdbc.jdbcUtil.sqlException(Test_HSQLDB.exe)
>    at org.hsqldb.jdbc.jdbcConnection.<init>(Test_HSQLDB.exe)
>    at org.hsqldb.jdbcDriver.getConnection(Test_HSQLDB.exe)
>    at java.sql.DriverManager.getConnection(Test_HSQLDB.exe)
>    at java.sql.DriverManager.getConnection(Test_HSQLDB.exe)
>    at Test_HSQLDB.main(Test_HSQLDB.exe)
> 
> i dont get it. the gcj i used for my windows pc is version 4.3 (better version) then my server's gcj version 4.0
> used the same Test_HSQLDB.java and hsqldb.jar (exactly the same, i transfer all files from my windows to linux server)
> used the same gcj command for compiling and yet, it didnt run in windows.
> 
> do you know what might caused this problem?

I have duplicated your problem with the latest gcj on Linux.
I think it's a new bug caused by the reorganization of the compiler
for Java 1.6. The problem is that mixing .java and .jar files
in a compilation fails.

zorro:tmp $ gcj  /usr/share/java/hsqldb.jar ~/Test_HSQLDB.java --main=Test_HSQLDB -findirect-dispatch
zorro:tmp $ ./a.out
Exception in thread "main" java.lang.ClassNotFoundException: org.hsqldb.jdbcDriver not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.ClassLoader.loadClass(libgcj.so.9)
   at java.lang.Class.forName(libgcj.so.9)
   at Test_HSQLDB.main(a.out)

Try compiling them separately, like this:

zorro:tmp $ gcj  /usr/share/java/hsqldb.jar -c -findirect-dispatch
zorro:tmp $ gcj  hsqldb.o ~/Test_HSQLDB.java --main=Test_HSQLDB -findirect-dispatch
zorro:tmp $ ./a.out
name = Gandhi
job = politics
name = Turing
job = computers
name = Wittgenstein
job = smartypants

Andrew.

       reply	other threads:[~2008-09-12 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <431007.91848.qm@web54602.mail.re2.yahoo.com>
2008-09-12 10:03 ` Andrew Haley [this message]
2008-09-12  3:21 Taufik Chowi
  -- strict thread matches above, loose matches on Subject: below --
2008-09-10 11:12 Taufik Chowi
2008-09-11 12:25 ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48CA3E17.7050008@redhat.com \
    --to=aph@redhat.com \
    --cc=java@gcc.gnu.org \
    --cc=m4g1c14n2000@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).