File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Creating Java DLL's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Creating Java DLL Watch "Creating Java DLL New topic

Creating Java DLL's

Raj Sharma

Joined: Feb 06, 2001
Posts: 12
I want to create DLL's in Java.
To be more precise, I want to call Java methods from PowerBuilder. PowerBuilder has the option of creating Proxy objects but that works with PowerSuite. I have a plain powerbuilder application.
Can anybody tell me whether it's possible to create DLL's in Java and is there any other workaround.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
Java does not create DLLs. The usual ways for Java classes to work together with non-Java objects is through JNI, IP sockets or CORBA.
Of these, JNI is most usefull for having Java classes access resources that cannot be accessed directly.
The other two require a server to be running (in the case of direct socket comm., you have to write one yourself, CORBA servers can be purchased at substantial cost).
AFAIK there is no language binding for Powerbuilder to CORBA, so you cannot use that, which in your case leaves direct communication over IP sockets (if Powerbuilder can do so).
You need to create two programs: 1 in Powerbuilder and another in Java.
The Java program listens to incoming requests on a port you decide upon. When a recognised request (best are plain text strings) is received a new thread is launched to handle the request and pass the result back to the requester.

Velmurugan Periasamy
Ranch Hand

Joined: Nov 09, 2000
Posts: 95
There is a CORBAObject object in PowerBuilder 7.0 which allows you to talk to CORBA objects from within PowerBuilder applications.
But it may be better to run the java classes that you have as CORBA/Java components in the Sybase Jaguar/EAServer(a J2EE server which has strong support for CORBA), and from the PB application access these components via proxies (equivalent to CORBA stubs) for the components running in EAServer.
Visit the following links for more information.,3693,1002367,00.html
Velmurugan Periasamy
Sun Certified Java Programmer
Study notes for Sun Java Certification

------------------------------------------------------------------------------------<BR>Velmurugan Periasamy<BR>Sun Certified Java Programmer for Java 2 Platform<BR>Sun Certified Web Component Developer for J2EE platform<BR>Sybase Certified EAServer Developer (similar to jCert level 3)<BR>------------------------------------------------------------------------------------<BR>Study notes for Sun Java Certification<BR><A HREF="" TARGET=_blank rel="nofollow"></A><BR>------------------------------------------------------------------------------------
I agree. Here's the link:
subject: Creating Java DLL's
It's not a secret anymore!