Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 750
  • Last Modified:

Import C library file in .dll

Hi,

How to import library file (.dll written in C++) into java program.

Thanks
0
azsoft
Asked:
azsoft
  • 3
  • 2
1 Solution
 
azsoftAuthor Commented:
objects,

I gone thru the tutorial (native1.1) but I stuck at step 5 (creating a shared library). I get the following error

HelloWorld.h(2) : fatal error C1083:Cannot open include file: 'jni.h': No such file or directory.

after I run this command from dos
cl -Ic:\java\include -Ic:\java\include\win32 -LD HelloWorldImp.c -Fehello.dll

I almost there, please help me to complete this tutorial.

Thanks
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
objectsCommented:
where is your jdk installed?
It should contain jni.h (you may have to select it when installing)
0
 
azsoftAuthor Commented:
Objects,

I mistype the include directory. I should change the directory to the exact jdk folder in my pc. It working now. Thank You.
0
 
objectsCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now