JDK-4486580 : javaw and shutdown hooks (referring to #4302814)
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.3.1,5.0u6
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,windows_2000
  • CPU: generic,x86
  • Submitted: 2001-07-31
  • Updated: 2014-02-28
  • Resolved: 2014-02-28
Related Reports
Relates :  
Description
Name: krC82822			Date: 07/31/2001


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)

Bug #4302814 describes the problem. It is closed as "not a bug".

I disagree and think it is a bug. I hope it can be re-opened.

Why should shutdown hooks be invoked for "java", but not for "javaw" processes?
How does the general concept of "javaw" differ from "java" in this respect to
justify a different behavior of java.lang.Runtime?

Think of GUI apps, which are preferably launched using "javaw". When the user
logs out or shuts down the system, such apps have no chance to flush some
files, store some settings, perform some cleanup etc. The only workaround is to
launch the app using "java", which is not a viable alternative because it opens
an ugly terminal window.
(Review ID: 126995) 
======================================================================

Comments
RT Triage team: will not fix
28-02-2014

WORK AROUND Name: krC82822 Date: 07/31/2001 Use "java", not "javaw", see above. ======================================================================
09-09-2004

EVALUATION Will work with VM group to see what clarifications we can make in the documentation regarding this issue. ###@###.### 2002-02-14 See the comments on BugParade: http://developer.java.sun.com/developer/bugParade/bugs/4486580.html ###@###.### 2003-10-07
14-02-2002