Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calling Java classes directly from Powerbuilder

229 views
Skip to first unread message

crbr...@vac-acc.gc.ca

unread,
Mar 11, 2002, 1:00:29 PM3/11/02
to
Can I call a Java class directly from PowerBuilder? How would I do this?

Thanks
Craig

Edward Muesch

unread,
Mar 11, 2002, 1:54:00 PM3/11/02
to
Not natively. However, you can create a COM wrapper and then use
ConnectToNewObject in PB.

An example of using the MS Java SDK to do this can be found at:
http://www.rgagnon.com/javadetails/java-0044.html

HTH

-EGM

<crbr...@vac-acc.gc.ca> wrote in message
news:F3BC1AFD8E2D1EDC0062EBD285256B79.0062EBE985256B79@webforums...

Marcus Schommler

unread,
Mar 12, 2002, 10:10:13 AM3/12/02
to
There is also a Sun way of achieving the packaging of java classes (or beans
to be exact) in OLE objects. Here is a web page I found:
http://www.rgagnon.com/javadetails/java-0045.html

<crbr...@vac-acc.gc.ca> schrieb im Newsbeitrag
news:F3BC1AFD8E2D1EDC0062EBD285256B79.0062EBE985256B79@webforums...

Edward Muesch

unread,
Mar 12, 2002, 1:18:58 PM3/12/02
to
I was motivated to get into Java-n-PB yesterday after responding to your
post. I downloaded the MS Java SDK last night and will probably get to it
sometime later today. I don't have Sun's on this computer (that one died a
few months ago) and I'm considering going the MS route for now. Check-out
the page Marcus suggested and let me know how it goes.

-EGM

Larry Molter <lmol...@tampabay.rr.com> wrote in message
news:3c8e3c88....@forums.sybase.com...
> On Mon, 11 Mar 2002 13:54:00 -0500, "Edward Muesch"
> <emu...@hotmail.com> wrote:
>
> Edward, did you try the PB example? I created the class, compiled it
> with Sun's JDK1.3 compiler, registered it successfully, created a PB
> example, and it blows up. But... I'm not sure I have MS's Java VM
> first in my path. The component may be invoking Sun's VM instead. I
> even downloaded MS's SDK 4.0, but it didn't have the VM on it. That's
> a separate download I think. Unfortunately, I don't have internet
> access here at work. Somehow I can access these newsgroups, though.
> (Our little secret.)
>
> Larry Molter

Larry Molter

unread,
Mar 12, 2002, 12:41:41 PM3/12/02
to
On Mon, 11 Mar 2002 13:54:00 -0500, "Edward Muesch"
<emu...@hotmail.com> wrote:

Edward, did you try the PB example? I created the class, compiled it
with Sun's JDK1.3 compiler, registered it successfully, created a PB
example, and it blows up. But... I'm not sure I have MS's Java VM
first in my path. The component may be invoking Sun's VM instead. I
even downloaded MS's SDK 4.0, but it didn't have the VM on it. That's
a separate download I think. Unfortunately, I don't have internet
access here at work. Somehow I can access these newsgroups, though.
(Our little secret.)

Larry Molter

>Not natively. However, you can create a COM wrapper and then use

Larry Molter

unread,
Mar 13, 2002, 12:52:15 PM3/13/02
to
On Tue, 12 Mar 2002 16:10:13 +0100, "Marcus Schommler"
<s...@bonn.iz-soz.de> wrote:

Marcus, have you tried the example as outlined in the web page? I did
everything by the book, but my VBScript fails creating the object.

Larr Molter

Larry Molter

unread,
Mar 13, 2002, 12:58:51 PM3/13/02
to
On Tue, 12 Mar 2002 13:18:58 -0500, "Edward Muesch"
<emu...@hotmail.com> wrote:

Edward, I found out that the Java VM is an integral part of the Win2K
OS. That's why it wasn't in the SDK download. However, I still can't
run the MS example (java-0044.html) or the Sun example
(java-0045.html). In both cases, VBScript complains that it cannot
create the object.

Ho hum. I was actually excited to have the ability to call Java
rotuines from PB. In our application I have had need to pass certain
lengthy string manipulation to a DLL or something for speed. Since I
know Java now better than C, this seemed to be a good fit. Alas...

Larry

Edward Muesch

unread,
Mar 13, 2002, 3:37:40 PM3/13/02
to
Actually, although it isn't part of the SDK download it is the link just
below it and the reason it is separate is because they are updated at
different times and for different reasons. So why download both every time
one is changed? The SDK is about 20MB... I'd hate to have to download that
without broadband each time the VM has an update. ;-)

http://www.microsoft.com/java/download.htm - is the download page for the MS
Technologies for Java Site

I did a little digging on the "not able to custom install" problem and found
the following on the Internet Explorer website;

"Windows 2000 Users: Internet Explorer Setup for Windows 2000 does not allow
you to customize the installation or use any advanced options in the Setup
program. This behavior occurs because of the new Windows File Protection
(WFP) feature in Windows 2000. "

http://www.microsoft.com/windows/ie/downloads/recommended/ie55sp2/default.as
p - is the IE5.5 download page

I'm going to play with it right now and I'll get back to you.

HTH

-EGM

Larry Molter <lmol...@tampabay.rr.com> wrote in message

news:3c8f91dd....@forums.sybase.com...

0 new messages