Java -version takes 45 seconds to respond
Any idea as to why it's taking so long to respond to "java -version" command? The only unique setting difference I know of is that this is VMWare, I believe.
[yhan@p121505vdbs2001 ~]$ time java -version
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
[yhan@p121505vdbs2001 ~]$ uname -a
Linux p121505vdbs2001 2.6.18-348.el5 #1 SMP Wed Nov 28 21:22:00 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
How busy is the machine? What's the output from " w | head -1"? My Rasberry Pi responds faster than that
the machine is not busy at all.
[yhan@p121505vdbs2001 201304]$ w | head -1
19:34:20 up 19 days, 23:12, 1 user, load average: 0.17, 0.10, 0.06
Then I'm not sure what is going on. I guess if your Java interpreter was on an incredibly slow disk or if you had no appreciable memory left then I could see it but it seems like this isn't a Java problem per se - your system has something else going on.
I will say that your version of Linux is a bit older. I'm running 3.x kernels on everything I have. 2.6.18 looks like it's about 6 or 7 years old at this point. I know that you don't always have a choice in that. It may be related to using a very recent Java with an older Linux but that is really just a guess.
Looking into the possibility of Linux version being outdated for the installed java. will see...
Downgraded to java 1.6 but having same problem. My admin thinks virus scanner might be a cause. The machine a third party hosted machine. Does that make sense?
Virus scan was the cause of problem, according to hosting company.