Thread View: borland.public.jbuilder.java.api
4 messages
4 total messages
Started by BH
Fri, 08 Nov 2002 16:23
Mixing java with non-java..?
Author: BH
Date: Fri, 08 Nov 2002 16:23
Date: Fri, 08 Nov 2002 16:23
17 lines
1699 bytes
1699 bytes
Hello coders: Surely this has been asked before, but I can't find a clear answer yet. 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? Asked another way, can an app built with Dephi/C++Builder/whatever use some java pieces ( objects, windows, data input screens, etc ) that appear to be part of the same "parent" win32 application from the user's point of view? If the answer is yes, any thoughts/links/resources would be appreciated... BH
Re: Mixing java with non-java..?
Author: Jan Kleinsorge
Date: Fri, 08 Nov 2002 22:48
Date: Fri, 08 Nov 2002 22:48
32 lines
2077 bytes
2077 bytes
What's the use ? jan "BH" <bohiggy@yahoo.com> schrieb im Newsbeitrag news:3dcbe4ef$1@newsgroups.borland.com... > Hello coders: > > Surely this has been asked before, but I can't find a clear answer yet. > 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? Asked another way, can an app built with > Dephi/C++Builder/whatever use some java pieces ( objects, windows, data > input > screens, etc ) that appear to be part of the same "parent" win32 application > from the user's point of view? > > If the answer is yes, any thoughts/links/resources would be appreciated... > > BH > > > > >
Re: Mixing java with non-java..?
Author: Shankar Unni
Date: Mon, 11 Nov 2002 18:01
Date: Mon, 11 Nov 2002 18:01
33 lines
2450 bytes
2450 bytes
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.
Re: Mixing java with non-java..?
Author: BH
Date: Mon, 11 Nov 2002 19:36
Date: Mon, 11 Nov 2002 19:36
41 lines
2567 bytes
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. > >
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads