permaculture playing cards*
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
Author

Creating Java DLL's

Raj Sharma
Greenhorn

Joined: Feb 06, 2001
Posts: 12
Hi,
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.
Thanks,
Raj
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.


42
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. http://www.sybase.com/products/applicationservers/easerver/ http://www.sybase.com/detail/1,3693,1002367,00.html http://www.aegisconsulting.com http://www.erols.com/m.barlotta
HTH
------------------
Velmurugan Periasamy
Sun Certified Java Programmer
----------------------
Study notes for Sun Java Certification
http://www.geocities.com/velmurugan_p/


------------------------------------------------------------------------------------<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="http://www.geocities.com/velmurugan_p/" TARGET=_blank rel="nofollow">http://www.geocities.com/velmurugan_p/</A><BR>------------------------------------------------------------------------------------
 
Don't get me started about those stupid light bulbs.
 
subject: Creating Java DLL's