2011年9月21日 星期三

Eclipse start but return exit code=1

環境: Win 7, 64 bits, eclipse 1.6.26 64 bits
錯誤:
在 eclipse.ini 中加入這一行, 就搞定了,
-XX:-UseCompressedOops
其中 -UseCompressed Oops中的減號, 代表 "不要用",
因此, 讓是元件(Oops)壓縮(Compress)程解壓縮的錯誤,

找到一些說明:

-XX command-line options


JVM command-line options that are specified with -XX are not stable and are not recommended for casual use.
These options are subject to change without notice.
-XXallowvmshutdown:[false|true]
This option is provided as a workaround for customer applications that cannot shut down cleanly, as described in APAR IZ59734. Customers who need this workaround should use -XXallowvmshutdown:false. The default option is -XXallowvmshutdown:true forJava 6 SR5 onwards.
-XX:MaxDirectMemorySize=<size>
Sets the maximum size for an nio direct buffer. By default, the maximum size is 64 MB.
-XX:-StackTraceInThrowable
This option removes stack traces from exceptions. By default, stack traces are available in exceptions. Including a stack trace in exceptions requires walking the stack and that can affect performance. Removing stack traces from exceptions can improve performance but can also make problems harder to debug.
When this option is enabled, Throwable.getStackTrace() returns an empty array and the stack trace is displayed when an uncaught exception occurs. Thread.getStackTrace() and Thread.getAllStackTraces() are not affected by this option.
-XX:+UseCompressedOops
(64-bit only) This option enables compressed references in 64-bit JVMs and is provided to help when porting applications from the Sun JVM to the IBM® JVM. This option might not be supported in subsequent releases. The -XX:+UseCompressedOops option is similar to specifying -Xcompressedrefs, which is detailed in the topic JVM command-line options .
-XX:-UseCompressedOops
(64-bit only) This option prevents the use of compressed references in 64-bit JVMs. The option is provided to help when porting applications from the Sun JVM to the IBM JVM, and might not be supported in subsequent releases.
Reference:
http://stackoverflow.com/questions/5054035/eclipse-cdt-crashes-java
http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=%2Fcom.ibm.java.doc.user.aix64.60%2Fdiag%2Fappendixes%2Fcmdline%2Fcommands_jvm_xx.html

*******
其實這個問題並沒有解決, 偶爾還是會, 後來配置又作了一些修改:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-vm
C:/Program Files/Java/jdk1.6.0_26/bin/javaw.exe
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-server
-Xss2m
-XX:+DoEscapeAnalysis
-XX:+UseConcMarkSweepGC
-Dosgi.requiredJavaVersion=1.5
-Xms200m
-Xmx1024m
-XX:-UseCompressedOops
-Xint

沒有留言:

張貼留言