I have a program I just finish writing in CFML (.cfm files) for my client, but I don't want my client to see the source code. I will install the software on his computer. I tried using the compile.bat
but when I install it on the other computer, it gives an error (java language...). What are my options?
@Bardware is correct: the target machine needs to have the same major version of Java as that which you compiled the code with, and probably for good measure the minor version should be the same or greater.
You can - of course - confront this from the other direction: find out what version of Java they have running, and compile to that version. However they will still need to be running at least the minimum Java version that is supported for the intended version of ColdFusion.
Also it's vital to note @Bardware's comment against the question itself:
cfcompile.bat
callsfindjava.bat
. There a variableJAVACMD
is set. Coldfusion prefers the JAVA that resides within the CF installation folder. That is an issue, since CF came with JAVA 7 but might be set to run with JAVA 8 in thejvm.config
. You might resolve the variables from the commandafterdeploycompdir
and compile without using the bat file.