How change the default port of Netbeans and Glassfish ?

    Share and Enjoy !

    How change the default port of Netbeans and Glassfish ?
    Glassfish and Oracle XE uses the same port 8080, and thus, if installed in the same system, results in the port conflict.
    Now, locate
    glassfish-3.0.1glassfishdomainsdomain1config and inside it, there is a file domain.xml. In the file, change the port number to 8081 from 8080. Now in the directory,  <home dir>/.netbeans/<version>/config, there is a file called .nbattrs – edit it 8080 to 8081:

    <attr name=”GlassFishEE6Instancesglassfish_autoregistered_instancehttpportnumber” stringvalue=”8081″/>

    Finally, a last and a small thing needs to be done. Netbeans need to recognize the new port number and so, we need to do the following steps:

    • Select Services window by using Window -> Services in NetBeans IDE.
    • In Servers window of NetBeans, remove GlassFish by using RemoveServer button after selecting GlassFish server.
    • Click on AddServer and select GlassFish and click on Next.
    • Select the Installation Location of GlassFish and click on Next.
    • Accept defaults and click on Finish.
    • Restart GlassFish, if it was already running.

    Ads code goes here

    Share and Enjoy !

    READ  How To Solve "Java SE Platform binary stopped working" Problem in Selenium?

    Leave a Comment

    Your email address will not be published. Required fields are marked *