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.
Create new "classic applet" project, open applet.xml and change class name in this line: <applet-class>classicapplet1.ClassicApplet1</applet-class> "Run" project. Output: ----------------- ... error: Applet classicapplet1/ClassicApplet11 is not found in package classicapplet1. ... error: Applet classicapplet1/ClassicApplet11 is not found in package classicapplet1. ... D:\w\nbp\ClassicApplet1\nbproject\build-impl.xml:227: BundleFile 'D:\w\nbp\ClassicApplet1\dist\ClassicApplet1.cap' does not exists BUILD FAILED (total time: 1 second) ----------------- So, 1st there is a message that packaging failed. At this point its clear already that application can't be run. And yet procedure continues until installer reports that file doesn't exist. A user have to search in output window to find a real reason of failure. Build used is #98.
Probably on packaging failure, the packager or its task should call System.exit() with a non-zero value or throw an Ant BuildException. The build script does <target name="do-pack"> <jc-pack failonerror="true"/> </target> so with failonerror="true", the problems is that the packager is never throwing an exception or producing an exit code indicating failure. If it can't be changed now, we could do something in the build script that checks for the destination file's existence, and fails the build immediately if it is missing, but the best message we could give is "Packaging failed." The packager could actually tell the user why it failed, which would probably be much more useful to the user.
It appears that packager *never* fails - same problem if you use ints or doubles in a classic applet project - you still get BUILD SUCCESSFUL.
Packager task should throw BuildException when packaging operation was unsuccessful.
Issue is fixed in PackTask by throwing BuildException in case when required distributable file wasn't created by Packager tool. Fixed in nbtasks.jar
Previous fix was incomplete. JCPackagerTask was checking if destination file exists. However packager task could be invoked when destination file previously existed. So I added deletion of destination file in JCPackagerTask before executing Packager.
Fixed in ant tasks jar - closing