Jared Rypka-Hauer, Lead ColdFusion Developer, Minneapolis, MN

Proud Parents of SQLSurveyor and PayPalMX
Viewing By Entry / Main
July 16, 2006 - back to top
OK, so I've been researching running CFMX on the MacBook Pro all day today and I've come up with a few things:
  • There are no ideal solutions available
  • Lots of tweaking, hacking, and screwing around are required
  • The previous 2 bullets are not acceptable
So as I was researching things I came across a new tool in OSX Tiger and up... launchd. I also found some nice, concise descriptions of how to create an application bundle...

The end result? StartCFMX.app, a whole new way to start CFMX. Just drop it on your hard drive from the dmg file and double-click. The only gotcha is that the actual script that launches CF has some hardcoded values, like the path to CF, the path to the 1.4.2 JVM and the name of the instance you want to launch. If you need to edit any of these, just follow these steps:
  1. Right-click (or ctrl-click) the StartCFMX file and click on Show Package Contents
  2. Open the Contents folder
  3. Edit StartCFMX with a text editor and change the path to jrun.jar or the name of the instance you wish to launch
  4. Save the file
  5. Double-click on StartCFMX to launch your CFMX instance
Yeah, it's the product of about 3 hours worth of reading, creating, and testing... so it's what you might call pre-alfalfa... but it works great on my box. I'm running a stock install of CFMX from the Adobe downloads page, so this means no funky setups, no tweaking settings, no alternate servlet containers... just good old-fashioned CFUSIONy page serving.

Also note: On my local box I use the Jrun built-in webserver, so this thing doesn't mess around with webserver connectors or anything. Using Apache is just a big PITA as far as I'm concerned and all my apps live off the webroot anyway (/app1, /app2, etc.) so if you want to use a webserver connector, you're on your own. However, once you have CFMX up and running, my guess is that wsconfig.jar should let you configure Apache just fine.

The other nice thing about it is this:

It'll launch CFMX on the 1.4.2 JVM EVEN IF THE 1.5 JVM IS SET TO YOUR SYSTEM DEFAULT!! This is cool because the default JVM is 1.5 for OSX 10.4 since the Java 5 updater came out. So whether you're using an MBP or a PB with 10.4 on it, this thing will get you up and running fast.

NO, THERE IS NO EXTRA TWEAKING WITH OSX ON A MacBook Pro WITH THIS THING. Just install the CFMX download from Adobe and use this to launch your server.

It will, I'm sure, require a great deal of tweaking, so if you could download and test it, leaving comments here or emailing them to jared@web-relevant.com I'd be HUGELY appreciative.

Laterz!

Comments

I don't have a Mac, but this is pretty cool nonetheless. I love to see people helping out the community by creating tools like this! I hope it works well for everybody that needs it.


Thanks Jacob!

Incidentally I've really updated the blog post about the widget, so if you're interested you can take another look.

Glad you stopped by. :)

Laterz!


I know 0 about launchd, but I'd think that since OS X is based on BSD, you could use a combination of 'locate' and 'grep', or something similar, to find the paths to CF and Java. Java would probably be pretty tricky though, because it's all over the place.


I downloaded the CFMX install for OS X and installed on my MBP. I told it to install the default developer Web server. So this gives me a /Applications/ColdFusionMX7 folder and no /JRUN4 folder. I tried the StartCFMX app in /, /Applications, and /Applications/ColdFusionMX7 all with no luck.

So I went in to the Contents folders and changed the jrun.jar path to point to the ColdfusionMX/runtime/lib folder. Still no luck.

??
Thx


Ken,

Is the name of the default instance under the standalone install of CFMX "cfusion"? I can't recall for sure, but I want to say it's "default" which would explain why your server won't start.

To find out for sure, you can check in /Applications/CfusionMX7/runtime/lib/servers.xml and see what the instance name is... jrun.jar needs to know which entry in that file it should use to start the server you want. If it's "default" then "cfusion" (as entered into the script for StartCFMX) won't work.

You should see samples, admin, and either cfusion or default.

For the record, I installed the multiserver version of CFMX, so the instance I want to run is, in fact, called cfusion... check that XML file and let me know what you find. If it's "default" then edit StartCFMX like you did to change the path and make the part where it says "-start cfusion" say "-start default" and try again.

Laterz!


Hi,
I have been using CFMX 7 on the mac(powerbook) for so long now, and never had problems installing it. I have installed botht he JRun as well as the stand-alone with no problems.

What has changed with the new Mac(Intel)? I always thought that the install was just as easy.

Anyway, seems like there are some issues with the new mac's,and I think that it is great that you solved the issue,and have shared it with others`-`


Got a chance to test this last night and it works like a charm!! Great work Jared - getting CFMX running on the Macbooks was a real pain before, but you've really smoothed things out big time.

The only thing to watch out for is you can't tell that it's running, but if you try to hit a page it is there. How about a KillCFMX.app?


SWEET!! Thanks for the feedback...

Doesn't CF RUN FAST ON THESE THINGS??? HOLY CRAP!

OK, as far as telling if it's running...

First off, I made this a login item under my account, so I assume it's running and only have to figure out if something's wrong when I go to hit a page and it's down.

Second, if you edit StartCFMX (like you were going to change a path as specified in the blog post), you can remove the headless argument (or make it false) and when launchd runs it, you'll see a default Java icon in your doc. When launchd forks the process off to Jrun, it creates a dock icon for it. Very handy if you're going to need to restart the process with any regularity.

And, finally, if you open up the Activity Monitor (/Applications/Utilities/Activity Monitor) you'll see an entry for Java with 80-odd threads using soemwhere around .8 CPU time at idle. That's the CFMX thread. You can hit Stop, then click the Quit button to kill this thread. Then just launch CFMX by using the StartCFMX icon.

I could probably make a KillCFMX.app too... I'll have to see about it. For now, there's a few ideas.


Wow. Thanks for taking the time to address this issue! I have an Intel Duo iMac; I've installed a Developer version of CFMX7 and encountered an error stating that I had "successfully installed the the software, however the Coldfusion service does not appear running, the web server connectors did not install successfully, and the web server and/or website could not be reached on port 80."

I was hoping your app might help. I've followed your instructions to the letter, but when I try pulling up the "administrator page" in Safari - I still get an error.

Am I unique with this problem? or has anyone else encountered similar issues. I hope I'm overlooking something minor - I will greatly appreciate any help.

Oh. By the way... I'm trying to see if Apache is running. But am not finding it (not even with "Spotlight") could that be a problem?


Prince - make sure you select the J2EE multi-server configuration.

This thing does run CF fast as heck! And those directions to stop the server worked great also. Thanks again Jared!


I've got a guide up for installing CFMX on Intel Macs, including how to get the JRun/Apache connector going.

http://webmages.com/cfmxIntelOSXguide.html


Thank you SOOOOOO much! I've spent the last 5 hours trying to get this to work with not much luck. You've done us all a HUGE favor!


I have read many posts on this subject. It is assumed that we are to Install JRun4, or will the J2EE configuration take care of this for us?

Thanks


Simon... no worries. Glad to help. :)

Jon,

If you download the CFMX Developer or install from the CD and use the Multiserver option, this will work fine for you. If you install the standalone version, you'll need to edit a file inside the .app bundle (technical explanation in the body of the post above) to get this to work. I'm working on a couple other ideas at the moment and I hope to have yet another option soon.

Thanks,
J


Worked like a charm - thank you very much!


While this sort of information is appreciated, what would be even MORE appreciated is a statement from Adobe/Macromedia as to when they're going to get around to actually fixing the problem themselves. Or even if they're planning to do so, so I and my customers can get on with selecting a different platform.

I thought one of the reasons for rebuilding the thing in Java was platform independence and to make it easier to port to new systems?

Or if a multinational like Adobe can't hack it, then cut the thing loose and make it open source. Heck, MySQL had their entire database system available for OSX Intel ONE WEEK after the release of the first systems to consumers. Now THAT'S service.


I've installed CFMX 7 on my MacBook Pro (Core 2 Duo) using all the defaults (along with the Development Web Server Option) and then attempted to start the server using StartCFMX with no luck...

I've traced all the paths and everything looks correct...

What is the default IP address / URL where the CF Admin should be? Perhaps it's just not where I think it is...

Thanks for all your hard work!


The IP should be localhost or 127.0.0.1:8300 if you're starting the cfusion instance.

Keep in mind that you NEED to do the multiserver install and use the built-in webserver unless you're going to compile your own connector and build Apache 2 on your Mac. The standalone install doesn't seem to work at all.

And if you're going to do the multiserver install and compile Apache (use the search pod and search for Apache to find my blog post on building Apache for the MacBook Pro) you'll need to configure the Jrun connector by hand... I can't recall the Adobe Tech Bulletin ID for that, but there is a document detailing how to do it.

HTH,
J


You are correct - I was using the wrong port number... 8300 did the trick... and everything appears to be working just fine.

Thanks for the help and for getting CFMX7 going again!


Jared,

Awesome work! After my PC laptop crashed several times, I went out and purchased the new MacBook Pro... but I hadn't read any of the issues with my development tools. So I thought I was going to be up a creek but then I found your solution. Works fantastic! And after taking the Mac plunge and watching my OS boot in under 15 seconds, I am sure glad I made the move!


Jared,

If you're running standalone, it just doesn't work to change the line to:
launchd -d /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/bin/java -server -Djava.awt.headless=true -jar /Applications/ColdFusionMX7/runtime/lib/jrun.jar -start coldfusion
The name tag in servers.xml is coldfusion, so I changed the cfusion to that. However, the coldfusion directory is at /Applications/ColdFusionMX7/runtime/servers/coldfusion -- is that why it's not working -- it is assumes that jrun.jar and the coldfusion directory are in the same place? Any hints on how to make the launcher work for standalone? Thanks!


JPW -

I'm not sure what to tell you. I installed it like I did because I knew it would work. From anything I've heard, the standalone installer doesn't work on OSX. Sure it'll install, but it won't run. This is my experience and the experience of others. It's also why I've been telling people over and over again.

So I haven't tried getting it to run at all, and I've heard repeatedly from dozens of people that it doesn't work. Maybe at some point I can try to get it going.


Jared,

I recently bought a Mac book pro, until which I was totally unaware of how to use one. Now I am using your post to install CF. I am able to successfully launch the CFMX admin on port 8300.

But, now if I have a CF app and I put it under the myuser/sites directory, cfm pages open up as a text file and I can see the code. The webserver does not seem to recognise the CF server. Could you please give a way to go about this?

Thanks,
Prashant


Jared,

This is awesome and works like a charm. How hard would it be to modify to also run a version of CFMX 6.1?


I was excited to find this script but try as I may it doesn't seem to work on my Intel Macbook pro. I have followed the instructions carefully but when I double click on the Start CFMX it doesn't even respond.
I'm hoping I get some clarity in the middle of the night but so far after a few hours of trying various things nothing has worked. I'm using the stand alone version of CF, should this work with that or is there where I'm lost? Any help would be appreciated.

Best
Derek


Derek,

I haven't found a way to make this work with CF Standalone... unfortunately there seems to be no way to get CF Standalone to run on a MBP, period.

Uninstall, run the multiserver install, and then you should be able to use this launcher. I've heard from many people that the launcher works great with multiserver or J2EE installs on Jrun, but that it doesn't work at all on standalone. I don't actually know what the difference is, to be honest.

As far as what the difference is between using standalone and multiserver, not much if you're only running one instance. You'll find it runs on port 8300 instead of 8500, and that there's a couple extra items in the administrator. Other than that, there's practically no difference at all.

HTH,
J


I am new to MAC OSX (7 months) and have been fiddling with the CFMX install for nearly as long. I finally stumbled across this post, while searching again to try and get it running.
Very nice. Very nice indeed. Installed CFMX and then ran through the instructions and all works like it is suppose to.
I have the JRUN installed with the default web server. Even though I would rather use Apache. I will try Apache in the future but I am satisfied by having CF run locally for now.

Cheers!
AJ


This is a life saver. I was getting increasingly frustrated with trying to get Coldfusion running. Installing standalone JRUN, hacks and tweaks. Then after searching and searching I stumble across this via Ben Forta's blog. It works like a dream and shame on Adobe for not specifying that it is broken on Intel Macs.

Thanks again, this is a life saver.


Hello, I was so happy to find and download your CFMX fix. I thought I'd finally get round the whole 500 null issue on my Powerbook G4,(running 10.4.10) but it doesn't seem to work. After starting via your app., my Mac tells me that Coldfusion is running - but where..? When I enter 127.0.0.1:8500, I get the jrun servlet error, and 8300 ( which is mentioned in one of the posts here) goes nowhere. Thinking it is perhaps because I indicated stand-alone server, I went to uninstall - but I can't do that either. Cold Fusion asks for my admin password - and then doesn't recognise it when I give it. Do you have any good advice?


k8Fxuu <a href="http://wpopuzqrmgjt.com/">wpopuzqrmgjt</a>, [url=http://mdmophqtenlw.com/]mdmophqtenlw[/url], [link=http://wkchjpjahzpf.com/]wkchjpjahzpf[/link], http://lkvdxqdeahpg.com/





Aura skin for Raymond Camden's BlogCFC provided by Joe Rinehart.