2010-06-07 46 views
0

我用的是1.6.0_19 JDK和安裝JDK 1.6.0_20 .. Glassfish的不一樣,... 這裏是我的Windows環境變量..Glassfish的3廣東話更新JDK沒有辦法

ALLUSERSPROFILE=C:\ProgramData 
ANT_HOME=C:\apache-ant-1.8.1\ 
APPDATA=C:\Users\Parhs\AppData\Roaming 
CommonProgramFiles=C:\Program Files\Common Files 
COMPUTERNAME=PARHS-PC 
ComSpec=C:\Windows\system32\cmd.exe 
FP_NO_HOST_CHECK=NO 
HOMEDRIVE=C: 
HOMEPATH=\Users\Parhs 
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_20\ 
LOCALAPPDATA=C:\Users\Parhs\AppData\Local 
LOGONSERVER=\\PARHS-PC 
NUMBER_OF_PROCESSORS=2 
OS=Windows_NT 
Path=C:\Program Files\PHP\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wb 
em;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Toshiba\Bluetoot 
h Toshiba Stack\sys\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\apa 
che-ant-1.8.1\bin 
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC 
PHPRC=C:\Program Files\PHP\php.ini 
PROCESSOR_ARCHITECTURE=x86 
PROCESSOR_IDENTIFIER=x86 Family 6 Model 14 Stepping 8, GenuineIntel 
PROCESSOR_LEVEL=6 
PROCESSOR_REVISION=0e08 
ProgramData=C:\ProgramData 
ProgramFiles=C:\Program Files 
PROMPT=$P$G 
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ 
PUBLIC=C:\Users\Public 
SESSIONNAME=Console 
SystemDrive=C: 
SystemRoot=C:\Windows 
TEMP=C:\Users\Parhs\AppData\Local\Temp 
TMP=C:\Users\Parhs\AppData\Local\Temp 
USERDOMAIN=Parhs-PC 
USERNAME=Parhs 
USERPROFILE=C:\Users\Parhs 
VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ 
windir=C:\Windows 

而且,這裏是我的asenv.bat

REM請勿改變或刪除版權 通知或這個頭。 REM REM 版權所有2004-2009 Sun Microsystems, Inc.保留所有權利。 REM REM使用 受許可條款REM

集AS_IMQ_LIB = .... \ MQ \ lib中設置 AS_IMQ_BIN = .... \ MQ \ BIN設定 AS_CONFIG = .. \ Config中設置AS_INSTALL = .. 集AS_DEF_DOMAINS_PATH = .. \域設置 AS_DERBY_INSTALL = .... \ JavaDB之外設置 AS_JAVA = 「C:\ PROGRAM 文件\的Java \ jdk1.6.0_20」

雖然重新啓動系統和服務器I我得到這份報告

Operating System Information: 
Name of the Operating System: Windows 7 
Binary Architecture name of the Operating System: x86, Version: 6.1 
Number of processors available on the Operating System: 2 
System load on the available processors for the last minute: -1.0. (Sum of running and queued runnable entities per minute) 

General Java Runtime Environment Information for the VM: [email protected] 
JRE BootClassPath: C:\glassfishv3\glassfish/modules/endorsed\javax.annotation.jar;C:\glassfishv3\glassfish/modules/endorsed\jaxb-api-osgi.jar;C:\glassfishv3\glassfish/modules/endorsed\webservices-api-osgi.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_19\jre\classes;C:\glassfishv3\glassfish\lib\monitor\btrace-boot.jar 
JRE ClassPath: C:\glassfishv3\glassfish\modules\glassfish.jar;C:\glassfishv3\glassfish\lib\monitor\btrace-agent.jar 
JRE Native Library Path: C:\Program Files\Java\jdk1.6.0_19\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\PHP\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\apache-ant-1.8.1\bin 
JRE name: Java HotSpot(TM) Client VM Vendor: Sun Microsystems Inc. Version: 16.2-b04 
List of System Properties for the Java Virtual Machine: 
ANTLR_USE_DIRECT_CLASS_LOADING = true 
AS_CONFIG = C:\glassfishv3\glassfish\config\..\config 
AS_DEF_DOMAINS_PATH = C:\glassfishv3\glassfish\config\..\domains 
AS_DERBY_INSTALL = C:\glassfishv3\glassfish\config\..\..\javadb 
AS_IMQ_BIN = C:\glassfishv3\glassfish\config\..\..\mq\bin 
AS_IMQ_LIB = C:\glassfishv3\glassfish\config\..\..\mq\lib 
AS_INSTALL = C:\glassfishv3\glassfish\config\.. 
AS_JAVA = C:\Program Files\Java\jdk1.6.0_20\jre 
GlassFish_Platform = Felix 
awt.toolkit = sun.awt.windows.WToolkit 
catalina.base = C:\glassfishv3\glassfish\domains\domain1 
catalina.home = C:\glassfishv3\glassfish\domains\domain1 
catalina.useNaming = false 
com.sun.aas.configRoot = C:\glassfishv3\glassfish\config 
com.sun.aas.derbyRoot = C:\glassfishv3\javadb 
com.sun.aas.domainsRoot = C:\glassfishv3\glassfish\domains 
com.sun.aas.hostName = Parhs-PC 
com.sun.aas.imqBin = C:\glassfishv3\mq\bin 
com.sun.aas.imqLib = C:\glassfishv3\mq\lib 
com.sun.aas.installRoot = C:\glassfishv3\glassfish 
com.sun.aas.installRootURI = file:/C:/glassfishv3/glassfish/ 
com.sun.aas.instanceName = server 
com.sun.aas.instanceRoot = C:\glassfishv3\glassfish\domains\domain1 
com.sun.aas.instanceRootURI = file:/C:/glassfishv3/glassfish/domains/domain1/ 
com.sun.aas.javaRoot = C:\Program Files\Java\jdk1.6.0_19\jre 
com.sun.enterprise.config.config_environment_factory_class = com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory 
com.sun.enterprise.hk2.cacheDir = C:\glassfishv3\glassfish\domains\domain1\osgi-cache\felix 
com.sun.enterprise.jaccprovider.property.repository = C:\glassfishv3\glassfish\domains\domain1/generated/policy 
com.sun.enterprise.security.httpsOutboundKeyAlias = s1as 
common.loader = ${catalina.home}/common/classes,${catalina.home}/common/endorsed/*.jar,${catalina.home}/common/lib/*.jar 
eclipselink.security.usedoprivileged = true 
ejb.home = C:\glassfishv3\glassfish\modules\ejb 
felix.config.properties = file:/C:/glassfishv3/glassfish/osgi/felix/conf/config.properties 
felix.fileinstall.bundles.new.start = true 
felix.fileinstall.debug = 1 
felix.fileinstall.dir = C:\glassfishv3\glassfish/modules/autostart/ 
felix.fileinstall.poll = 5000 
felix.system.properties = file:/C:/glassfishv3/glassfish/osgi/felix/conf/system.properties 
file.encoding = Cp1253 
file.encoding.pkg = sun.io 
file.separator = \ 
glassfish.version = GlassFish v3 (build 74.2) 
hk2.startup.context.args = #Mon Jun 07 20:27:37 EEST 2010 
-startup-classpath=C\:\\glassfishv3\\glassfish\\modules\\glassfish.jar;C\:\\glassfishv3\\glassfish\\lib\\monitor\\btrace-agent.jar 
__time_zero=1275931657334 
hk2.startup.context.mainModule=org.glassfish.core.kernel 
-startup-args=--domain,,,domain1,,,--domaindir,,,C\:\\glassfishv3\\glassfish\\domains\\domain1 
--domain=domain1 
-startup-classname=com.sun.enterprise.glassfish.bootstrap.ASMain 
--domaindir=C\:\\glassfishv3\\glassfish\\domains\\domain1 

hk2.startup.context.root = C:\glassfishv3\glassfish\modules 
http.nonProxyHosts = localhost|127.0.0.1|Parhs-PC 
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment 
java.awt.printerjob = sun.awt.windows.WPrinterJob 
java.class.path = C:\glassfishv3\glassfish\modules\glassfish.jar;C:\glassfishv3\glassfish\lib\monitor\btrace-agent.jar 
java.class.version = 50.0 
java.endorsed.dirs = C:\glassfishv3\glassfish/modules/endorsed;C:\glassfishv3\glassfish/lib/endorsed 
java.ext.dirs = C:\Program Files\Java\jdk1.6.0_19\jre/lib/ext;C:\Program Files\Java\jdk1.6.0_19\jre/jre/lib/ext;C:\glassfishv3\glassfish\domains\domain1/lib/ext 
java.home = C:\Program Files\Java\jdk1.6.0_19\jre 
java.io.tmpdir = C:\Users\Parhs\AppData\Local\Temp\ 
java.library.path = C:\Program Files\Java\jdk1.6.0_19\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\PHP\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\apache-ant-1.8.1\bin 
java.net.useSystemProxies = true 
java.rmi.server.randomIDs = true 
java.runtime.name = Java(TM) SE Runtime Environment 
java.runtime.version = 1.6.0_19-b04 
java.security.auth.login.config = C:\glassfishv3\glassfish\domains\domain1/config/login.conf 
java.security.policy = C:\glassfishv3\glassfish\domains\domain1/config/server.policy 
java.specification.name = Java Platform API Specification 
java.specification.vendor = Sun Microsystems Inc. 
java.specification.version = 1.6 
java.util.logging.config.file = C:\glassfishv3\glassfish\domains\domain1\config\logging.properties 
java.vendor = Sun Microsystems Inc. 
java.vendor.url = http://java.sun.com/ 
java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi 
java.version = 1.6.0_19 
java.vm.info = mixed mode 
java.vm.name = Java HotSpot(TM) Client VM 
java.vm.specification.name = Java Virtual Machine Specification 
java.vm.specification.vendor = Sun Microsystems Inc. 
java.vm.specification.version = 1.0 
java.vm.vendor = Sun Microsystems Inc. 
java.vm.version = 16.2-b04 
javax.net.ssl.keyStore = C:\glassfishv3\glassfish\domains\domain1/config/keystore.jks 
javax.net.ssl.keyStorePassword = changeit 
javax.net.ssl.trustStore = C:\glassfishv3\glassfish\domains\domain1/config/cacerts.jks 
javax.net.ssl.trustStorePassword = changeit 
javax.rmi.CORBA.PortableRemoteObjectClass = com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject 
javax.rmi.CORBA.StubClass = com.sun.corba.ee.impl.javax.rmi.CORBA.StubDelegateImpl 
javax.rmi.CORBA.UtilClass = com.sun.corba.ee.impl.javax.rmi.CORBA.Util 
javax.security.jacc.PolicyConfigurationFactory.provider = com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl 
jdbc.drivers = org.apache.derby.jdbc.ClientDriver 
jpa.home = C:\glassfishv3\glassfish\modules\jpa 
line.separator = 

org.glassfish.web.rfc2109_cookie_names_enforced = false 
org.jvnet.hk2.osgimain.autostartBundles = osgi-adapter.jar, org.apache.felix.shell.jar, org.apache.felix.shell.remote.jar, org.apache.felix.configadmin.jar, org.apache.felix.fileinstall.jar 
org.jvnet.hk2.osgimain.bundlesDir = C:\glassfishv3\glassfish\modules 
org.jvnet.hk2.osgimain.excludedSubDirs = autostart/ 
org.omg.CORBA.ORBClass = com.sun.corba.ee.impl.orb.ORBImpl 
org.omg.CORBA.ORBSingletonClass = com.sun.corba.ee.impl.orb.ORBSingleton 
org.osgi.framework.storage = C:\glassfishv3\glassfish\domains\domain1\osgi-cache\felix 
os.arch = x86 
os.name = Windows 7 
os.version = 6.1 
osgi.shell.telnet.ip = 127.0.0.1 
osgi.shell.telnet.maxconn = 1 
osgi.shell.telnet.port = 6666 
package.access = 
package.definition = 
path.separator = ; 
security.home = C:\glassfishv3\glassfish\modules\security 
server.loader = ${catalina.home}/server/classes,${catalina.home}/server/lib/*.jar 
shared.loader = ${catalina.home}/shared/classes,${catalina.home}/shared/lib/*.jar 
sun.arch.data.model = 32 
sun.boot.class.path = C:\glassfishv3\glassfish/modules/endorsed\javax.annotation.jar;C:\glassfishv3\glassfish/modules/endorsed\jaxb-api-osgi.jar;C:\glassfishv3\glassfish/modules/endorsed\webservices-api-osgi.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\resources.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0_19\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0_19\jre\classes;C:\glassfishv3\glassfish\lib\monitor\btrace-boot.jar 
sun.boot.library.path = C:\Program Files\Java\jdk1.6.0_19\jre\bin 
sun.cpu.endian = little 
sun.cpu.isalist = pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86 
sun.desktop = windows 
sun.io.unicode.encoding = UnicodeLittle 
sun.java.launcher = SUN_STANDARD 
sun.jnu.encoding = Cp1253 
sun.management.compiler = HotSpot Client Compiler 
sun.os.patch.level = 
user.country = GR 
user.dir = C:\glassfishv3\glassfish\domains\domain1 
user.home = C:\Users\Parhs 
user.language = el 
user.name = Parhs 
user.timezone = Europe/Athens 
user.variant = 
web.home = C:\glassfishv3\glassfish\modules\web 
weld.home = C:\glassfishv3\glassfish\modules\weld 

爲什麼這麼難?我錯過了什麼?

回答

1

我在使用Glassfish v3和Java 1.6.0_20,我沒有改變asenv.bat中的任何東西,我沒有任何問題。但是,我在PATH中有java可執行文件(即%JAVA_HOME%\binPATH中)。你不(我會解決這個問題,我不會去碰asenv.bat,然後再試一次)。

+0

用於運行啓動工具的虛擬機和配置爲運行glassfish的虛擬機需要相同(出於某種原因)。我在solaris上遇到過同樣的問題。 – Justin 2010-06-07 19:35:25

0

爲了防止某人出現某些PITA,我收到了同樣的錯誤,並用引號定義了JAVA_HOME。 Mine JAVA_HOME是「C:\ Program Files \ Java \ jdk1.6.0_31 \」,並在PATH%JAVA_HOME%\ bin中出現。 java,eclipse,tomcat ant和其他一些java程序將開始,但glassfish不會。