Solved

Import C library file in .dll

Posted on 2004-08-04
6
710 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Suggested Solutions

Title # Comments Views Activity
throw exception 21 58
jmss example java 2 23
Selenium docs api java index 3 48
Need Help! Getting a syntax error and don't understand why 3 31
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This video teaches viewers about errors in exception handling.

829 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