Thank you very much @martin for this information. Didn’t know that… very imortant to know it, maybe also for @roryjc . However, sometimes google brings easier answers, because after digging the net I’ve found an OSGi compliant bundle at
Downloaded the bundle org.apache.servicemix.bundles.zxing-3.4.0_1.jar:
Saved it to path-to-your/lucee/lib/ext/org.apache.servicemix.bundles.zxing-3.4.0_1.jar
Restarted Lucee(Tomcat), saved the following code as testbarcode128.cfm:
<cfscript> format = createObject("java","com.google.zxing.BarcodeFormat"); writer = createObject("java","com.google.zxing.oned.Code128Writer"); matrix = createObject("java","com.google.zxing.client.j2se.MatrixToImageWriter"); </cfscript> <cfset output="My Barcode" /> <cfset barcode=writer.encode(output,format.CODE_128,75,75) /> <cfset image=ImageNew(matrix.toBufferedImage(barcode)) /> <cfoutput>#image#</cfoutput>
Loaded the page, worked.