Notices: This section not yet converted to new layout. Download stats are rolling back out.



Package test results have failed.

This package was approved by moderator gep13 on 1/6/2016.

JBoss is a Application Server. It is possible to run Web application ARchive (WAR) files using JBoss. JBoss 7.1.1 requires a JDK 7 in order to run.

Overriding installation parameters example:

Install JBoss to c:\jboss and set the default admin account to "bob" with a password of "mypass":

choco install jboss -params '"/Start:false /InstallationPath:"c:\jboss" /Username:bob /Password:mypass"'

To install JBoss, run the following command from the command line or from PowerShell:

C:\> choco install jboss-as

To upgrade JBoss, run the following command from the command line or from PowerShell:

C:\> choco upgrade jboss-as


  • tools\chocolateyinstall.ps1 Show
    function hash([string] $value){    
        $md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
        $utf8 = new-object -TypeName System.Text.UTF8Encoding
        $hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($value))).ToLower().Replace('-', '')
        echo $hash
    $ErrorActionPreference = 'Stop'
    $packageName = 'jboss'
    $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
    $url = ''
    $arguments = @{}
    $packageParameters = $env:chocolateyPackageParameters
    $installationPath = "c:\opt\jboss"
    $jbossAdmin = "admin"
    $jbossPass = "password"
    $startService = "true"
    $arguments = @{};
    $packageParameters = $env:chocolateyPackageParameters;
    if($packageParameters) {
    	Write-Host "PackageParameters: $packageParameters"
    	$match_pattern = "\/(?<option>([a-zA-Z]+)):(?<value>([`"'])?([a-zA-Z0-9- _\\:\.\$]+)([`"'])?)|\/(?<option>([a-zA-Z]+))"
    	#""" fixes issues with notepad++
    	$option_name = 'option'
        $value_name = 'value'
    	if ($packageParameters -match $match_pattern ){
    	  $results = $packageParameters | Select-String $match_pattern -AllMatches
    	  $results.matches | % {
    	  Throw "Package Parameters were found but were invalid (REGEX Failure)"
    	if($arguments.ContainsKey("InstallationPath")) {
    	  $installationPath = $arguments["InstallationPath"];
    	  Write-Host "Value variable installationPath changed to $installationPath"
    	} else {
    	  Write-Host "Default InstallationPath will be used"
    	if($arguments.ContainsKey("Username")) {
    	  $jbossAdmin = $arguments["Username"];
    	  Write-Host "Admin username changed to $jbossAdmin"
    	} else {
    	  Write-Host "Default admin username will be used"
    	if($arguments.ContainsKey("Password")) {
    	  $jbossPass = $arguments["Password"];
    	  Write-Host "Admin password changed to $jbossPass"
    	} else {
    	  Write-Host "Default admin password will be used. PLEASE CHANGE THIS!!!"
    	if($arguments.ContainsKey("Start")) {
    	  $startService = $arguments["Start"];
    	  Write-Host "Start service? $startService"
    	} else {
    	  Write-Host "Service will be automatically started"
    } else {
    	Write-Host "Package parameters will not be overwritten"
    $packageArgs = @{
      packageName   = $packageName
      unzipLocation = $installationPath
      url           = $url
      checksum      = '175c92545454f4e7270821f4b8326c4e'
      checksumType  = 'md5'  
    Install-ChocolateyZipPackage @packageArgs
    Write-Debug "Copy to $installationPath\ from $installationPath\jboss-as-7.1.1.Final"
    cp -Recurse -Force $installationPath\jboss-as-7.1.1.Final\* $installationPath\jboss-as-7.1.1.Final\..\
    Write-Debug "Remove $installationPath\jboss-as-7.1.1.Final"
    rm -Force -Recurse $installationPath\jboss-as-7.1.1.Final
    Install-ChocolateyEnvironmentVariable -variableName "JBOSS_HOME" -variableValue "$installationPath" -variableType 'Machine'
    Install-ChocolateyPath "$installationPath\bin" "Machine"
    Write-Verbose "Adding management user to JBoss"
    $hashPass = hash ($jbossAdmin + ":ManagementRealm:" + $jbossPass)
    $jbossUser = "$jbossAdmin=$hashPass" 
    Write-Debug "Admin user hash: $jbossUser ==>  $installationPath\standalone\configuration\"
    Add-Content $installationPath\standalone\configuration\ "`r`n$jbossUser" -Encoding utf8
    Write-Verbose "Checking for JBOSS service..."
    $jbossSvc = Get-Service jboss*
    if($jbossSvc -eq $null){
    	Write-Host "Installing JBoss Service"
    	Write-Debug "Service unzipLocation $installationPath"
    	$servicePackageArgs = @{
    		packageName   = "$packageName-Service"
    		unzipLocation = $installationPath
    		url           = ""
    		url64bit      = ""
    		checksum    = 'acc45d49f1838183726bf616f0069cfc'
    		checksumType= 'md5'
    		checksum64    = '63477e8e166c9ec695ab2922ca0a31b0'
    		checksumType64= 'md5'
    	Install-ChocolateyZipPackage @servicePackageArgs
        cp $toolsDir\service.bat $installationPath\bin\service.bat -force
        &$installationPath\bin\service.bat install
        Set-Service jboss -StartupType Automatic
    	if($startService -eq "true"){
    		Write-Host "Starting Service"
    		Start-Service jboss
    	} else {
    		Write-Host "Start service set to $startService"
    Write-Host "JBoss service installed"
  • tools\chocolateyuninstall.ps1 Show
    $ErrorActionPreference = 'Stop'; # stop on all errors
    $packageName = 'jboss'
    Write-Debug "Checking for JBOSS service..."
    $jbossSvc = Get-Service jboss*
    if($jbossSvc -ne $null){
    	Stop-Service jboss
    	&sc.exe delete jboss
    Uninstall-ChocolateyZipPackage $packageName ""
    Install-ChocolateyEnvironmentVariable "JBOSS_HOME" $null "Machine"
    $path = Get-EnvironmentVariable "PATH" "Machine"
    Write-Host "Current path: $path"
    $installationPath = Get-EnvironmentVariable "JBOSS_HOME" "Machine"	
    $newPath = $path.Replace("$installationPath\bin;", $null)
    Write-Host "New Path: $newPath"
    Install-ChocolateyEnvironmentVariable "PATH" $newPath "Machine"
  • tools\service.bat Show
    @echo off
    REM JBoss, the OpenSource webOS
    REM Distributable under LGPL license.
    REM See terms of license at
    REM -------------------------------------------------------------------------
    REM JBoss Service Script for Windows
    REM -------------------------------------------------------------------------
    REM ITL Corrections
    REM	Changed service name, display & description
    REM Changed run.bat t0 standalone.bat
    REM Changed shutdown -S to jboss-cli.bat --connect command=:shutdown
    REM Changed JAVAOPTS
    @if not "%ECHO%" == "" echo %ECHO%
    @if "%OS%" == "Windows_NT" setlocal
    set DIRNAME=%CD%
    REM during the build with ant filter.
    set SVCDISP=JBoss Application Server 7.1.1
    set SVCDESC=JBoss Application Server 7.1.1 GA/Platform: Windows x64
    set NOPAUSE=Y
    REM Suppress killing service on logoff event
    set JAVAOPTS=-Xmx1024M –Xms512M –XX:MaxPermSize=512M -Xrs
    REM Figure out the running mode
    if /I "%1" == "install"   goto cmdInstall
    if /I "%1" == "uninstall" goto cmdUninstall
    if /I "%1" == "start"     goto cmdStart
    if /I "%1" == "stop"      goto cmdStop
    if /I "%1" == "restart"   goto cmdRestart
    if /I "%1" == "signal"    goto cmdSignal
    echo Usage: service install^|uninstall^|start^|stop^|restart^|signal
    goto cmdEnd
    REM jbosssvc retun values
    REM ERR_RET_USAGE           1
    REM ERR_RET_VERSION         2
    REM ERR_RET_INSTALL         3
    REM ERR_RET_REMOVE          4
    REM ERR_RET_PARAMS          5
    REM ERR_RET_MODE            6
    if errorlevel 1 echo Invalid command line parameters
    if errorlevel 2 echo Failed installing %SVCDISP%
    if errorlevel 4 echo Failed removing %SVCDISP%
    if errorlevel 6 echo Unknown service mode for %SVCDISP%
    goto cmdEnd
    mkdir %JBOSS_HOME%\standalone\log
    echo Service Installed > %JBOSS_HOME%\standalone\log\service.log
    jbosssvc.exe -imwdc %SVCNAME% "%DIRNAME%" "%SVCDISP%" "%SVCDESC%" service.bat
    if not errorlevel 0 goto errExplain
    echo Service %SVCDISP% installed
    goto cmdEnd
    jbosssvc.exe -u %SVCNAME%
    if not errorlevel 0 goto errExplain
    echo Service %SVCDISP% removed
    goto cmdEnd
    REM Executed on service start
    del %JBOSS_HOME%\standalone\log\.r.lock 2>&1 | findstr /C:"being used" > nul
    if not errorlevel 1 (
      echo Could not continue. Locking file already in use.
      goto cmdEnd
    echo Y > %JBOSS_HOME%\standalone\log\.r.lock
    jbosssvc.exe -p 1 "Starting %SVCDISP%" >> %JBOSS_HOME%\standalone\log\service.log
    call standalone.bat --server-config=standalone.xml < %JBOSS_HOME%\standalone\log\.r.lock >> %JBOSS_HOME%\standalone\log\service.log 2>&1
    jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> %JBOSS_HOME%\standalone\log\service.log
    del %JBOSS_HOME%\standalone\log\.r.lock
    goto cmdEnd
    REM Executed on service stop
    echo Y > %JBOSS_HOME%\standalone\log\.s.lock
    jbosssvc.exe -p 1 "Shutting down %SVCDISP%" >> %JBOSS_HOME%\standalone\log\service.log
    call jboss-cli.bat --connect command=:shutdown < %JBOSS_HOME%\standalone\log\.s.lock >> %JBOSS_HOME%\standalone\log\service.log 2>&1
    jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> %JBOSS_HOME%\standalone\log\service.log
    del %JBOSS_HOME%\standalone\log\.s.lock
    goto cmdEnd
    REM Executed manually from command line
    REM Note: We can only stop and start
    echo Y > %JBOSS_HOME%\standalone\log\.s.lock
    jbosssvc.exe -p 1 "Shutting down %SVCDISP%" >> %JBOSS_HOME%\standalone\log\service.log
    call jboss-cli.bat --connect command=:shutdown < %JBOSS_HOME%\standalone\log\.s.lock >> %JBOSS_HOME%\standalone\log\service.log 2>&1
    del %JBOSS_HOME%\standalone\log\.s.lock
    REM Delete lock file
    del %JBOSS_HOME%\standalone\log\.r.lock > nul 2>&1
    REM Wait one second if lock file exist
    jbosssvc.exe -s 1
    if exist "%JBOSS_HOME%\standalone\log\.r.lock" goto waitRun
    echo Y > %JBOSS_HOME%\standalone\log\.r.lock
    jbosssvc.exe -p 1 "Restarting %SVCDISP%" >> %JBOSS_HOME%\standalone\log\service.log
    call standalone.bat --server-config=standalone.xml < %JBOSS_HOME%\standalone\log\.r.lock >> %JBOSS_HOME%\standalone\log\service.log 2>&1
    jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> %JBOSS_HOME%\standalone\log\service.log
    del %JBOSS_HOME%\standalone\log\.r.lock
    goto cmdEnd
    REM Send signal to the service.
    REM Requires jbosssch.dll to be loaded in JVM
    @if not ""%2"" == """" goto execSignal
    echo Missing signal parameter.
    echo Usage: service signal [0...9]
    goto cmdEnd
    jbosssvc.exe -k%2 %SVCNAME%
    goto cmdEnd

Virus Scan Results

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.


Package Maintainer(s)

Software Author(s)

  • JBoss Developers


Release Notes

Version History

Version Downloads Last updated Status

Discussion for the JBoss Package

Ground rules:

  • This discussion is only about JBoss and the JBoss package. If you have feedback for Chocolatey, please contact the google group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or JBoss, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.

comments powered by Disqus uses cookies to enhance the user experience of the site.