JDK:版本1.6
下了最新版的Nexus2.6.4,却始终运行不起来,显示The nexus-webapp service was launched, but failed to start.
查看%Nexus_HOME%下logs目录下的日志文件,报错:
JVM... jvm 5 | java.lang.UnsupportedClassVersionError: org/sonatype/nexus/bootstrap jsw/JswLauncher : Unsupported major.minor version 51.0 jvm 5 | at java.lang.ClassLoader.defineClass1(Native Method) jvm 5 | at java.lang.ClassLoader.defineClassCond(Unknown Source) jvm 5 | at java.lang.ClassLoader.defineClass(Unknown Source) jvm 5 | at java.security.SecureClassLoader.defineClass(Unknown Source) jvm 5 | at java.net.URLClassLoader.defineClass(Unknown Source) jvm 5 | at java.net.URLClassLoader.access$000(Unknown Source) jvm 5 | at java.net.URLClassLoader$1.run(Unknown Source) jvm 5 | at java.security.AccessController.doPrivileged(Native Method) jvm 5 | at java.net.URLClassLoader.findClass(Unknown Source) jvm 5 | at java.lang.ClassLoader.loadClass(Unknown Source) jvm 5 | at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) jvm 5 | at java.lang.ClassLoader.loadClass(Unknown Source) jvm 5 | Could not find the main class: org.sonatype.nexus.bootstrap.jsw.JswL uncher. Program will exit. jvm 5 | Exception in thread "main" wrapper | JVM exited while loading the application. wrapper | There were 5 failed launches in a row, each lasting less
等........
怀疑是jdk版本问题,不少人反应jdk7能跑起来,可是官方却也没有说明,不过我还是抱着不死的心在官网里游荡,后来看到在2.6.0的release里看到了一句话:
Java 6 Support EOL
Oracle's support for Java 6 ended in February 2013. Consequentially as of version 2.6 Nexus now requires a Java 7 JRE to run.
意思就是从2.6.0开始不支持6了,jdk版本要求7以上,恍然大悟啊,在这里希望能对和我一样遭遇的朋友有所帮助。