I am trying to run a java class from powerbuilder and I have seen examples where this statement is used:
javavm i_jvm.
When compiling, this error message appears: Illegal data type: javavm.
What should I do to be able to instantiate the java virtual machine?
Please.
Thank you.
I already looked at the example you told me. I ran it using the .exe file and I also created a workspace in Appeon 2017 r2 build 1769 and it worked fine although some messages appeared indicating that I should not run it in this version.
However, there are things that I do not understand, within all the code there is. For example, what is the go_ac object? I created a new workspace to try to simplify the code and understand better but I have not succeeded. Can you tell me if it's okay to create the go_ac object and then use the code in the wn_pb2java_e window to call the HelloWorld class? please.
Thank you.
The PB2017R3 example was built with an older JavaC compiler but I tested it with the Java 1.8.0_144 JRE. When I migrated the code last night to PB2019, I also received some run time warnings from the JVM and it created an error.log file as well for these run-time issues (warnings). What I did from there was upgrade my Java environment to JRE1.8.0_201 that also included the Java SDK of the same version (that has the JavaC compiler). After I rebuilt all the Java Classes with that Java SDK version and then ran the PB2Java test application again with the matching JRE versoin, all the run-time warnings (including a Java error log) went away.
FYI ... Java 1.8 SDK & Runtime: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I will be posting the updated PB2Java for PB2019 example up to SourceForge later today. So if you (or anyone else reading this thread) are interested in the PB2019 flavour, you'll be able to grab the latest version for PB2019.
HTH
Regards ... Chris
FYI: I have now released today the PB2019 version of the PB2Java example: http://chrispollach.blogspot.com/2019/09/pb2j.html
Note that I also upgraded my Java JDK/JRE to version 1.8.0_221 - a 64bit version of the JVM to compile & run the Java classes.
Regards ... Chris