Applicaiton works fine with PB development environment. Now
I have compiled the exe of the same and that is not
working... returns -1 for 'CreateJavaVM'. I have copied
jvm.dll ,PBjvm105.DLL, pbejbclient105.pbd,
pbejbclient105.jar to the same directory of application exe.
When I searched on my machine I found many jvm.dll... even
in powerbuilder folder there are two under client and server
folder. I am not sure which to take?
I don't know where else it searchs for this dll and let me
know if i am missing any other .dlls or .jar files to be
copied
Regards,
Sandeep
in order to use the ones in the directory of the installed application, we set it as follows:
[HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java]
"JDKLocation"="."
"JDKLocationDef"="."
"JREBinLocation"=".\\jre\\bin\\client"
"JREBinLocationDef"=".\\jre\\bin\\client"
obviously -in this example- we have a jre folder where the exe is deployed
HTH,
Ben
PS: activate JVM logging to find out from where the classes are loaded/used
In article <46cc5ce0.32d...@sybase.com>, sandeep says...
Modifying the registry keys, at least for PB 11, for JDK and
JRE locations does absolutely nothing except for change my
Java version in the IDE. This has no bearing on the
deployed app.
Am I missing something?
Furthermore, though it is not documented, my testing shows
that setting the $JAVA_HOME environment variable to a JDK
will cause the deployed app to use that java version instead
of the default in the PB shared directory.
This is so frustrating...the documentation on running java
from a deployed app is extremely lacking...
HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java\PBIDECONFIG
HKEY_LOCAL_MACHINE\SOFTWARE\Sybase\PowerBuilder\10.5\Java\PBRTCONFIG
Depending on the app. server, you'll have to define specific startup options.
- define what JVM logging you want
- extra JVM startup props (e.g. required to connect to a WebSphere server)
...
in my experience, common problems are:
- JVM doesn't load -> check environment variables (java, path, javahome) & LOCALMACHINE
settings on the deployed PCs.
- lookup/connect fails (check for correct JVM loaded) -> check classpath, app.server
dependent classes present, compressed jars (best to zip with 0% compression), app.server
deployment
- serialization errors (eg: "cannot read from underlying bridge") --> client classes doesn't
match server classes
- PBNI -> incompatible PB proxies for java classes
Ben
PS: It's true that PB-java doc/samples is not sufficient, IMO it deserves much more
attention.
In article <46cf392e.73b...@sybase.com>, Brett Birschbach says...