Java 主目录不存在 JBOSS
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19950059/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Home directory does not exist JBOSS
提问by zoit
I'm trying to run jboos as 7.1 and when I run the standalone.bat I get this error. I have configured everything as you can see here:
我正在尝试将 jboos 作为 7.1 运行,当我运行 standalone.bat 时出现此错误。我已经配置了所有内容,您可以在这里看到:
Calling "C:\jboss-as-7.1.1.Final\bin\standalone.conf.bat"
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\jboss-as-7.1.1.Final\
JAVA: C:\Program Files\Java\jdk1.7.0_45\bin\java
JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx51
2M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.se
rver.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war
ning=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djboss.server.default.c
onfig=standalone.xml
===============================================================================
13:21:17,915 Informaci?n [org.jboss.modules] JBoss Modules version 1.1.1.GA
java.lang.IllegalStateException: JBAS015849: Home directory does not exist: C:\j
boss-as-7.1.1.Final"
at org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:3
28)
at org.jboss.as.server.Main.determineEnvironment(Main.java:242)
at org.jboss.as.server.Main.main(Main.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.modules.Module.run(Module.java:260)
at org.jboss.modules.Main.main(Main.java:291)
Presione una tecla para continuar . . .
The bin/standalone.conf.bat is this one:
bin/standalone.conf.bat 是这样的:
rem ### -*- batch file -*- ######################################################
rem # ##
rem # JBoss Bootstrap Script Configuration ##
rem # ##
rem #############################################################################
rem # $Id: run.conf.bat 88820 2009-05-13 15:25:44Z [email protected] $
rem #
rem # This batch file is executed by run.bat to initialize the environment
rem # variables that run.bat uses. It is recommended to use this file to
rem # configure these variables, rather than modifying run.bat itself.
rem #
rem Uncomment the following line to disable manipulation of JAVA_OPTS (JVM parameters)
rem set PRESERVE_JAVA_OPTS=true
if not "x%JAVA_OPTS%" == "x" (
echo "JAVA_OPTS already set in environment; overriding default settings with values: % JAVA_OPTS%"
goto JAVA_OPTS_SET
)
rem #
rem # Specify the JBoss Profiler configuration file to load.
rem #
rem # Default is to not load a JBoss Profiler configuration file.
rem #
rem set "PROFILER=%JBOSS_HOME%\bin\jboss-profiler.properties"
rem #
rem # Specify the location of the Java home directory (it is recommended that
rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as
rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below).
rem #
rem set "JAVA_HOME=C:\opt\jdk1.6.0_23"
rem #
rem # Specify the exact Java VM executable to use - only used if JAVA_HOME is
rem # not set. Default is "java".
rem #
rem set "JAVA=C:\opt\jdk1.6.0_23\bin\java"
rem #
rem # Specify options to pass to the Java VM. Note, there are some additional
rem # options that are always passed by run.bat.
rem #
rem # JVM memory allocation pool parameters - modify as appropriate.
set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M"
rem # Reduce the RMI GCs to once per hour for Sun JVMs.
set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 - Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true"
rem # Warn when resolving remote XML DTDs or schemas.
set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true"
rem # Make Byteman classes visible in all module loaders
rem # This is necessary to inject Byteman rules into AS7 deployments
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.system.pkgs=org.jboss.byteman"
rem # Set the default configuration file to use if -c or --server-config are not used
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.server.default.config=standalone.xml"
rem # Sample JPDA settings for remote socket debugging
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
rem # Sample JPDA settings for shared memory debugging
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
rem # Use JBoss Modules lockless mode
rem set "JAVA_OPTS=%JAVA_OPTS% -Djboss.modules.lockless=true"
:JAVA_OPTS_SET
Why?. Thanks so much. Regards
为什么?。非常感谢。问候
采纳答案by zoit
The question was about unistalling my jboss and reinstall it again,Once I have done this and I have checked all the environment variables, everything Works fine.
问题是关于卸载我的 jboss 并重新安装它,完成此操作并检查所有环境变量后,一切正常。
回答by Lukas Eichler
Your JBOSS_HOME
enviroment variable was not properly set. It needs to point to the directory of your jboss server.
您的JBOSS_HOME
环境变量设置不正确。它需要指向你的 jboss 服务器的目录。
If you are trying to call something in windows under the C:\
directory in windows without administrator permissions there can be issues. Try to move jboss and the jboss_home
variable away from c:\
如果您尝试C:\
在没有管理员权限的情况下在 windows 目录下调用 windows 中的某些内容,则可能会出现问题。尝试将 jboss 和jboss_home
变量从c:\
回答by Grigory Kislin
For windows : set correctly JBOSS_HOME (with / slash) and rerun cmd in order to environment variable get exported
对于 Windows:正确设置 JBOSS_HOME(使用 / 斜线)并重新运行 cmd 以导出环境变量
回答by Martin Nuc
I was just dealing with same issue and actually helped to set JBOSS_HOME withoutthe end slash: d:\Programy\jboss-as-7.1.1.Final
我只是在处理同样的问题,实际上帮助设置了没有结尾斜线的JBOSS_HOME :d:\Programy\jboss-as-7.1.1.Final
回答by Windwalker
I just had the same error on windows with wildfly. In my case I accidently had environment variable %JBOSS_HOME% set with a trailing backslash "\". Removing the backslash solved the problem.
我在带有wildfly的Windows上遇到了同样的错误。就我而言,我不小心将环境变量 %JBOSS_HOME% 设置为尾随反斜杠“\”。删除反斜杠解决了问题。
回答by Mr Blowder
Try set value JBOSS_HOME without slash. Instead C:\jboss-as-7.1.1.Final\ -> C:\jboss-as-7.1.1.Final.
尝试设置不带斜杠的值 JBOSS_HOME。而是 C:\jboss-as-7.1.1.Final\ -> C:\jboss-as-7.1.1.Final。