Installing JBuilder 9 on OS X (revisited)

Sep 03, '03 10:22:00AM

Contributed by: therlihy

With the skillful assistance of the borland.public.jbuilder.macintosh usergroup (Paul Furbacher and Tony Piselli in particular), I did succeed in downloading, installing, and running the free Personal Edition of Borland JBuilder 9 (Linux version) on my Mac (running OS X 10.2.6). This experience may give others confidence.

[robg adds: There's a previous hint on this subject, but it starts with a functional, installed Linux version. This hint uses OS X only ... I have not tested these instructions.]

  1. The download was completely straightforward. I did use gzip and tar commands in the Terminal to decompress and de-archive the jb9_linux.tar.gz file, just to be sure I would not create a MacBinary (with Stuffit Expander) that wouldn't behave properly. This was probably not necessary.

  2. Again in the Terminal, I used the simple command line(s) provided by Tony and Paul in the usergroup posts to install the program from the binary file. It varies from the Borland Linux release notes, which suggest you can choose the Directory where JBuilder will be stored. In fact, you specify the Linux default location and, somehow, the Darwin system places it in a Mac-like location suited to the purpose -- /Developer/Applications/. Note that this directory may not even exist if you haven't installed the Developer Tools that came with your Mac -- do this first if you haven't, but go to the Apple website indicated in the next step to get the December 2002 version if you didn't buy your Mac recently.

    In the Terminal, change directories to the folder in which you find the per_install.bin file. The command lines for installation follow:
    
     % chmod 744 per_install.bin
     % sh per_install.bin LAX_VM /usr/bin/java
    
  3. Before attempting to run the program (and this is the first Java app I believe I have ever run on this machine), I checked the Mac updates site to see if the July 2002 Developer Tools I originally installed on my machine are the latest. They are not, and Apple stresses the need to install two updates (48 MB and 301 MB) to get current at JDK 1.4.1, as noted:
    The Mac OS X Developer Tools are available from the Download Software link. There are two components to download that together give you the full Java 1.4.1 development environment for Mac OS X. The Mac OS X section contains the base Mac OS X Developer Tools. Download and install the most current released version available. There is also a Java–specific update to the base developer tools, the Java 1.4.1 Developer Tools Update, which is available in the Java section. Download and install this as well.
    Here's the site for the free downloads (you do have to go through becoming a "member" to access the software--a small inconvenience at most): http://connect.apple.com/. The update went fine.

  4. I really have no idea if the following is necessary, but I followed some advice posted on macosxhints.com for getting JBuilder7 working on a Mac again after updating the JDK from 1.3.1 to 1.4.1 (the latter is necessary for JBuilder9). I'm not even sure the jdk.config file is being read (it refers to the Mac operating system, and I'd love to know where that came from because I installed a Linux system). For what it's worth, I followed these directions and the program does run:
    1. In your JBuilder7 folder, navigate to JBuilder.framework -> bin/

    2. Open the jdk.config file in a text editor. You may need to do this from the shell with the sudo command depending on how the permissions to JBuilder7 are set.

    3. Add the following line (shown on two lines, enter as one without any spaces):
      javapath /System/Library/Frameworks/JavaVM.framework/
        Versions/1.4.1/Libraries/libjvm_compat.dylib
      
    4. Save the file and launch JBuilder7 by double clicking the icon.
    Obviously, the above has to be read to refer to JBuilder9, not 7.

  5. Last step: running the program. I am going to experiment with Mac's new "JAR Bundler" to create a double-clickable application, but for the moment, I am following Paul F's advice to start JBuilder using the Terminal app. The following is a generic text file named JB9alt.command that accomplishes this. I store it in my home directory, because that's where the Borland registratioon file I was sent in email is housed. This file activates the program at no cost. Strangely, I have not yet been asked to activate the product -- it just runs.
    
    # JB9alt.command
    # Credits:
    # Original author -- Dave Yost
    # Modifications -- Paul Furbacher
    # Use at your own risk; make modifications according to
    # your installation.
    
    # Optional arguments in the last line of this script:
    #
    # -info  prints out info equivalent to that found in the About
    #        box > Info tab.
    #
    # -verbose  prints out a verbose record of the OpenTool initializatin
    #        and more
    #
    # -license  starts the License Manager
    #
    
    echo "Environment"
    /usr/bin/env
    echo ""
    
    if [ $# -eq 0 ]
      then args="-info"
      else args=$@
    fi
    
    echo $args
    
    JBUILDER_HOME=/Developer/Applications/JBuilder9
    jdk=1.4.1
    
    useGrowBox=true
    
    cd $JBUILDER_HOME/JBuilder.framework/bin
    
    #jars=`find ../patch ../lib ../lib/ext -name \*.jar | tr '\012' : `
    jars=`find ../lib -name \*.jar | tr '\012' : `
    
    exec
    /System/Library/Frameworks/JavaVM.framework/Versions/$jdk/Commands/java \
     -Xdock:name="JBuilder 8_Ent":icon=$JBUILDER_HOME/JBuilder.app/Contents/\
     Resources/JBuilder.icns \
     -Xmaxf0.2 \
     -Xminf0.2 \
     -Dapple.laf.useScreenMenuBar=true \
     -Dapple.awt.showGrowBox=$useGrowBox \
     -Xverify:none \
     -Xbootclasspath/p:../lib/lawt.jar:../lib/javac.jar:../lib/TabbedPaneFix.jar:../lib/\
    SequencedEventFix.jar:../lib/JarManifestFix.jar:/Syste$
     -Xms32m \
     -Xmx256m \
     -cp ${jars}:/System/Library/Java \
     com.borland.jbuilder.JBuilder $args
    
    I don't know that much yet about UNIX, but the extension (".command") allows you to simply double-click on the file in the Mac Finder, and the script will execute in the Terminal, and about 40 seconds later, you have JBuilder9 running. Pretty neat.

    It is important that this file be generic text with UNIX linebreaks and "gremlins zapped." Go to the Borland usergroup if you want more advice on this, but use BBEdit Lite for starters, not the Mac's own Text Editor.

    You may wonder why the "alt" is in the filename. Some late-breaking advice indicated that an added JAR library is needed to run the latest JBuilder in the latest Mac environment (a lib/javac.jar is necessary). It is now accessed by the script.

    That's it!

    Comments (25)


    Mac OS X Hints
    http://hints.macworld.com/article.php?story=20030901190958614