Lucee 4.5 needs a lot of jars to run, Lucee 5 only needs the lucee.jar (version 5 of course), nothing else.
So you need to remove all the jars Lucee 5 does not needs, in theory this is not even necessary, Lucee5 does not care about them, but if you keep them you waste a lot of memory for nothing.
So you need to look for jars with the following names and remove them:
ESAPI.jar
PDFBox.jar
PDFRenderer.jar
antlr.jar
apache-commons-httpclient.jar
apache-commons-httpcore.jar
apache-commons-httpmime.jar
apache-commons-sanselan.jar
apache-jakarta-commons-codec.jar
apache-jakarta-commons-collections.jar
apache-jakarta-commons-compress.jar
apache-jakarta-commons-discovery.jar
apache-jakarta-commons-email.jar
apache-jakarta-commons-fileupload.jar
apache-jakarta-commons-httpclient.jar
apache-jakarta-commons-io.jar
apache-jakarta-commons-lang.jar
apache-jakarta-commons-logging-adapters.jar
apache-jakarta-commons-logging-api.jar
apache-jakarta-commons-logging.jar
apache-jakarta-commons-net-ftp.jar
apache-jakarta-commons-net.jar
apache-jakarta-oro.jar
apache-logging-log4j.jar
apache-lucene-analyzers.jar
apache-lucene-highlighter.jar
apache-lucene-misc.jar
apache-lucene-similarity.jar
apache-lucene-snowball.jar
apache-lucene-spellchecker.jar
apache-lucene.jar
apache-poi-ooxml-schemas.jar
apache-poi-ooxml.jar
apache-poi-tm-extractors.jar
apache-poi.jar
apache-ws-axis-ant.jar
apache-ws-axis.jar
apache-xml-xalan.jar
apache-xml-xerces.jar
backport-util-concurrent.jar
bcprov-jdk14.jar
com.naryx.tagfusion.cfx.jar
concurrent.jar
dom4j.jar
ehcache.jar
flex-messaging-common.jar
flex-messaging-core.jar
flex-messaging-opt.jar
flex-messaging-proxy.jar
flex-messaging-remoting.jar
fonts.jar
fusiondebug-api-server.jar
h2.jar
hibernate.jar
hypersonic-hsqldb.jar
icepdf-core.jar
jacob.jar
javaparser.jar
javassist.jar
javasysmon.jar
jcifs.jar
jcommon.jar
jencrypt.jar
jffmpeg.jar
jfreechart-patch.jar
jfreechart.jar
jmimemagic.jar
joda-time.jar
jpedal_gpl.jar
jta.jar
jtds.jar
jug.jar
junit.jar
lowagie.itext.jar
lucee-inst.jar
lucee.jar
metadata-extractor.jar
microsoft-mssqlserver.jar
microsoft-sqljdbc.jar
mysql-connector-java-bin.jar
objectweb-asm-all.jar
ojdbc14.jar
openamf-astranslator.jar
openamf.jar
org.mortbay.jetty.jar
postgresql.jar
railo-sl4j.jar
resolver.jar
serializer.jar
slf4j-api.jar
slf4j-nop.jar
ss_css2.jar
stax-api.jar
sun-activation.jar
sun-jai_codec.jar
sun-jai_core.jar
sun-jndi-ldap.jar
sun-jndi-ldapbp.jar
sun-jndi-ldapsec.jar
sun-jndi-providerutil.jar
sun-mail.jar
sun-security-jaas.jar
sun-xml-jaxrpc.jar
sun-xml-wsdl4j.jar
sun-xml.saaj.jar
tagsoup.jar
w3c-dom.jar
xdb.jar
xml-apis.jar
xmlbeans.jar
xmlparserv2.jar
Micha