Installing on FreeBSD

I was surprised to not find any info on how to install Lucee manually on ‘other’ Unix platforms. I have successfully built my Tomcat9/OpenJDK8 server on FreeBSD 12 and I used the Windows documentation for hints on how to create the configuration files for my /usr/local/lucee install. However, when I try to run the jar file I get an error message and a clue.

# java -jar /usr/local/lucee/lucee-

Failed to execute!
Reason: -e is missing

Usage: script [-options]

Where options include:
-l  language
-e  code

What do I use for ‘-e’?

Does anyone have a Howto for installing Lucee on Unix?

do a
chmod +x /usr/local/lucee/lucee-

then try running it again.

Thank you for replying. I already tried 744 perms yesterday so I did as you suggested giving the .jar file 755 and there is no difference. I still get the same error message when executing as root.

So I tried stuffing random values for ‘-e’ on the command line and this is what I get:

#  java -jar lucee- -e 44
Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletException
        at lucee.runtime.script.Main.main(
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletException
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        ... 1 more

Hi @vbentley,

I think the only reason that it hasn’t been done is because no one has really asked for it or needed it yet. Still, I think it’s cool that you’re trying to do it!

I’m really confused by how you’re trying to run Lucee though. You mentioned that you have a Tomcat9/OpenJDK8 setup, but then you’re trying to run Lucee as a jar via the java CLI. Any particular reason why you’re running it that way?

You might try simply dropping the Lucee WAR into your Tomcat setup and running Lucee as a more traditional Java app that way. But maybe there’s something you’re trying to do that I don’t understand at the moment.

Either way, I’m delighted to hear you’re trying to run Lucee on FreeBSD. =)

Thank you, that is very helpful. Somewhere along this process I got confused thinking that the jar file I was using was just an installer for Lucee and not the application itself. I will use the WAR file instead and set it up in Tomcat as suggested.

I have managed to get Lucee running on FreeBSD 12. There were a few things that took a while to resolve and I had to resort to doing an install on Ubuntu in a VM to make comparisons. The important changes for anyone wishing to do the same are as follows:

There is a 50MB upload limit in the Tomcat Manager as configured by the FreeBSD tomcat9 pkg. This must be increased to 70MB to enable the lucee.war to be uploaded from the Manager.
Edit /usr/local/apache-tomcat-9.0/webapps/manager/WEB-INF/web.xml


The Tomcat connector must be set to port 8888, it defaults to 8080 and clashes with Lucee on 8080.
Edit /usr/local/apache-tomcat-9.0/conf/server.xml
After the comment ‘Define a non-SSL/TLS HTTP/1.1 Connector on port 8080’
Change <Connector port="8080"
to <Connector port="8888"
This is the only place the port needs to be changed.

Enable Tomcat to use CFM pages.
Edit /usr/local/apache-tomcat-9.0/conf/web.xml
In the <welcome-file-list>
Add <welcome-file>index.cfm</welcome-file> to the top of the list

All xml config files must be owner=www, group=www