🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8499

Invoking the JVM (JNI related question)

#8499
From: Munish Sikka
Date: Thu, 15 Mar 2001 17:08
23 lines
1598 bytes
Hi all, I'm writing some C code that invokes the JVM to run a Graphical
interface written in Java. I was successful the other way round in which the
Java code calls the native C code, but have run into a stone wall when I
want to invoke the JVM from the C code. Here is what happens- The JVM is
invoked properly with the CreateJVM command, but FindClass never finds the
class I'm looking for. I've tried several different things (explicitly
feeding the path for the .class file etc to Java.class.path:

#define USER_CLASSPATH "F:\\Grover"

 options[0].optionString =
  "-DJava.class.path=" USER_CLASSPATH;


But the FindClass function always returns a null:

 cls = (*env)->FindClass(env, "Prog");


Any tips?

Thanks,
Munish
Technical Details
Message-ID: <3ab0f73a_1@dnews>
Path: arc1-ca.pugleaf.net!pubnews.netcom.net.uk!diablo.netcom.net.uk!netcom.net.uk!dispose.news.demon.net!demon!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!208.187.60.10

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,d9b2ca1584f03149,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-17 07:55:11 PST
From: "Munish Sikka" <munishs@moves.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Invoking the JVM (JNI related question)
Date: Thu, 15 Mar 2001 10:08:53 -0700
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 208.187.60.10
Message-ID: <3ab0f73a_1@dnews>
X-Trace: 15 Mar 2001 09:09:14 -0800, 208.187.60.10
Path: arc1-ca.pugleaf.net!pubnews.netcom.net.uk!diablo.netcom.net.uk!netcom.net.uk!dispose.news.demon.net!demon!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!208.187.60.10