Solved

Import C library file in .dll

Posted on 2004-08-04
6
706 Views
Last Modified: 2008-03-17
Hi,

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

Thanks
0
Comment
Question by:azsoft
  • 3
  • 2
6 Comments
 
LVL 92

Expert Comment

by:objects
ID: 11713444
0
 
LVL 14

Expert Comment

by:sudhakar_koundinya
ID: 11713483
0
 

Author Comment

by:azsoft
ID: 11723027
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 11723039
where is your jdk installed?
It should contain jni.h (you may have to select it when installing)
0
 

Author Comment

by:azsoft
ID: 11723145
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
 
LVL 92

Expert Comment

by:objects
ID: 11723952
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now