This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
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.