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


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

Re: JNI accessing a class that instantiates another class

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.uni-stuttgart.de!news.belwue.de!LF.net!news.enyo.de!not-for-mail
From Florian Weimer <fw@deneb.enyo.de>
Newsgroups comp.lang.java.programmer
Subject Re: JNI accessing a class that instantiates another class
Date Mon, 15 Aug 2011 21:50:54 +0200
Lines 21
Message-ID <87vctyxxlt.fsf@mid.deneb.enyo.de> (permalink)
References <d48afffd-0ff8-4cc4-a63b-45ffe01224e9@o11g2000yql.googlegroups.com> <871uwma9kd.fsf@mid.deneb.enyo.de> <391b55eb-b8cc-413e-9c58-21ce7e81b934@v7g2000vbk.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace ruchba.enyo.de 1313437854 25097 172.17.135.6 (15 Aug 2011 19:50:54 GMT)
X-Complaints-To news@enyo.de
Cancel-Lock sha1:d76FR4OOh/bAV/CoHMxzDora9X8=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:7129

Show key headers only | View raw


* Danno:

> Thank you for taking the time to reply to my post.  I have attached my
> code below.  I have not used -Xcheck:jni before.  I may not fully
> understand how to use it, but the way I understand it, it is a command
> line argument.  The java program, however, is not being called from a
> command line.  I have a MicroFocus COBOL program that is calling a C++
> dll that starts a JVM and invokes a Java method via JNI.  Is there a
> way to run -Xcheck:jni under that scenario?

The JVM cannot be linked into all processes as a library, at least on
UNIX-like platforms.  I'm not sure if Windows is different in this
regard.  In your case, the JVM does not seem to properly support
exception handling.

There are options that supposedly increase compatibility, see the JVM
documentation.

>         options[0].optionString = "-Djava.class.path=.";

I think you have to put "-Xcheck:jni" here, as an additional option.

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


Thread

JNI accessing a class that instantiates another class Danno <danmwall-google@yahoo.com> - 2011-08-15 07:55 -0700
  Re: JNI accessing a class that instantiates another class Florian Weimer <fw@deneb.enyo.de> - 2011-08-15 19:06 +0200
    Re: JNI accessing a class that instantiates another class Danno <danmwall-google@yahoo.com> - 2011-08-15 12:28 -0700
      Re: JNI accessing a class that instantiates another class Florian Weimer <fw@deneb.enyo.de> - 2011-08-15 21:50 +0200
  Re: JNI accessing a class that instantiates another class Roedy Green <see_website@mindprod.com.invalid> - 2011-08-15 15:10 -0700

csiph-web