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 147779

Summary: Cannot force IDE to refresh cached .class file
Product: java Reporter: Martin Krauskopf <mkrauskopf>
Component: SourceAssignee: Tomas Zezula <tzezula>
Status: RESOLVED WORKSFORME    
Severity: blocker Keywords: RANDOM
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Cached class file screenshot

Description Martin Krauskopf 2008-09-20 08:26:21 UTC
Take a look at the screenshot. Originally the code in the main body was:

        String dump = FileUtils.readFileToString(new File(DUMP_FILE));
        System.err.println(dump);

Which dumps content of a file.

I've changed it to the on you see in the screenshot. Running the file still apparently uses the old .class file and
ignore new content. Should print just "hi".

- Clean and Build does not help
- deleting project's 'dist' and 'build' dirs in Files View helped
Comment 1 Martin Krauskopf 2008-09-20 08:27:07 UTC
Created attachment 70181 [details]
Cached class file screenshot
Comment 2 Martin Krauskopf 2008-09-20 08:28:06 UTC
Damn, sorry for wrongly submitted mime-type of .png attachment.
Comment 3 Martin Krauskopf 2008-09-20 08:31:23 UTC
Seems to have random nature (kw -> RANDOM)
Comment 4 Tomas Zezula 2008-09-22 10:13:57 UTC
Compile on save.
Comment 5 Tomas Zezula 2008-09-23 14:12:59 UTC
Neither me nor reporter is not able to reproduce it. As Martin is not sure which changes were done in IDE and which in the shell, closing as WORKSFORME.
If you find a way how to reproduce it, please reopen.