Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Import C library file in .dll

Posted on 2004-08-04
6
Medium Priority
?
733 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
 

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Accepted Solution

by:
objects earned 200 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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…
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.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

783 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