Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Java DLL's

 
Raj Sharma
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic