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 204370 - Java Application couldn't locate resource, present in the class package folder
Summary: Java Application couldn't locate resource, present in the class package folder
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-28 19:42 UTC by cabman
Modified: 2011-11-16 16:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This is a ZIP of the project (637.70 KB, application/octet-stream)
2011-11-01 17:09 UTC, cabman
Details
Screenshot of the project output under NB 7.1 beta (56.47 KB, image/png)
2011-11-01 17:11 UTC, cabman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cabman 2011-10-28 19:42:55 UTC
Product Version = NetBeans IDE 7.1 Beta (Build 201109252201)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) 64-Bit Server VM 19.1-b02


Simple program tries to load the Properties from the resource stream. In NetBeans 6.9 this program works fine, but in 7.1 it throws NullPointerException.

The code sample:

InputStream is = this.getResourceAsStream(PROP_FILE_NAME);
(new Properties()).load(is);
Comment 1 Jiri Prox 2011-10-31 09:03:23 UTC
Can you please provide the project and the stack trace of the exception, you've got?

Thanks
Comment 2 cabman 2011-11-01 17:09:18 UTC
Created attachment 112692 [details]
This is a ZIP of the project

Jiri Prox asked to provide the project. Here you are.
Comment 3 cabman 2011-11-01 17:11:16 UTC
Created attachment 112693 [details]
Screenshot of the project output under NB 7.1 beta

and this is a message I got with NB 7.1 beta, while the NB 6.9 runs the project without a problem
Comment 4 Tomas Zezula 2011-11-02 17:28:55 UTC
Fixed jet-main b8c57a087a22
Comment 5 Tomas Zezula 2011-11-02 17:29:36 UTC
As a work around before the fix is integrated you can clean the project.
Comment 6 Quality Engineering 2011-11-04 15:05:29 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/b8c57a087a22
User: Tomas Zezula <tzezula@netbeans.org>
Log: #204370:Java Application couldn't locate resource, present in the class package folder