Article View: borland.public.jbuilder.java.language
Article #8425Invoking the JVM
From: Munish Sikka
Date: Mon, 19 Mar 2001 21:20
Date: Mon, 19 Mar 2001 21:20
24 lines
1630 bytes
1630 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 CreateJavaVM 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:
<3ab6782b$1_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!feeds.vnews.net!nntp.cifnet.net!skynet.be!newsfeed00.sul.t-online.de!t-online.de!colt.net!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!208.187.114.242Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,4eb3dae8f2a533cb X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-03-23 03:56:05 PST From: "Munish Sikka" <munishs@moves.com> Newsgroups: borland.public.jbuilder.java.language Subject: Invoking the JVM Date: Mon, 19 Mar 2001 14:20:11 -0700 Lines: 31 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.114.242 Message-ID: <3ab6782b$1_1@dnews> X-Trace: 19 Mar 2001 13:20:43 -0800, 208.187.114.242 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!feeds.vnews.net!nntp.cifnet.net!skynet.be!newsfeed00.sul.t-online.de!t-online.de!colt.net!news.maxwell.syr.edu!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews!208.187.114.242