I am using jboss-7 and I want to change the port number from 8080 to 7001. Which file do I need to change?
When starting use
./standalone.sh -b 0.0.0.0 -Djboss.socket.binding.port-offset=1000 &
- for linux
standalone.bat -Djboss.socket.binding.port-offset=1000
- windows
here 1000 is the offset value. 8080 + 1000 = 9080 the application will start
For Windows:
standalone.bat
is using
standalone.conf.bat
Open in notepad
Add the last 2 lines (as seen below, aka the 2 "Alter Port Settings Offset" lines) (the first 3 lines should already be there...and provide the breadcrumb to where to place the 2 new lines that you need)
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 NEW LINE HERE Alter Port Settings Offset
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.socket.binding.port-offset=1000"
Go to jboss directory exp - jboss-7.0.0.CR1\jboss-7.0.0.CR1\standalone\configuration
open standalone.xml file then change port number according to you.
Change the socket-binding of http to your desire port number you want to use inside the socket-binding-group in your standalone.xml file of jboss.For example i am using 8090 as my port number.
<socket-binding name="http" port="8090"/>
go to installation directory .... Mine directory like that
C:\wildfly-10.0.0.CR5\standalone\configuration\
find standalone.xml
file, open and change the http port 8080
inside
<socket-binding-group>
Here I change my port number 8080 to 3333
<socket-binding name="http" port="${jboss.http.port:3333}"/>
In eclipse I open port-offset (that corrispondes to standalone.xml) and modify jboss.socket.binding.port-offset from 0 to 1000