Compiling a cfc coldfusion file

Hyperblaze

Lifer
May 31, 2001
10,027
1
81
I've got the source code for an app in coldfusion that I'd like to compile.

There are a bunch of cfc and cfm files. I have coldfusion 8.0 installed on the server too.

These cfc and cfm files work with java I believe.

Would anyone have any ideas how to comfile these cfc/cfm files to work with java?

Any questions, please feel free to ask. Thanks!
 

drebo

Diamond Member
Feb 24, 2006
7,034
1
81
Typically it's the other way around. You take java (or .net now) and compile it for use within ColdFusion in much the same way you'd use a CFC.

I don't believe there is a way to compile ColdFusion code to be used by a java application.
 

Hyperblaze

Lifer
May 31, 2001
10,027
1
81
There is a file called /opt/coldfusion8.0/bin/cfencode which I believe "encodes" the coldfusion files

unfortunately....

if I run it using root I get

sudo ./cfencode.linux
./cfencode.linux: error while loading shared libraries: libporting.so: cannot open shared object file: No such file or directory

Ended up downgrading to coldfusionmx7.0 since libporting.so was just not found in the library folders

LD_LIBRARY_PATH has /opt/coldfusionmx7.0/lib in it's path

If I run ./cfencode.linux /<directory>/file.cfc

I get...Segmentation fault




 

drebo

Diamond Member
Feb 24, 2006
7,034
1
81
What exactly are you trying to accomplish?

If you're looking for source code obfuscation, then cfencode is useful. Read up on its use here: http://livedocs.adobe.com/cold.../htmldocs/reusec16.htm

If you're looking to compile the application for distribution (source obfuscation can't be reversed) or to increase initial load times, then you might want cfcompile: http://livedocs.adobe.com/cold...ntent=deploying_5.html

If you want to be able to use your ColdFusion procedures or components within a Java application, then you're up a creek without a paddle.
 

Hyperblaze

Lifer
May 31, 2001
10,027
1
81
Originally posted by: drebo
What exactly are you trying to accomplish?

If you're looking for source code obfuscation, then cfencode is useful. Read up on its use here: http://livedocs.adobe.com/cold.../htmldocs/reusec16.htm

If you're looking to compile the application for distribution (source obfuscation can't be reversed) or to increase initial load times, then you might want cfcompile: http://livedocs.adobe.com/cold...ntent=deploying_5.html

If you want to be able to use your ColdFusion procedures or components within a Java application, then you're up a creek without a paddle.

thanks for your help.

To be honest, due to my lack of knowledge in coldfusion, I was driving blind.

I was also using cold fusion 8 which has libporting.so missing and cfcompile missing in there (don't know why).

Ended up using cold fusion mx 7 with a bit more success

Also started using cfcompile which was more what I was trying to do

Thanks for your help, it was very enlightening