Archive for the ‘howto’ Category

Update Documentation in Xcode

Friday, October 23rd, 2009

TUAW had a article last night on how to update the api documentation in Xcode.

Now you’ll find your documentation sets in the Xcode Preferences window (Xcode > Preferences… or Command-, and then choose the Documentation tab). Also, if checked, Xcode will automatically update your documentation when you launch it.

This Documentation panel offers subscription options for installing a documentation set (such as, for example, Mac OS X Legacy Library or iPhone OS 2.2 Library) as well as a handy Check and Install Now button that lets you request the latest updates. Use this to keep on top of the latest documentation updates.

Here’s a screen shot:
Xcode Documentation Preferences

I tried it out, and it took a while for the downloads to come in, but they appeared! Very handy.

Bookmark and Share

Sir, your build is finished…

Tuesday, October 13th, 2009

Here’s a quick tip.  I have to do a maven command line build of one of our EARs on my current project.  We can’t deploy with eclipse due to an unfortunate deficiency in maven not actually supporting skinny war files inside an ear.  I don’t like staring at the build, but I also don’t like have to remember to check back every 30 seconds to see if it has finished yet, so here’s a little trick to get my mac to tell me when it is done.

mvn package; say all done

Using a little bash and the say command, my mac now tells me when my build is done.  You can pick whatever phrase you like, from the simple example above, to something a little more elaborate and self-edify such as:

mvn package; say sir, your build has finished and you are the smartest developer in the world

Happy building!

Bookmark and Share

Wireless Mighty Mouse in Windows

Wednesday, April 1st, 2009

I’ve seen quite a few posts about not being able to use Apple’s Bluetooth wireless Mighty Mouse with Windows. I just got mine working nicely with the Thinkpad T60 (running Vista Business 32-bit) I’m using while my MacBook Pro is in the shop. The trick was to using the passkey 0000 when prompted by the Windows Bluetooth utility. Wireless mouse goodness to keep away the trackpad blues. The only problem I am having is that after I restart the machine, I can’t get the mouse to reconnect without removing it and then re-adding it.

Bookmark and Share

Easy Music Access on the iPhone

Friday, February 6th, 2009

I just discovered today that you can double tap the home button on your iPhone (or iPod Touch in my case) in order to access a little popup menu that let’s you start and stop your music and adjust the volume using the software volume control. If the phone isn’t locked, you can elect to go straight to the Music app as well.

This works in any app you are in and when you are the “slide to unlock” screen.  Please excuse the low quality screen shots, but all I had the iSight on my Mac Book Pro at the time.

Music Controls on lock screen  

Music controls from the home screen and any app screen

Props to any one who can tell what I was listening to.

Bookmark and Share

HOWTO: Running Weblogic Server 9.2 on Mac OS X

Thursday, December 11th, 2008

Being the Apple-lovin Mac user that I am, I prefer to run everything that I can natively on a Mac, as it is always faster and usually has a smaller memory footprint than running it in a Windows VM. This is espeically critical for software development as being able to work efficiently is import to finishing on time and not getting frustrated. To this end I have quested for the ability to run Weblogic 9.2 on the Mac and have it integrated with Eclipse WTP. In my search, I found many tidbits that helped me along the way, but not a full tutorial on how to do it.

For the purposes of keeping this post shorter, I am going to assume that you already know how to install and run weblogic on a supported platform and that you have the appropriate Weblogic license(s).

Step 1: Download the right file(s)

We need to start by obtaining the plain old jar version of the Weblogic installer. This can be accomplished by downloading the AIX version of the Weblogic Server 9.2.2. Don’t download 9.2.3 (the latest as of this writing) or try to get weblogic platform as you won’t be able to get the proper installer. At the end you should have server922_generic.jar. If you want to run 9.2.3 (which based on the list of fixed issues, you do) then you need to download the upgrade installer for AIX, which should get you server923_upgrade_generic.jar.

Step 2: Install Weblogic

Next you will need to launch the installer on the command line like so.

$ java -Dos.name=unix -jar server922_generic.jar

Telling the installer that the OS is Unix will mean that it will load the correct tool to check the remaining disk space. If you don’t set this, it get confused because it doesn’t know what to do with Mac OS X and it will fail the space check.

The installation procedure is the same as for other platforms, so pick you BEA Home and have a ball. At the point where it asks you which JVMs it wants you to use, just say ok for the Apple JVM that it finds. If you want it run using a different JVM, the easiest way to get it to do that is to launch the installer using the appropriate one. After the installer completes, if you want to upgrade to 9.2.3, you will run the upgrade installer in a similar fashion.

$ java -Dos.name=unix -jar server923_upgrade_generic.jar

Step 3: Initial Configuration

After you have gotten everything installed (or while the installer is running), you are going to need to set some memory arguments. Add the following line to ~/.profile.

export USER_MEM_ARGS="-Xms256m -Xmx512m -XX:MaxPermSize=128m"

The biggest deal here is increasing the size of the PermGen space in your JVM. The Apple JVM doesn’t set a big enough space by default, and the weblogic start scripts don’t understand Mac OS X, so they don’t set the proper memory args.

Step 4: Create a Domain

Next, you will need to create a domain, which you can do by running $WLS_HOME/common/bin/config.sh. You may want to test out your domain at this point. You can start it up by running $DOMIAN_HOME/bin/startWeblogic.sh and hit the console at the usual http://localhost:7001/console (unless you changed it while creating your domain). You will want to stop your domain after your test to ensure

Step 5: Download the Eclipse Plugin

At the time of this writing, the Ganymede version of the Weblogic WTP plugin is broken (thanks Oracle), so you want WTP integratioin (yes please!) you’ll have to stick with Europa. You may say, "What about Oracle eclipse plugins for Ganymede?" My response to that is that I wasn’t able to get these working on my Mac. :(

To install the plugin goto the Eclipse Preferences -> Server -> Installed Runtimes -> Add... -> Download additional server adapters. After that is done, setup your runtime and create a new server using the Domain you built in Step 4.

Step 6: Edit Your Startup Script

Now that your server is setup, double click the server definition in the Servers View to bring up the Server Overview. Under the Server section, click the Edit link next to Startup script. Add the same USER_MEM_ARGS line from Step 3 that we added to our ~/.profile. I would also recommend adding the nopointbase argument to the startWeblogic.sh line (before the $*). I have no idea if Pointbase works on the Mac as I don’t use it. Feel free to let us know either way in the comments if it does or doesn’t. If you don’t use it, adding this argument will make your startup and shutdown of Weblogic go quicker as you don’t have to wait for Pointbase as well.

Step 7: Enjoy!

You’re done! Fire up the server from inside eclipse and test it out.

Weblogic 10

I haven’t had occasion to see if I could get any of the version of Weblogic 10 (or 10g as it has now been dubbed) on my machine, so let us know if any of you out there have tried it.

Bookmark and Share

Welcome to the blog of:

Matt Campbell

You are currently browsing the archives for the howto category.

Archives

  • Categories