Re: javah bug when using JCE

Jan Luehe (Jan.Luehe@Eng)
Tue, 2 Jun 1998 10:45:55 -0700 (PDT)

Date: Tue, 2 Jun 1998 10:45:55 -0700 (PDT)
From: Jan Luehe <Jan.Luehe@Eng>
Subject: Re: javah bug when using JCE
To: java-security@web2.javasoft.com, plambert@certicom.com

Paul:

> Your help would be greatly appreciated on the problem below.
>
> Thanks in advance,

I was able to reproduce the problem you described.
I'll look into this.

Thanks,

Jan

> 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 ---
>
>