问题
Are there known Tomcat 6.0
and JDK 1.7.0_02
issues?
I know this is a hard question to answer, if the answer is no. But I need to ask just in case the answer is yes. Also I will accept any solutions to the issues below as answers. Please just share whatever issues you have had, and I will update this question if need be.
Issues:
Some issues I have run into since upgrading from JDK 1.7.0 to 1.7.0_02 (which I did to avoid the Eclipse's help menus from crashing, due to a Java 1.7.0 bug.):
- Tomcat server takes much longer to start, I need a 120 second timeout to handle it.
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
error, which disappeared the next day and then reappeared the third day, with no changes other than reloading Eclipse.- Tomcat server takes much longer to shut down. I need a 60 second timeout to handle it, from 15 second default.
- Eclipse itself appears to crawl to a halt (figuratively speaking) upon building the workspace and validating the project at hand. Everything within Eclipse appears to take longer, even opening an unopened file.
Everything seems suspicious.
P.S. JDK 1.7.0_02
is also known as 1.7.0u2
, Java SE 7u2
, Java SE 7 Update 2
, etc.
Versions:
- JDK =
Oracle
, 64-bit, downloaded from http://www.oracle.com/technetwork/java/javase/downloads/index.html. Exact file downloaded and installed wasjdk-7u2-windows-x64.exe
. - Tomcat =
Tomcat 6.0.33
, downloaded separately from Eclipse - Eclipse =
Eclipse Java EE IDE for Web Developers.
,Version: Indigo Release
,Eclipse Platform
,Version: 3.7.0.v20110530-9gF7UHNFFt4cwE-pkZDJ7oz-mj4OSEIlu9SEv0f
,Build id: I20110613-1736
. - 64-bit Windows 7 machine, 8GB RAM, Intel Core i7-2600 CPU @ 3.4GHz (4 cores)
- Eclipse, Tomcat, Apache HTTP Server, are all on the same (development) computer.
EDIT: Added system specs above.
回答1:
When running 64 bits Java with default options (references compaction is off by default), it requires almost twice the amount of memory than with 32 bits.
For Eclipse, open the eclipse.ini
file and double/increase a lot the -Xmx
option.
Of course, your physical memory may not be enough when running some JVMs.
So I recommend you to test the -XX:+UseCompressedOops
HotSpot option with 64 bits JVM and monitor memory usage thanks to jconsole
for instance. You can also read details about that recent option. That option
For Tomcat, create the file bin/setenv.bat
with content:
set JAVA_OPTS="-Xmx1024M -XX:+UseCompressedOops"
回答2:
Well, perhaps it's all about the new JVM released in that update. It alledgedly improves performance but... well, who knows. JDT on Tomcat6 interacts with JDK 1.7 so unexpected things could happen. Other than that, there're few things to check.
来源:https://stackoverflow.com/questions/9113509/known-tomcat-6-0-and-jdk-1-7-0-02-issues