Hi, everyone! I write some java code that uses JNI, so I have to
create java header file, but not with javah command, but from Visual
Age. I am new to Visual Age, so if anyone can help I'll be very
grateful.
Andrew Thompson - 11 Nov 2005 07:47 GMT
> Hi, everyone! I write some java code that uses JNI, so I have to
> create java header file, but not with javah command, but from Visual
> Age. I am new to Visual Age, so if anyone can help I'll be very
> grateful.
It is an unfortunate thing, that those who are expert* on Visual
Age are not necessarily knowledgable of JNI (or Java in general),
while those able to assist* with JNI, will generally talk about
how you might 'do it from the command line', while expecting
you to 'adapt to your environment' as needed.
* I can help with neither, I'm just an interested observer..
Roedy Green - 11 Nov 2005 08:33 GMT
> Hi, everyone! I write some java code that uses JNI, so I have to
>create java header file, but not with javah command, but from Visual
>Age. I am new to Visual Age, so if anyone can help I'll be very
>grateful.
Either do it with an ant script something like this:
<!-- J A V A H -->
<target name="javah" depends="compile">
<javah class="${main.class}"
outputfile="${package.dir}/native${ant.project.name}/${ant.project.name}.h"
/>
</target>
or just run javah from the command line. You only have to run it if
you change the API to your native classes. You don't need to run it if
you just change you JNI implementation.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Chris Uppal - 11 Nov 2005 10:56 GMT
> Hi, everyone! I write some java code that uses JNI, so I have to
> create java header file, but not with javah command, but from Visual
> Age.
Why should you want to do that ? What's the problem with just running javah
from the command line.
BTW, are you talking about VAJ (the long dead "Visual Age for Java" IDE), or
one of the other products in the "Visual Age" line ?
-- chris
ginjasvinja - 11 Nov 2005 12:56 GMT
Yes, I am talking about IBM Visual Age for Java, and it is not a
problem to run javah from command line. I just tought that Visual Age
has that possibility and if I write my code using it, it would be more
comfortable to make header file from it. In this way I have to export
my file from VAJ and then run javah....
And I do not use VAJ because I like, but because I have to.
Thanks everyone
ginjasvinja - 11 Nov 2005 12:57 GMT
Yes, I am talking about IBM Visual Age for Java, and it is not a
problem to run javah from command line. I just tought that Visual Age
has that possibility and if I write my code using it, it would be more
comfortable to make header file from it. In this way I have to export
my file from VAJ and then run javah....
And I do not use VAJ because I like, but because I have to.
Thanks everyone
ginjasvinja - 11 Nov 2005 12:57 GMT
Yes, I am talking about IBM Visual Age for Java, and it is not a
problem to run javah from command line. I just tought that Visual Age
has that possibility and if I write my code using it, it would be more
comfortable to make header file from it. In this way I have to export
my file from VAJ and then run javah....
And I do not use VAJ because I like, but because I have to.
Thanks everyone
Chris Uppal - 11 Nov 2005 15:18 GMT
> Yes, I am talking about IBM Visual Age for Java, and it is not a
> problem to run javah from command line. I just tought that Visual Age
> has that possibility and if I write my code using it, it would be more
> comfortable to make header file from it.
Ah I see.
The fustrating thing is that, now you mention it, I have half a memory that
there might be a builtin version of javah, but it's been so long since I used
VAJ that I can't remember. Sorry ;-)
-- chris