Cfcompile for MAC OS X?? Well, it works now.
Basically, cfcompile is not supported on MAC OS X (Am I right here???). So I decided to fool around a bit to see if I could figure out why. Well, basically, I created a new case in the cfcompile.sh script for the Mac OS "Darwin" and made sure that it would point to the correct places to compile the source into java bytecode.
I am attaching the full cfcompile.sh script for you to try out. Here is a sample of the case for the -deploy argument:
Darwin)
OS=Darwin
/bin/sh -c "${Setting: _JAVACMD not found} -cp $CLASSES -Dcoldfusion.classPath=$CFUSION_HOME/lib/updates,$CFUSION_HOME/lib -Dcoldfusion.libPath=$CFUSION_HOME/lib coldfusion.tools.CommandLineInvoker Compiler -deploy -webinf $WEBINF -webroot $webroot -cfroot $CFUSION_HOME -srcdir $srcdir -deploydir $deploydir"
;;
I removed the su, since in Mac OS, the cfmx engine runs under the install user. So there was no need to su to that specific user.
I in no way support this tinkering, do at your own risk. I may be doing it wrong or badly, however, it has worked for me.
I am attaching the cfcompile.sh for you to download.
Hope you enjoy it.
Sergio Bonfiglio
This article makes me think that You're a CFCOMPILE expert - or at least much better than me. I looked around possibly everywhere, but I couldn't find any help about CFCOMPILE. My big problem is that I have to compile on a PC then I have to deploy on a linux server. I tried to compile some files locally on my PC and if I run them on the PC is OK but if I try them on the linux server they don't work and throw an error of UNEXPECTED CONSTANT #2 54. Do you know this error ? Is it possible to do what I'm trying ? Thanks for your help. Sergio
Luis Majano
Hi Sergio,
I have not heard anything of the sort, but will defintely check it out. I will try to do a sample at home. I'll cfcompile something in PC and try to run it on linux and mac. I can tell you that I have cfcompiled stuff on Mac and it has run on linux, pc and mac itself. So your error seems weird. I am no expert, but will give it a shot.
Sergio Bonfiglio
Thank you very much Luis. This thing is really driving me crazy. I could add the Linux server error dump, if you need it. Let me know.