Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #15409

Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java

Path csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From "John B. Matthews" <nospam@nospam.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java
Date Tue, 19 Jun 2012 06:34:45 -0400
Organization The Wasteland
Lines 43
Message-ID <nospam-ABC857.06344519062012@news.aioe.org> (permalink)
References <34c3ac13-bfbe-44e1-befb-09a438cc4f8b@googlegroups.com> <b78c3a69-1841-4cba-a3fc-a51930b0b601@googlegroups.com>
NNTP-Posting-Host LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.java.programmer:15409

Show key headers only | View raw


In article <b78c3a69-1841-4cba-a3fc-a51930b0b601@googlegroups.com>,
 clusardi2k@aol.com wrote:

> On Friday, June 15, 2012 2:57:42 PM UTC-4, (unknown) wrote:
> > Could anyone give me a tutorial on how to use NetBeans 7.1.2 to 
> > create a java project that uses JNI. I'm looking for something with 
> > all the detail I can get.
> > 
> > My small java project will use a small subset of the class' in a 
> > large C++ package.
> > 
> > Is there good documentation on doing this. Is there more than one 
> > way to do it.  
> 
> I'll accept any SIMPLE (complete) JNI example that uses NetBeans 
> 7.1.2, a dot java with a static main, and invokes a C++ project.

I don't know anything that specific; I've always relied on the JNI 
Tutorial [1] and the JNI Specification [2] for specific problems. You 
may not need it for your project, but this JNI_CreateJavaVM example [3] 
may come in handy.
 
> The various examples on the Internet tell me to create 2 projects, 
> but involve older versions of NetBeans. I'm still trying, but I can't 
> get a simple "Hello World" to work!

Like this one [4]?

> Where is a detailed example that uses NetBeans 7.1.2?

I've never tried to do it entirely in NetBeans; I've used `make` to 
create the jnilib itself and a suitable ant target to build the Java 
dependencies.

[1] <http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html>
[2] <http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/jniTOC.html>
[3] <http://www.jguru.com/forums/view.jsp?EID=1264492>
[4] <http://patriot.net/~tvalesky/jninative.html>

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-15 11:57 -0700
  Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-18 21:03 -0700
    Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java "John B. Matthews" <nospam@nospam.invalid> - 2012-06-19 06:34 -0400
      Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java Arun GOPI <arun041@gmail.com> - 2012-07-16 03:07 -0700
      Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java Arun GOPI <arun041@gmail.com> - 2012-07-16 03:09 -0700
  Re: Using NetBeans 7.1.2 JNI: Windows 7 C and C++ Compiler Options clusardi2k@aol.com - 2012-06-19 06:01 -0700
  Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-19 06:11 -0700
  Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-19 06:58 -0700
  Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-19 07:18 -0700
  Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-19 07:25 -0700
  Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-19 08:27 -0700
    Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-19 08:35 -0700
      Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-19 08:53 -0700
        Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-19 09:20 -0700
  Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java clusardi2k@aol.com - 2012-06-20 10:56 -0700
  Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java Lew <lewbloch@gmail.com> - 2012-06-20 11:49 -0700
    Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java "John B. Matthews" <nospam@nospam.invalid> - 2012-06-21 22:35 -0400
      Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java Lew <noone@lewscanon.com> - 2012-06-21 21:39 -0700
        Re: Using NetBeans 7.1.2 JNI: Where Is a Good Tutorial on How to Invoke C++ from Java "John B. Matthews" <nospam@nospam.invalid> - 2012-06-23 00:16 -0400

csiph-web