Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connector java - power builder

Status
Not open for further replies.

Condemor

Programmer
Mar 9, 2009
26
ES
Hi,

I want to create a program in Java and invoke it from power builder. How can I do it? Is it possible to create dlls in java?

Thanks
 
If you could run some commandline from power builder, then you could execute the code packed into a jar, or directly a classfile if the function you require fits in a single source.
Java is multi-platform, so it doesn't directly support creating DLL's with entrypoints as you would expect from Windows dev tools. The compiled code (bytecode) can be taken to any platform and run using the platform specific java runtime environment (JRE), by a commandline like
Code:
java -jar somejar.jar (optional parameters)
or
Code:
java someclass.class (optional parameters)
Returnvalues can be sent by errorlevel, or by writing to a file, and reading it afterward in power builder (PB), or by sending it to stdout, and reading/catching that from PB.

HTH
TonHu
 
Power Builder sounds like a gym device.

Anyway, some questions:

- Why creating it in Java if you're planning to invoke it from PW? Do it in PW
- What kind of program?
- Did you consider a WebService or an EJB?
- Java has support for native invocations, it's called JNI, but maybe it's too much effort for what you need

Cheers,
Dian
 
Hi,

My problem is: I need to integrate a closed product from a manufacturer that only gives me SDKs in java, and an application already developed in power builder. Power builder invoke Java API Functions, and events are sent from Java to Power Builder.

I have been considering the JNI, but as Dian say, is too much effort and I wonder if the end result will be optimal.
 
So, I take your product is JSEE, a jar file or something like this and no application servers involved.

You can consider building a web services tier. Does the product need to be executed in the client machine? Is that a distributed application?

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top