olivechinese 发表于 2013-1-16 02:28:21

jboss5 在 jdk6中启动的问题

启动时,出现
类似如下错误
java.lang.IllegalStateException: Class not found: [Ljava.lang.String; 。。。。。。。。

根据官方网站的提示:
http://lists.jboss.org/pipermail/jboss-development/2007-June/009714.html
Classloading Gotcha in JDK6Jason T. Greene jboss-development%40lists.jboss.org?Subject=%5Bjboss-dev%5D%20Classloading%20Gotcha%20in%20JDK6&In-Reply-To=
Wed Jun 13 18:12:33 EDT 2007
Previous message: jboss-4.2-testsuite-sun-1.5 Build Completed With Testsuite Errors
Next message: Re: Classloading Gotcha in JDK6
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
FYI,There is an undocumented system property (besides the jvm source) in JDK5 and 6 called "sun.lang.ClassLoader.allowArraySyntax". The default changed from true to false in JDK6. So what this means is that in JDK6,unless you set that property to true, if you try and load a Java arraytype using a classloader (e.g. "-- Jason T. GreeneLead, POJO CacheJBoss, a division of Red Hat
-----------------------------
红色部分。。。
解决的方法:
修改run.bat文件:
将这一行改为set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -
Dsun.lang.ClassLoader.allowArraySyntax=true
就可以了   

如果是从eclipse中启动,则需在JDK的
Optional Java VM arguments 项 增加
-Dsun.lang.ClassLoader.allowArraySyntax=true
即可
页: [1]
查看完整版本: jboss5 在 jdk6中启动的问题