Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add-user.bat on JBoss-as-7.1.1.Final,The system cannot find the path specified

Tags:

java

jboss7.x

i've installed jboss-as-7.1.1.Final on my windows 7. the installation was successfull, and i can see the server running on http:/localhost:8080/

But the problem is I am trying to add the users through add-user.bat file. It shows a error message like

C:\jboss-as-7.1.1.Final\bin>add-user.bat
The system cannot find the path specified.
Press any key to continue . . .

If I remove @echo off from the top of the script I see

> if "x" == "x" (set "JBOSS_MODULEPATH=C:\jboss-as-7.1.1.Final \modules" )   
> "C:\java\jre7\bin\bin\java" -jar "C:\jboss-as-7.1.1.Fina l\jboss-modules.jar"
       -mp "C:\jboss-as-7.1.1.Final\modules" org.jboss.as .domain-add-user
The system cannot find the path specified.   
> if "x" == "x" pause   
Press any key to continue . . .

I have set JBOSS_HOME and JAVA_HOME in environmental variables of my system.
Can any one please help to resolve this?

like image 962
Sboniso Avatar asked Jun 18 '13 15:06

Sboniso


1 Answers

You've set your JAVA_HOME variable wrong. You've set it to

JAVA_HOME=C:\java\jre7\bin

whereas you want it without the bin directory, i.e. just

JAVA_HOME=C:\java\jre7

However it's my recollection that JBoss needs a JDK, not a JRE. If that works, great; if not, you'll need to download an install a JDK instead and when you've installed that, set JAVA_HOME to the root path of the JDK install, e.g.

JAVA_HOME=C:\java\jdk1.7.0_25
like image 60
Rup Avatar answered Sep 28 '22 01:09

Rup