Solved

Import C library file in .dll

Posted on 2004-08-04
6
704 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

707 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

12 Experts available now in Live!

Get 1:1 Help Now