The Source for Java Technology Collaboration
User: Password:



Fabrizio Giudici

Fabrizio Giudici's Blog

Running NetBeans 6 on SoyLatte (follow up)

Posted by fabriziogiudici on November 28, 2007 at 12:12 PM | Comments (8)

Landon Fuller has released the R3 version of his preview of the Java 6 port for Mac OS X. This simplifies the setup of NetBeans 6 and I've fixed a final problem with it.

Now, to run NetBeans 6 with SoyLatte, you just need:
  1. run setenv DISPLAY :0.0 (or similar commands for other shells)
  2. launch X11 from /Application/Utilities
  3. patch $NETBEANS_HOME/etc/netbeans.conf with the appropriate L&F settings:

    netbeans_default_options="... other options ... --laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel"

  4. patch $NETBEANS_HOME/harness/run.xml with:
    <target name="run" depends="-prepare-as-app,-prepare-as-platform">
        ...
            <exec os="Linux SunOS Solaris Darwin Mac OS X" dir="." executable="sh" failonerror="yes">
            ...
            </exec>
    </target>
  5. If you're developing a NetBeans RCP application, add this property to your nbproject/project.properties:
    run.args.extra=... other settings ... --laf com.sun.java.swing.plaf.gtk.GTKLookAndFeel


Technorati Tags: , , ,

Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • PS You need to set the DISPLAY variable in some global environment settings if you want to run NetBeans by clicking on its icon, otherwise you'll have to run the launcher script from the same terminal window where you have set DISPLAY.

    Posted by: fabriziogiudici on November 28, 2007 at 12:36 PM

  • I'm told that steps #1 and #2 are not needed with Leopard (I won't be able to put my hands on my Leopard box for some days).

    Posted by: fabriziogiudici on November 28, 2007 at 01:53 PM

  • Thanks for the instructions. Yes, #1 and #2 are not needed in Leopard because launchd manages $DISPLAY for you and starts X11 on demand.

    I do not have a Tools > Options menu item doing the above. I'm guessing this is because it's putting "Preferences" in the nonexistent application menu instead. I looked at the code that implements this, or so I thought, but it seems that despite System.getProperty("mrj.version") returning null, it's still trying to do some Mac stuff.

    I tried removing the screenMenuBar option from netbeans_default_options but that didn't help either.

    Any ideas how I can get to Options? I need to customize the fonts...

    Posted by: nriley on November 28, 2007 at 02:18 PM

  • Not yet. Up to now I haven't been able to have JNI stuff work and I suspect that this is the problem behind the missing "Options" (the thing is implemented in NetBeans with a small native library I think).

    In the meantime, if the problem is that fonts are too small, add --fontsize 13 or such to /usr/local/soylatte16-i386-r3/bin/

    Posted by: fabriziogiudici on November 28, 2007 at 02:41 PM

  • BTW, if you need to develop for Java 6, you can run NetBeans as usual, install SoyLatte under /System/Library/Frameworks/JavaVM.framework/Versions/SoyLatte.1.6.0/Home and then add a new Java platform (selecting that directory). NetBeans will run Java 5, but will compile and launch your application with Java 6.

    Posted by: fabriziogiudici on November 28, 2007 at 03:33 PM

  • soylatte16-amd64-r3 is quite quick...

    on my mac:

    appletviewer -J-d64 http://math.nist.gov/scimark2/run.html

    570.3 using amd64-r3
    516.0 using std leopard 1.5

    shame gtk is so ugly.

    Posted by: goron on November 29, 2007 at 01:30 PM

  • Of course --fontsize should be added to __ $NETBEANS_HOME/etc/netbeans.conf __

    Posted by: fabriziogiudici on November 29, 2007 at 10:29 PM

  • I reopen Netbeans with Apple JDK, configure the menubar to add Exit and Options from the actions list. Now they are accessible in SoyLatte.

    Posted by: weijun on December 11, 2007 at 12:38 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds