Express Installation Woes

Tried for what I thought would be a bit of fun last night to get Express running on my new laptop.

Turns out it’s all a bit of a nightmare.

Completely baffled by the whole JAVA thing.

Start up fails with

Java version not found

JAVE_HOME is set fine to the Oracle Server JRE

The launch script is looking in the registry (???) for a key

rem Where to find java information in registry
set "javaKey=HKLM\SOFTWARE\JavaSoft\Java Runtime Environment"

rem Get current java version
set "javaVersion="
for /f "tokens=3" %%v in ('reg query "%javaKey%" /v "CurrentVersion" 2^>nul') do set "javaVersion=%%v"

rem Test if a java version has been found
if not defined javaVersion (
    echo Java version not found
    pause
    goto end
)

Why’s it doing this? When does this key get set? How do you change the java version you’re using if it gets the info from the registry? Is there any way I can just launch Express by setting some environment variables?

If we’re going to get new people into Lucee and CFML dev then we’ve got to make this easier. I’ve been a full time cf dev for 20 years and I can’t work it out.

Tom

@tommyp I’m sorry to hear about your issues with Lucee Express. Most Java installers set these registry keys, but I’ve seen some OpenJDK installers that don’t which can be a bit of a pain. May I suggest a much simpler method of spinning up Lucee. Grab the CommandBox CLI and download the “JRE Included” version. You can fire up a Lucee server in any folder you want as the web root by running “box server start” from the command line. Unlike Lucee express, you can control everything about the server from host to ports, to virtual directories, all from a single JSON file. You get a tray icon for each server to help you locate the admin URL and stop it too.

In the end it turned out to be just one simple thing: I changed the batch script to check for JAVA_HOME defined before checking the
registry.

Also changed to the open JDK.

With those changes it just worked…

That said the command box option looks like the way forward.

On Behalf Of Brad Wood via Lucee Dev