Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" 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: References: <34c3ac13-bfbe-44e1-befb-09a438cc4f8b@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 In article , 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] [2] [3] [4] -- John B. Matthews trashgod at gmail dot com