Name: jk109818 Date: 02/13/2002
FULL PRODUCT VERSION :
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)
FULL OPERATING SYSTEM VERSION :windows 2000 sp1
ADDITIONAL OPERATING SYSTEMS : Probably occurs under all
versions.
EXTRA RELEVANT SYSTEM CONFIGURATION :
not applicable.
A DESCRIPTION OF THE PROBLEM :
If an error occurs when calling JNI_CreateJavaVM an error
message is sometimes output to the console.
This behaviour is inappropriate as the calling application
may not have a console window.
Additionally there is no way to programatically retrieve
the message to display it in a more appropriate manner.
This is particularly important when building plugins to
server side code (say a web server) which doesn't have a
UI. In this case the error should be written to a log file
not a console that doesn't exists.
Suggesting that the cout is redirected to the log file is
not always appropriate as the plugin may not have this
level of control.
Our specific application was building an active-x control
to be used in IIS. The control was being loaded during the
web application startup (which occurs before a browser
attaches). We can't tamper with IIS's cout and JNI should
not output to a console that it doesn't own (i.e. its
owned by the calling application).
JNI_CreateJavaVM should also return more meaningful error
codes other than -1. This makes it extremely hard to debug
problems!!!!!!
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. call JNI_CreateJavaVM passing in an invalid argument.
2.the call fails returning a value of -1
3.A message is printed on the console.
This bug can be reproduced always.
(Review ID: 138256)
======================================================================
- duplicates
-
JDK-4498651 VM sends error messages and warning to stdout not stderr
-
- Closed
-