Flex Data Services on OSX
Having gotten cfmx / jrun happily running on my Macbook Pro I needed to get Flex data services next. I scrounged around and found a couple of examples on the web then mucked about with it myself – here’s what I ended up doing (assumes you have jrun installed):
1. Browse to jrun admin server (localhost:8000) and use the console to create a new server.
2. Call the new server flex.
3. Open up a terminal, and execute the following command to set the permissions for the new server:
chmod -R 775 /Applications/JRun4/servers/flex4. Test the new server by executing the following on the command line:
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/bin/java -server -Djava.awt.headless=true -jar /Applications/JRun4/lib/jrun.jar -start flex5. You may get some warnings etc but it should start successfully – once it does, kill it (CTRL+C should do it)
6. Download the windows installer for flex data services express.
7. On a windows machine, or a virtual machine, run the installer, choosing the “Flex Data Services J2EE Web Application” option (leave everything else as the default)
8. Copy c:\fds2\flex.war, c:\fds2\flex-admin.war and c:\fds2\samples.war to your flex server at /Applications/JRun4/servers/flex
9. Execute the following commands to create directories and move the war files into them:
mkdir /Applications/JRun4/servers/flex/flex
mkdir /Applications/JRun4/servers/flex/flex-admin
mkdir /Applications/JRun4/servers/flex/samples
cp /Applications/JRun4/servers/flex/flex.war /Applications/JRun4/servers/flex/flex/
cp /Applications/JRun4/servers/flex/flex-admin.war /Applications/JRun4/servers/flex/flex-admin/
cp /Applications/JRun4/servers/flex/samples.war /Applications/JRun4/servers/flex/samples/10. Execute the following commands to extract each of the war files:
cd /Applications/JRun4/servers/flex/flex
jar -xvf flex.war
cd /Applications/JRun4/servers/flex/flex-admin
jar -xvf flex-admin.war
cd /Applications/JRun4/servers/flex/samples
jar -xvf samples.war11. As mentioned here, there is a bug to do with the commons-logging.properties file. Fix it like so:
cp /Applications/JRun4/servers/flex/samples/WEB-INF/flex/jars/commons-
logging.properties /Applications/JRun4/servers/flex/samples/WEB-INF/classes/commons-logging.properties12. Start our shiny new flex server:
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/bin/java -server -Djava.awt.headless=true -jar /Applications/JRun4/lib/jrun.jar -start flex13. Test by browsing to localhost:8301 (or whatever port your new flex server is set to use - check it in the JRun admin console). You should receive the message "Welcome to JRun4!".
14. Test the flex install by browsing to localhost:8301/flex and you should see a simple welcome page saying "Welcome to Adobe Flex Data Services 2!"
You're done! You can look at the flex management/monitoring console by visiting localhost:8301/flex-admin and the sample apps at localhost:8301/samples
Related posts:



HI,Thanks for this post!
I will be doing this in the morning, too tired now.
One question if I may?
I use an ANT build to compile flex apps on the mac using Ecpilse. What is the advantage of setting up the server with FDS compare to writting the flex apps with eclipse and compiling them to generate the swfs?
This however, might make it possible to integrate flex & ColdFuson:) Something I have yet been able to figure out.
Thanks great post!
[Reply]
Well FDS is different to just flex – I’m only beginning to get into it but FDS is the bit that (among other things) lets you push data and events out to the client. So you can have realtime update and transfer between clients or between server and client. I have FDS installed locally so I can develop apps that will use this functionality – but you don’t need it to develop flex apps themselves.[Reply]
Hi Toby,Thanks so much:)
You explained that very well!
[Reply]
Thanks a bunch! Got FDS working on Macbook![Reply]
Pleasure – glad it was helpful
[Reply]
Great POST! I’ve noticed there’s even a similar of way of deploying coldfusion onto JRun4 on MacTel’s. Extremely informative and helpful. Thanks![Reply]
If you download the AIX version it works perfectly well in Mac OS X.[Reply]