3 Replies Latest reply on Feb 21, 2011 4:49 AM by handat

    Glassfish Working Directory

      I've noticed that Glassfish's working directory is located at /domain_dir/domain/config. Is there anyway to change the working directory location?
        • 1. Re: Glassfish Working Directory
          What do you mean by working directory? The directory you mentioned is the instance configuration directory where logically all the configurations are stored at, but temporary files or compiled files don't go there.
          • 2. Re: Glassfish Working Directory
            What I mean by working directory is inside your program when your reference a file by relative path ./app/myapp/config in Weblogic that would translate in to absolute path of /domaindir/domain/app/myapp/config but in Glassfish it is /domaindir/domain/config/app/myapp/config
            • 3. Re: Glassfish Working Directory
              Using a relative PATH like what you were doing is not recommended because as you have seen, the result will vary between application servers.

              To get the location you want, you can use the following variable from the system and prepend it to your file path:


              If you really want to change the default, you can set the system variable for "user.dir"