This content has been marked as final. Show 12 replies
One easiest method is to pre-compile your cfm files using the cfcompile.bat file in the CFSERVERROOT/bin/ folder.
ok many thanks i have found the compiler, but not sure where to set the file locations?
i have tried cfcompile C:/ColdFusion8/wwwroot/website2 C:/ColdFusion8/wwwroot/website2 C:/
but no file is created?
ok i have now created the files with the incripted code, i then ftp the files to the websever, and now i get this error
> ok many thanks i have found the compiler, but not sure where to set the file
Which part are you not sure about?
You need to set the three paths towards the top of the file:
Are those correct, given the descriptions given in the file?
Have you read the docs?
> 500 coldfusion.runtime.CfJspPage._setCurrentLineNo(I)V
Was the machine you compiled (not encrypted, btw) the files on the exact
same CF revision and operating system as the one you're trying to run them
> Was the machine you compiled (not encrypted, btw) the files on the exact
> same CF revision and operating system as the one you're trying to run them
Oh, and - naturally - the same JVM version. That's probably the most
important one of the three!
Hi Many thanks
i compiled them on my local machine, as the webserver i am hosting on is shared so i dont have access..
i am running vista with the latest JVM, i am sure the webserver is windows 2000.. what would be the best thing to do?
> i compiled them on my local machine, as the webserver i am hosting on is
> shared so i dont have access..
> i am running vista with the latest JVM, i am sure the webserver is windows
> 2000.. what would be the best thing to do?
Well in my (limited) experience, one will run into problems if one's
compiling files on on OS and running them on another. I have had problems
compiling on XP and trying to deploy on 2k3. I'm not entirely sure whether
it was a JVM version difference or an OS version different; but would not
expect files compiled on on JVM version to work on another.
You can check your JVM version with this code:
<cfset oJvm = createObject("java", "java.lang.System")>
Look @ the java.version value (I guess... there's a few in there that
reflect kinda the same info).
I suppose you could write some code to compile your files progammatically,
using <cfexecute> to call cfcompile.bat. Or check what cfcompile.bat
actually does, and call whatever it is directly. Then you could run that
code on the remote box.
First thing to do though before getting too carried away with that sort of
thing is to get onto the same Java version as the server, and compile the
files as that version, and try again. It might be best to just compile one
test file whilst you're experimenting, to save some time.
ok thanks the webserver is running version 1.4.2_09
so if i have a higher version how do i roll back to this version?
or would it be easier to use <cfexecute> ? if so how would you write this?
(I am not sure this will work out or not, Give a try anyway!)...
Just go and delete all the files (i.e, compiled templates) under your "cfclasses" directory, and then do the cfcompile again.
> or would it be easier to use <cfexecute> ? if so how would you write this?
I suggest *you* try and write your own code, and if you have any problems,
show us what you've done, and where it's not working, and then we'll try to