Skip to main content

javaws.exe stays in memory

14 replies [Last post]
martinstam
Offline
Joined: 2008-01-02
Points: 0

After invoking and closing a random chosen java web start application (e.g. from http://java.sun.com/products/javawebstart/demos.html) javaws.exe stays in memory
(e.g. end of the day 10 copies of javaws.exe in Windows Task Manager)

Java Web Start 1.6.0_10-beta (b14)
Using JRE version 1.6.0_10-beta Java HotSpot(TM) Client VM
Windows XP

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
martinoc
Offline
Joined: 2006-05-05
Points: 0

Does anyone know if this particular issue has been fixed - i.e. having to call System.exit as opposed to disposing with all of the frames ?

rogyeu
Offline
Joined: 2006-07-30
Points: 0

Hi martinoc,

Have you told the Frame to exit your application when the windows is closed?

In JFrame, the default behavior is HIDE_ON_CLOSE. You have to call setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE) if you want your application to exit when user clicks on the "X" button.

In an AWT Frame, you need to add WindowsListener to catch your windows event either when it's closing or closed and exit the application.

Are you doing the above and still see javaws.exe exist in Task Manager? If so, please file a bug at http://bugreport.sun.com and provide the source with steps to reproduce the issue.

Lastly, not to confuse, javaws.exe with javaw.exe and java.exe...

Hope this helps,
Roger Y.

martinstam
Offline
Joined: 2008-01-02
Points: 0

by System.exit(0)

e.g. http://www.knmi.nl/turbowin/webstart/turbowin_jws.jnlp
select: File -> Exit

and check your Windows Task Manager

rogyeu
Offline
Joined: 2006-07-30
Points: 0

Hi martinstam,

Are you able to reproduce the issue with any post-beta builds? The latest build we have is b22. Can you please try that if you haven't already?

I cannot reproduce your issue myself. I'm curious, if you run web start apps many time, will you see one instance of javaws.exe or many instances of javaws.exe? Not to confuse javaws.exe with javaw.exe or java.exe.

Thanks,
Roger Y.

martinstam
Offline
Joined: 2008-01-02
Points: 0

Hi Roger

With b14 almost every java web start application resulted in a copy of javaws.exe resident in memory

Now with build 1.6.0_10-beta-b22 after 40-50 times invoking and quitting a web start application I have 10 instances of javaws.exe (not javaw.exe and not java.exe) resident in memory (see attached file)

Have I overlooked something?

rogyeu
Offline
Joined: 2006-07-30
Points: 0

Hi martinstam,

I'm reviewing this issue again. You mentioned:
"Now with build 1.6.0_10-beta-b22 after 40-50 times invoking and quitting a web start application I have 10 instances of javaws.exe"

Do you mean you just the WebStart app to load and then exit the app?
Or, do you interrupt the loading of the app?
Anything special that I need to do to reproduce this behavior?

We still cannot reproduce the issue in house. Can you reproduce it with the latest build consistently?

Thanks,
Roger Y.

infosun
Offline
Joined: 2006-10-13
Points: 0

Hi Roger,

even under Linux i see this problem.

strange, if i always enable java console --> show console in the java control panel
the problem is gone.

If the 6uN Team is interested on this OS, i could give you some more details.

Joe

rogyeu
Offline
Joined: 2006-07-30
Points: 0

Yes. It would be great if you can provide more details in how to reproduce the issue. I have selected not to show Java Console and I still cannot reproduce the issue.

-- RY

jackieqqiu
Offline
Joined: 2009-05-07
Points: 0

pls add the following line to the end of your program:

System.exit(0);

:-)

ghaneman
Offline
Joined: 2006-11-09
Points: 0

I'm using b27 on Win XP and I see something else that may be related. When I launch any webstart app (the jgoodies demo apps or jide demo app are examples), it will launch most of the time, but occasionally it doesn't. The application's splash screen shows but the application just doesn't appear. The Windows task manager shows the javaw.exe process in memory and I must kill it in order to terminate it.

This happens with or without quick starter enabled. Unfortunately, this is intermittent but it does happen. Sometimes, it takes 10 tries to get the 1 failure. This may explain the javaws.exe processes.

mthornton
Offline
Joined: 2003-06-10
Points: 0

Do you know if the WebStart apps in question 'exit' by using System.exit, or by merely closing all their frames. Both ought to work, but on many versions of WebStart the second does not.

maksym_shostak
Offline
Joined: 2007-07-17
Points: 0

[b]Sorry, I found a bug in my app![/b]

Message was edited by: maksym_shostak

maksym_shostak
Offline
Joined: 2007-07-17
Points: 0

I have the same problem with javaw.exe after executing standalone application.

JRE version 1.6.0_...
Windows XP Pro SP2 (En).

rogerl
Offline
Joined: 2004-11-15
Points: 0

We are not able to reproduce this on b21, can you try this build and let us know if you still see this problem?

Build 21, or later can be found on https://jdk6.dev.java.net/6u10ea.html#Download

Thank you,
Roger