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 127240

Summary: NPE on Run Internally
Product: qa Reporter: Ivan Sidorkin <ivansidorkin>
Component: CodeAssignee: issues@qa <issues>
Status: CLOSED FIXED    
Severity: blocker CC: mkhramov
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 127268    
Bug Blocks:    

Description Ivan Sidorkin 2008-02-12 23:05:11 UTC
Product Version: NetBeans IDE Dev (Build 200802120006)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

with installed Testing Tools

- create Java Application
- add Jelly TestCase Test
- add required libraries
- try to run added class internally 

java.lang.NullPointerException
	at org.openide.filesystems.FileUtil.copyFile(FileUtil.java:400)
	at org.netbeans.modules.jemmysupport.runinternally.RunInternallyAction.getScript(RunInternallyAction.java:312)
	at org.netbeans.modules.jemmysupport.runinternally.RunInternallyAction.execute(RunInternallyAction.java:348)
	at
org.netbeans.modules.jemmysupport.runinternally.RunInternallyAction.executeSelectedMainClass(RunInternallyAction.java:191)
	at org.netbeans.modules.jemmysupport.runinternally.RunInternallyAction.access$000(RunInternallyAction.java:88)
	at org.netbeans.modules.jemmysupport.runinternally.RunInternallyAction$1.run(RunInternallyAction.java:121)
[catch] at java.lang.Thread.run(Thread.java:619)
Comment 1 Jesse Glick 2008-02-15 20:32:12 UTC
Should not be copying source as FileObject. Can be trivially rewritten to use getResourceAsStream and FileUtil.copy instead.
Comment 2 Jiri Skrivanek 2008-02-19 13:20:26 UTC
Fixed as suggested.
http://hg.netbeans.org/main/contrib/rev/2d568afc1078
Comment 3 Ivan Sidorkin 2008-03-02 01:45:14 UTC
verified