Page Options

How to turn Cold Fusion CFML into Java Byte code

If you are running Cold Fusion 7 or later the following steps will allow you to compile your cold fusion code into Java byte code so that you can distribute it without providing the source code of your application, and improve performance.

Windows Systems:

  1. Create a backup of your original source code (for safety)
  2. Open a command prompt (Start->Run and type in cmd)
  3. Change your directory to your cold fusion installation bin directory (Normally C:\CFusion7\Bin)
  4. Use the following command line syntax to generate the byte code:

    cfcompile -deploy webroot directory-to-compile output-directory

    Where webroot is the fully qualified path to the root directory of the website (example: c:\inetpub\wwwroot) Where directory-to-compile is the folder that contains the files to be compiled and where output-directory is where you want to put the compiled files at.


You can then distribute the files in the output-directory without having to reveal your source code, and it will also provide better performance.

Last Updated: 05/12/2008 01:12 AM

blog comments powered by Disqus