Click here to Skip to main content
Sign Up to vote bad
good
See more: C++Java
I have a project in which front end is in Java and all important algorithm in C++, i am using netbeans.
 
How should i use c++ code in netbeans' java project., c++ code is loaded as library
Posted 21 Apr '12 - 1:10


1 solution

If you have not read The Java Native Interface - Programmer's Guide and Specification[^], this is a good place to start.
 
I'll also advice you to take a long look at SWIG[^] and perhaps JACE[^]
 
Best regards
Espen Harlinn
  Permalink  
Comments
ersumitsahu - 21 Apr '12 - 14:23
aactually i am not able to configure C++ library ,in netbeans
Espen Harlinn - 21 Apr '12 - 17:48
If you're on windows you build a dll using a c++ compiler, or if you're on linux you build a shared library. This has nothing to do with Netbeans unless you are working on Solaris, but that is outside my experiance. On windows I use Visual C++ when I do this for the c/c++ part - that is I build a dll exporting the required functions and place that dll in a directory that's part of the PATH environment variable. Then I use Netbeans or Eclipse to build the java classes that interface with the native code.
ersumitsahu - 23 Apr '12 - 12:16
THANKS .DLL STUFF WORKED
Espen Harlinn - 23 Apr '12 - 14:39
That's good :-D
VJ Reddy - 23 Apr '12 - 19:39
Good references. 5!
Espen Harlinn - 24 Apr '12 - 6:25
Thank you VJ :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Arun Vasu 394
1 OriginalGriff 370
2 Sergey Alexandrovich Kryukov 313
3 Tadit Dash 213
4 Maciej Los 191
0 Sergey Alexandrovich Kryukov 9,955
1 OriginalGriff 7,589
2 CPallini 4,028
3 Rohan Leuva 3,422
4 Maciej Los 2,949


Advertise | Privacy | Mobile
Web02 | 2.6.130523.1 | Last Updated 21 Apr 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid