Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-06-2007, 01:55 PM
Member
 
Join Date: Jul 2007
Posts: 5
abhishek.jain is on a distinguished road
Too many java.exe processes due to netbeans
Hi All,



When I use netbeans for a long time, more than one java.exe processes are created. They consume a lot of memory.

After some time even tomcat starts throwing error that Tomcat is already running on the port even if the tomcat is

Not running. I have to kill java.exe processes manually so that my tomcat can run. Do anyone know how to solve this

Problem?



Regards

Abhishek
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-06-2007, 02:05 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Hi Abhishek,

Every time when you run your program (java application you are developing), netbeans spawns a new java.exe to run your program. If your program does not exit properly (e.g. with System.exit(1)) then those JVMs will continue to run and consume memory. This is the case for swing/console applications. I guess a similar logic exists for web application if you are developing a web application. So make sure you are using netbeans properly. You can read a basic netbeans web application tutorial showing how to run your web applications and find what is wrong in your approach.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-06-2007, 04:43 PM
Member
 
Join Date: Jul 2007
Posts: 5
abhishek.jain is on a distinguished road
Too many java.exe processes due to netbeans
Hi Sir,

Thanks for your reply but I have a question. How this thing is related to my tomcat? Let us say my program is not exiting properly but when i close my netbeans , wouldn't it shut down the bundled tomcat automatically.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-06-2007, 04:51 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Quote:
How this thing is related to my tomcat? Let us say my program is not exiting properly but when i close my netbeans , wouldn't it shut down the bundled tomcat automatically.
If you shut down netbeans in the normal way, you are right, netbeans also should close bundled tomcat but when you close it by killing the java.exe processes, i guess this may happen. Even if bundled tomcat s closed, the port used might not have been released properly.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 07-06-2007, 06:27 PM
Member
 
Join Date: Jul 2007
Posts: 5
abhishek.jain is on a distinguished road
Hi Sir

I got the mistake i was doing . First i ran the project in debug mode, then without stopping the debug mode i run my project without debug mode ,then again i start in debug mode and vice versa. After some time i got this error
Starting of Tomcat failed, the server port 8084 is already in use.
See the server log for details.
BUILD FAILED


Then i checked dos command prompt there were 14-15 lines showing the usage of 8084 port some were showing FIN_WAIT_2 and some CLOSE_WAIT state These ports are not released unless i restart my system or manually kill java.exe.
But i have a question as i am new to this netbeans why this starting and restarting in different modes give problem.
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 07-06-2007, 06:58 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Quote:
But i have a question as i am new to this netbeans why this starting and restarting in different modes give problem.
As far as i remember and as far as i understood your problem, there was a "Stop debugging" menu item in netbeans and netbeans expect you to stop debugging before going to another mode. This can be considered as a feature bug but i think your case is a rare one
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 07-10-2007, 08:07 AM
Member
 
Join Date: Jul 2007
Posts: 5
abhishek.jain is on a distinguished road
Hi Sir

I agree your point . I think it is a feature bug . This problem is also faced by some of my colleagues.

Thanks and Regards
Abhishek
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Netbeans+java+JasperReport wedage NetBeans 1 11-08-2008 02:28 PM
Java 3D In Netbeans nvidia NetBeans 1 04-09-2008 07:11 AM
Outcome differ from Netbeans and Java Web Start bongia New To Java 1 11-06-2007 03:35 PM
Creating Sub forms in java netbeans 5.0 java_newbie NetBeans 14 08-06-2007 09:19 PM
netbeans processes don´t die karlen NetBeans 0 06-11-2007 11:55 PM


All times are GMT +3. The time now is 12:13 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org