🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #815

Re: Mixing java with non-java..?

#815
From: BH
Date: Mon, 11 Nov 2002 19:36
41 lines
2567 bytes
Thanks Shankar...really appreciate the input.

BH

"Shankar Unni" <shankar@cotagesoft.com> wrote in message
news:3dcff06b$1@newsgroups.borland.com...
> BH wrote:
>
> > We're new to java and wondering about the prospects of easing it into
> > our current non-java apps until they are eventually 100% java....
> >
> > Is it possible to "blend" java desktop or C/S app widgets (not
> > web/browser stuff) with a win32 app such that the java portions appear
> > to be part of the calling win32 app or dll?
>
> Not without some difficulty, but it's not impossible.
>
> The problem is that the Java stuff needs a JRE to run, so for starters,
> you'll have to bundle a JRE.
>
> The normal code sequence to load and run Java code from C/C++ code is to
> use "JNI" (the Java Native Interface) to create a virtual machine, and
> feed it code to execute.
>
> However, in your case, where you have a C/C++ DLL that you want to ship,
> and have various entry points in it (which can be called in any sequence
> or selection) turn around and call Java code, you probably want to
> create some sort of "helper class" that'll load the VM once (on first
> invocation), and then invoke the Java code underneath.
>
> In order to make this easier to encapsulate, your Java code should
> probably implement some standard interface, so that the boilerplate code
> to invoke it and pass parameters can be shared by the various library
> entry points..
>
> So the short answer is again: yes, it can be done, but it might be
> painful and messy.
> --
> Shankar.
>
>
Technical Details
Message-ID: <3dd03c62$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!image.surnet.ru!surnet.ru!carrier.kiev.ua!news.donbass.net!newsgroups.borland.com!not-for-mail
References: <3dcbe4ef$1@newsgroups.borland.com> <3dcff06b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,add35f16ae99f9ac
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-11-11 15:38:07 PST
From: "BH" <bohiggy@yahoo.com>
Newsgroups: borland.public.jbuilder.java.api
References: <3dcbe4ef$1@newsgroups.borland.com> <3dcff06b$1@newsgroups.borland.com>
Subject: Re: Mixing java with non-java..?
Date: Mon, 11 Nov 2002 12:36:50 -0700
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 65.103.122.242
Message-ID: <3dd03c62$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1037057122 65.103.122.242 (11 Nov 2002 15:25:22 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!image.surnet.ru!surnet.ru!carrier.kiev.ua!news.donbass.net!newsgroups.borland.com!not-for-mail