Update the launcher to work in Debian.

Index: netbeans-7.0.1+dfsg1/ide/launcher/unix/netbeans
===================================================================
--- netbeans-7.0.1+dfsg1.orig/ide/launcher/unix/netbeans	2011-07-28 20:45:40.000000000 +0100
+++ netbeans-7.0.1+dfsg1/ide/launcher/unix/netbeans	2011-08-02 23:42:39.694164784 +0100
@@ -41,6 +41,17 @@
 # Version 2 license, then the option applies only if the new code is
 # made subject to such option by the copyright holder.
 
+# The Startup Notification Protocol Specification established by freedesktop.org
+# recommends to unset the DESKTOP_STARTUP_ID environment variable to avoid
+# possible reuse by some process started later by this process, e.g. when a browser
+# will be started after clicking a hyperlink in the NetBeans.
+if [ ! -z $DESKTOP_STARTUP_ID ] ; then
+    # Save a value for later using in the NB_DESKTOP_STARTUP_ID
+    NB_DESKTOP_STARTUP_ID=$DESKTOP_STARTUP_ID; export NB_DESKTOP_STARTUP_ID
+
+    unset DESKTOP_STARTUP_ID
+fi
+
 #
 # resolve symlinks
 #
@@ -57,16 +68,18 @@
     fi
 done
 
-progdir=`dirname "$PRG"`
+#progdir=`dirname "$PRG"`
+# Patch for Debian/Ubuntu/Fedora where launcher is in /usr/bin
+progdir=/usr/share/netbeans/7.0.1/bin
 
 if [ -f "$progdir"/../etc/netbeans.conf ] ; then
     . "$progdir"/../etc/netbeans.conf
 fi
 
 # following should be done just in RPM or Solaris Launcher
-# if [ -f /etc/netbeans.conf ] ; then
-#     . /etc/netbeans.conf
-# fi
+if [ -f /etc/netbeans.conf ] ; then
+    . /etc/netbeans.conf
+fi
 
 
 # #68373: look for userdir, but do not modify "$@"
@@ -194,7 +207,7 @@
             --branding nb \
             --clusters '"$netbeans_clusters"' \
             -J-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade \
-            -J-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense \
+            --cp:p /usr/share/java/log4j-1.2.jar \
             ${netbeans_default_options} \
             '"$@"'
         ;;
Index: netbeans-7.0.1+dfsg1/ide/launcher/netbeans.conf
===================================================================
--- netbeans-7.0.1+dfsg1.orig/ide/launcher/netbeans.conf	2011-07-28 20:45:40.000000000 +0100
+++ netbeans-7.0.1+dfsg1/ide/launcher/netbeans.conf	2011-08-02 23:43:19.783332097 +0100
@@ -3,7 +3,7 @@
 
 # Options used by NetBeans launcher by default, can be overridden by explicit
 # command line switches:
-netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true"
+netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.pmoffscreen=false"
 # Note that default -Xmx and -XX:MaxPermSize are selected for you automatically.
 # You can find these values in var/log/messages.log file in your userdir.
 # The automatically selected value can be overridden by specifying -J-Xmx or
