create header file in Visual Age

G

ginjasvinja

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

Andrew Thompson

ginjasvinja said:
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..
 
R

Roedy Green

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

Chris Uppal

ginjasvinja said:
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
 
G

ginjasvinja

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
 
G

ginjasvinja

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
 
G

ginjasvinja

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
 
C

Chris Uppal

ginjasvinja said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top