Results 1 to 8 of 8
  1. #1
    abhishek.jain is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Default 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

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    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.

  3. #3
    abhishek.jain is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Default 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.

  4. #4
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    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.

  5. #5
    abhishek.jain is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Default

    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.

  6. #6
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    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 :)

  7. #7
    abhishek.jain is offline Member
    Join Date
    Jul 2007
    Posts
    5
    Rep Power
    0

    Default

    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

  8. #8
    nextechie is offline Member
    Join Date
    Dec 2009
    Posts
    1
    Rep Power
    0

    Default Thx for help

    Thx a lot.... i tried as you said above and it is now working fine...
    but i dont understand how we can shut down apart from killing java.exe explicitly........ i have gone through tutorial and my execution was correct...

    neway....for now..it is working fine.....

Similar Threads

  1. Netbeans+java+JasperReport
    By wedage in forum NetBeans
    Replies: 1
    Last Post: 11-08-2008, 12:28 PM
  2. Java 3D In Netbeans
    By nvidia in forum NetBeans
    Replies: 1
    Last Post: 04-09-2008, 05:11 AM
  3. Outcome differ from Netbeans and Java Web Start
    By bongia in forum New To Java
    Replies: 1
    Last Post: 11-06-2007, 01:35 PM
  4. Creating Sub forms in java netbeans 5.0
    By java_newbie in forum NetBeans
    Replies: 14
    Last Post: 08-06-2007, 07:19 PM
  5. netbeans processes don´t die
    By karlen in forum NetBeans
    Replies: 0
    Last Post: 06-11-2007, 09:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •