Yes, there are ways to modify through files. Go to the Glassfish folder and access the following subfolders:
PASTAGLASSFISH/glassfish/domains/domain1/config
Inside this config folder is a file called domain.xml
. Edit in it the following part:
<network-listener protocol="http-listener-1" port="8080" name="http-listener-1" thread-pool="http-thread-pool" transport="tcp"></network-listener>
Put in port="SUAPORTA" the port you want, like 9999:
<network-listener protocol="http-listener-1" port="9999" name="http-listener-1" thread-pool="http-thread-pool" transport="tcp"></network-listener>
Now just start Glassfish normally.