La aplicación de escritorio Java tarda mucho en ejecutarse

When I run any project java desktop application in netbeans (F6) or run any .jar file java desktop application, it's always delay about 20 seconds or more.

I tested this project on another computer, it works ok (no delay).

Does my computer have an error with Java? Any solution for this problem?

Editar 12/11/2011

Is it true? I check my system, and I think my java application load too much because I can't turn on "Java Quick Starter". It is in Control Panel > Java > [tab] Advanced > Miscellaneous > Java Quick Starter In my laptop, I can't enable Java Quick Starter.
¡¡¡Gracias por tu ayuda!!!

preguntado el 08 de noviembre de 11 a las 10:11

Can you be a bit more specific on where that "delay" occurs, what technology you use and possibly provide a SSCCE? -

3 Respuestas

Netbeans will compile your project first, this takes a while. A directly ran java application with a reasonable size jar file should not take more than a second to launch. Of course this does not account for the system you use, if everything you do is slow, so is launching java applications.

respondido 08 nov., 11:14

I've check my system and I realize it cannnot enable Java Quick Starter. Please check your system and tell me how can I enable this features. Thank so much - Vu Anh

Maybe you could try to rise the JVM memory and see what happens...

I think there are 2 params you can give to the Javac to do that they are Xmx( max ) Xms(starting mem)

Or you could try to run jviVisualVM which is a app that comes with java for memory throubleshooting it should be inside java\bin directory

respondido 08 nov., 11:16

I've check my system and I realize it cannnot enable Java Quick Starter. Please check your system and tell me how can I enable this features. Thank so much - Vu Anh

In response to your question about Java Quick Starter. The introducción on the sun website show the following:

JQS is enabled by default in Windows XP and Windows 2000 operating systems and is not necessary on Windows Vista as Vista offers its own pre-loading mechanisms.

y después:

Note: JQS service will perform runtime checks and stop running when a laptop is running on batteries. JQS service will resume when the power cord is plugged in, as performance benefit of JQS is largely dependent on overall system configuration.

Perhaps this is one of your problems.

respondido 15 nov., 11:17

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.