The Source for Java Technology Collaboration

Home » java.net Forums » JDK » 6uN Early Access

Thread: javaws.exe stays in memory

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 14 - Last Post: May 7, 2009 5:33 AM by: jackieqqiu Threads: [ Previous | Next ]
martinstam

Posts: 7
javaws.exe stays in memory
Posted: Apr 8, 2008 8:43 AM
  Click to reply to this thread Reply

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

maksym_shostak

Posts: 22
Re: javaws.exe stays in memory
Posted: Apr 12, 2008 11:55 AM   in response to: martinstam
  Click to reply to this thread Reply

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

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

rogerl

Posts: 86
Re: javaws.exe stays in memory
Posted: Apr 15, 2008 3:02 PM   in response to: maksym_shostak
  Click to reply to this thread Reply

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

mthornton

Posts: 528
Re: javaws.exe stays in memory
Posted: Apr 16, 2008 2:10 AM   in response to: martinstam
  Click to reply to this thread Reply

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

Posts: 22
Re: javaws.exe stays in memory
Posted: Apr 16, 2008 8:20 AM   in response to: mthornton
  Click to reply to this thread Reply

Sorry, I found a bug in my app!

Message was edited by: maksym_shostak

martinstam

Posts: 7
Re: javaws.exe stays in memory
Posted: Apr 28, 2008 6:07 AM   in response to: mthornton
  Click to reply to this thread Reply

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

Posts: 184
Re: javaws.exe stays in memory
Posted: Apr 28, 2008 11:26 AM   in response to: martinstam
  Click to reply to this thread Reply

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

Posts: 7
Re: javaws.exe stays in memory
Posted: Apr 29, 2008 1:10 AM   in response to: rogyeu
  Click to reply to this thread Reply

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

Posts: 184
Re: javaws.exe stays in memory
Posted: Jul 10, 2008 9:35 AM   in response to: martinstam
  Click to reply to this thread Reply

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

Posts: 10
Re: javaws.exe stays in memory
Posted: Jul 10, 2008 10:40 AM   in response to: rogyeu
  Click to reply to this thread Reply

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

Posts: 184
Re: javaws.exe stays in memory
Posted: Jul 11, 2008 11:14 AM   in response to: infosun
  Click to reply to this thread Reply

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

martinoc

Posts: 29
Re: javaws.exe stays in memory
Posted: Apr 29, 2008 4:06 AM   in response to: mthornton
  Click to reply to this thread Reply

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

Posts: 184
Re: javaws.exe stays in memory
Posted: Apr 30, 2008 11:38 AM   in response to: martinoc
  Click to reply to this thread Reply

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.

ghaneman

Posts: 23
Re: javaws.exe stays in memory
Posted: Jul 14, 2008 7:31 PM   in response to: martinstam
  Click to reply to this thread Reply

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.

jackieqqiu

Posts: 1
Re: javaws.exe stays in memory
Posted: May 7, 2009 5:33 AM   in response to: martinstam
  Click to reply to this thread Reply

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

System.exit(0);

:-)




 XML java.net RSS