(hey I haven't posted in forever, but since I actually had something to share...)
I was looking for any information about getting BlazeDS running locally on my Mac to take a stab at learning Flex remoting, and I found this nice tutorial over at Coding Cowboys, but got disappointed when I realized that while the author was working on Leopard, he was actually setting up BlazeDS on a linux server.
But in my normal "oh this should be pretty easy" fashion which has on other occasions brought down the boot sectors of powerful hard drives, I decided that following the instructions on the page would just work on a mac too.
And it did!
It should be pretty clear why I'm just not sending you on to the aforementioned post if you go look at it - he's also setting up Amazon EC2 webservices, which I'm not as interested in at the moment. Also, I'd like to just play with Flex remoting for a minute at home, so I don't need to get a server involved. Especially since I have this handy unix workstation right here on my desk.
Ok, no more silly patter. Here's how to set up BlazeDS on your intel-based mac running Leopard. I should also mention that I have the developer tools installed, but I don't know that that makes a difference.
Getting BlazeDS running on Leopard
- Download the turn-key package
- unzip it to a directory -- /blaze is good. You now have a folder at the Root lavel of Macintosh HD called blaze.
If that "unzip it to a directory" direction is alienating to you, just double click on the zip, let Mac OS unzip it for you, and rename the directory to blaze and move it to the top of the Macintosh HD. Pretty much the same thing.
- In terminal, go to that dir - ls /blaze (just for fun maybe - I'm terrible at doing commands like sudo ./blaze/tomcat/bin/startup.sh ... I usually just cd to the directory and do ./startup.sh)
- You need to issue two commands in terminal:
Note - when executing these commands either from the root (/) which is the command above, or from the directory they're in, you still need the leading ./ -- so if you're in the /blaze/tomcat/bin directory, the command to start tomcat is ./startup.sh, not startup.sh which will give you an error.
Note #2 - You can close the terminal window. It says "hey, closing this will end processes running blah blah blah" but BlazeDS still works after you close the window. If you're just playing around, it might be worth leaving it open since it tells you in the console output how to shut the server down.
- open http://127.0.0.1:8400/ in a web browser.
- Play with the pretty flex remoting demos.
- Learn everything else. =)
Posted by illovich at May 25, 2008 11:27 AM