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 100827

Summary: SecurityException on running java task
Product: projects Reporter: pzajac <pzajac>
Component: AntAssignee: Jesse Glick <jglick>
Status: VERIFIED DUPLICATE    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Testing web project
Exception

Description pzajac 2007-04-12 18:04:54 UTC
[20070411]
Open attached project ant run target:

 <target name="testRun" depends="compile" >
        <java classname="a.Main" classpath="build/web/WEB-INF/classes"/> 
 </target>

a exception was thrown

java.lang.SecurityException
        at
org.netbeans.TopSecurityManager.checkSetSecurityManager(TopSecurityManager.java:351)
        at
org.netbeans.TopSecurityManager.checkPermission(TopSecurityManager.java:315)
        at java.lang.System.setSecurityManager0(System.java:253)
        at java.lang.System.setSecurityManager(System.java:245)
        at
org.apache.tools.ant.types.Permissions.restoreSecurityManager(Permissions.java:152)
        at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:227)
Comment 1 pzajac 2007-04-12 18:05:53 UTC
Created attachment 40839 [details]
Testing web project
Comment 2 pzajac 2007-04-12 18:06:39 UTC
Created attachment 40840 [details]
Exception
Comment 3 Jesse Glick 2007-04-12 18:27:30 UTC
You need to use fork=true.

*** This issue has been marked as a duplicate of 47645 ***
Comment 4 pzajac 2007-05-02 14:12:35 UTC
v