- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: error in calling JNI_CreateJavaVM on hpux from...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2003 08:33 AM
тАО03-11-2003 08:33 AM
error in calling JNI_CreateJavaVM on hpux from shared library
Can anyone suggest what could possibly be wrong.
Note: The code is working in Solaris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-11-2003 09:46 AM
тАО03-11-2003 09:46 AM
Re: error in calling JNI_CreateJavaVM on hpux from shared library
My first bet is that JVM is not in $PATH. But never playd with that stuff myself.
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 04:00 AM
тАО03-12-2003 04:00 AM
Re: error in calling JNI_CreateJavaVM on hpux from shared library
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 04:31 AM
тАО03-12-2003 04:31 AM
Re: error in calling JNI_CreateJavaVM on hpux from shared library
#include
#include
int main(int argc, char* argv[])
{
int nError = 0;
JavaVMInitArgs sArgs;
JavaVMOption sOptions[2];
JavaVM *psMachine = (JavaVM *)0;
void *pvEnv = (void *)0;
sArgs.version = JNI_VERSION_1_2;
JNI_GetDefaultJavaVMInitArgs(&sArgs);
sOptions[0].optionString = "-Djava.compiler=NONE";
sOptions[0].optionString = "-Djava.class.path=.:/usr/local/lib";
nError = JNI_CreateJavaVM(&psMachine, &pvEnv, &sArgs);
if (nError < 0)
{
cout << "Error: ";
cout << nError;
cout << " - JNI_CreateJavaVM()\n";
} /* if */
else
{
} /* else */
return 0;
} /* main */
The error that I get in this is:
Java HotSpot(TM) Server VM warning: Disabling implicit null checks.
There was an error trying to initialize the HPI library.
Please check your installation, HotSpot does not work correctly
with any JDK 1.1.x release.
Error: -1 - JNI_CreateJavaVM()
Does anyone has any clues??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2003 04:58 AM
тАО03-12-2003 04:58 AM
Re: error in calling JNI_CreateJavaVM on hpux from shared library
As I understand this the problem lies n the side of Java environment rather than your code. But JVM is quite complicated application so the can be many points that are failing (maximum memory? maximum files open? problems with shared libraries linkage?)
Are you able to do any Java on the machine with the same Java engine, but started somewhat differently? Mayby the environment is configured not properly? As I imagine this the JVM itself must be started as separate process. So there must be some fork(). You make it (as I understand) from inside a shared library. Have you tried to use it directly from plain test main()? Check in the manuals for JNI for the situations where JNI_CreateJavaVM() may fail and why.
Unluckilly I'm only guessing. Someone that actually used that package by himself could find the situation easier to understand of course. But as I can see nobody was able to help yet.
Good luck
Adam