This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 225468 - Path is set to Netbeans directory as opposed to Glassfish Domain
Summary: Path is set to Netbeans directory as opposed to Glassfish Domain
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.4
Hardware: PC Windows 8
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
: 226808 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-01-29 12:49 UTC by LyndonArmitage
Modified: 2013-04-03 16:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Example Project of the (28.72 KB, application/zip)
2013-01-29 12:49 UTC, LyndonArmitage
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LyndonArmitage 2013-01-29 12:49:34 UTC
Created attachment 130776 [details]
Example Project of the

The directory referred to when calling File.getAbsolutePath() differs to what it was in previous versions of NetBeans.

Example Code Snippet:
File file = new File("");
System.out.println(file.getAbsolutePath());

Refers to: 
C:\Program Files\NetBeans 7.3 Beta 2

In the Beta build downloadable on the website. Whereas in previous NetBeans versions it referred correctly to the glassfish domain, 
e.g.
C:\Users\Lyndon\AppData\Roaming\NetBeans\7.2.1\config\GF3\domain1

See attached project for example code.
Comment 1 TomasKraus 2013-04-03 14:15:09 UTC
Relying on server current directory in applications is not a good idea.
But I changed start up code to set current directory to be domain DAS domain directory.

Checked into GlassFish Tooling Library:
---------------------------------------
changeset:   479:36f66444da9b
summary:     Bug# 225468 - Path is set to Netbeans directory
             as opposed to Glassfish Domain

changeset:   257:68211434d895
branch:      0.3-b036
summary:     Bug# 225468 - Path is set to Netbeans directory
             as opposed to Glassfish Domain
Comment 2 TomasKraus 2013-04-03 14:36:48 UTC
checked into NetBeans web-main:
-------------------------------
changeset:   249516:fa92d2536dbb
branch:      javaee7
summary:     #225468 - Path is set to Netbeans directory
             as opposed to Glassfish Domain
Comment 3 TomasKraus 2013-04-03 15:58:42 UTC
*** Bug 226808 has been marked as a duplicate of this bug. ***
Comment 4 TomasKraus 2013-04-03 16:20:41 UTC
I was testing behaviour of server started with asadmin and it still differs
from NetBeans GlassFish start up code.
GlassFish process current directory should be domain configuration directory.

GlassFish Tooling Library:
--------------------------

changeset:   258:db5d624ece2f
branch:      0.3-b036
summary:     Bug# 225468 - GlassFish process current directory
             changed to domain configuration directory

changeset:   480:88a87425db8d
summary:     Bug# 225468 - GlassFish process current directory
             changed to domain configuration directory

NetBeans web-main:
------------------
changeset:   249517:5dfbe0993a30
branch:      javaee7
summary:     #225468 - GlassFish process current directory
             changed to domain configuration directory