This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
gcc 4.0 and JCE
- From: Stefan Prelle <prelle at tzi dot de>
- To: java at gcc dot gnu dot org
- Date: Fri, 17 Jun 2005 17:16:52 +0200
- Subject: gcc 4.0 and JCE
- Reply-to: prelle at tzi dot de
Hi folks,
Maybe I'm just to blind to see what is missing, but I have a problem
when building a native binary that uses the JCE. When executing a
program that obtains a Mac using Mac.getInstance(..) this works when
using gij and fails with a NoSuchAlgorithmException when executing the
native binary.
--------Test programm--------------
import javax.crypto.*;
public class JCETest {
public static void main(String[] args) throws Exception {
Mac mac = Mac.getInstance("HMAC-MD5");
System.out.println("found "+mac);
}
}
-----------GIJ output-------------------
cowabunga->gcj -C JCETest.java
cowabunga->gij -classpath . JCETest
found javax.crypto.Mac@13ad20
-----------Binary output----------------
cowabunga->gcj -o jcetest --main=JCETest JCETest.java
cowabunga->./jcetest
Exception in thread "main" java.security.NoSuchAlgorithmException: HMAC-
MD5
at javax.crypto.Mac.getInstance(java.lang.String)
(/usr/lib/libgcj.so.6.0.0)
at JCETest.main(java.lang.String[]) (Unknown Source)
at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
----GCC version---------------------
cowabunga->gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-
checking=release --with-system-zlib --enable-__cxa_atexit --disable-
libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c+
+,objc,java,f95,ada --enable-java-awt=gtk --with-java-
home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050519 (Red Hat 4.0.0-8)
What am I doing wrong ?
Regards,
Stefan
--
Dipl.Inf. Stefan Prelle
Universtität Bremen | University of Bremen
FB Informatik | Dep. Computer Science
eMail: prelle@tzi.de Tel.: +49.421.218-63300