# javah bug when using JCE

Patrick Xu (dxu@certicom.com)
Tue, 2 Jun 1998 12:07:28 -0400

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Jan Luehe: "Re: Regarding Java Security"
- Previous message: Li Gong: "Increase Your odds in the LOTTO!"
- Next in thread: Jan Luehe: "Re: javah bug when using JCE"

    From: "Patrick Xu" <dxu@certicom.com>

    To: java-security@web1.javasoft.com

    Date: Tue, 2 Jun 1998 12:07:28 -0400

    Subject: javah bug when using JCE

Hi there,
I sent this to you on behalf of a developer of our company who has not got
outgoing email account yet. Please advise if there is a solution. Thanks in
advance.
Patrick
---------------------------------------------------------------------------
-------
The javah tool seems to have a problem with JCE 1.2
I'm using JDK 1.2 beta 3 and the above on NT 4.
I've had no problems
using javah with the java.security package,
but now that I started using the javax.crypto package
whenever I run javah it crashes with the following message:

"javah.exe - Application Error

The instruction at "0x0040c89c" referenced memory at "0x00000000". The
memory
could not be "read".

Click on OK to teminate the application
Click on CANCEL to debug the application"

When click on Cancel, I get the following msg:

"unhandled exception in javah.exe 0xC0000005: Access Violation"

The sample code that causes this crash is below.

Is there a newer javah.exe that is compatible with JCE?

Thanks
Roni

// --- begin code ---
import javax.crypto.SecretKey;

class JavaHbug implements SecretKey {

JavaHbug() {
natConstructorJavaHbug();
}
public String getAlgorithm() { return null; }
public byte[] getEncoded() { return null; }
public String getFormat() { return null; }
// --- end implementation of Key interface

private native byte[] natConstructorJavaHbug();
}
// --- end code ---

- Next message: Jan Luehe: "Re: Regarding Java Security"
- Previous message: Li Gong: "Increase Your odds in the LOTTO!"
- Next in thread: Jan Luehe: "Re: javah bug when using JCE"