The following minifiers cannot be found or are no longer working:
YUI Compressor (JS): JAVA executable path was not found. The default minifier JSMin will be used instead
My environment:
Ubuntu, Nginx, Redis, Java
echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-amd64
ls /usr/share/yui-compressor/yui-compressor.jar
/usr/share/yui-compressor/yui-compressor.jar
java –version
openjdk 11.0.19 2023-04-18
OpenJDK Runtime Environment (build 11.0.19+7-post-Ubuntu-0ubuntu120.04.1)
OpenJDK 64-Bit Server VM (build 11.0.19+7-post-Ubuntu-0ubuntu120.04.1, mixed mode, sharing)
<?php
namespace W3TCL\Minify;
/**
- Class Minify_YUICompressor
- @package Minify
*/ putenv(“JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64”);Minify_YUICompressor::$jarFile="/usr/share/yui-compressor/yui-compressor.jar"; Minify_YUICompressor::$tempDir="/tmp"; $code = Minify_YUICompressor::minifyJs( $code ,array('nomunge' => true, 'line-break' => 1000) );
The page I need help with: [log in to see the link]
