$ORACLE_HOME/OPatch/opatch lsinventory -debug Search for “Java detection” or “JAVA_COMMAND”. If you see java -1.6- in the debug output → The Perl variable substitution failed at a low level. $ORACLE_HOME/OPatch/opatch version If version ≥ 13.9 and your Java is 1.6 → Root cause 3.5 . 5. Resolution Strategies 5.1 Quick Fix (Most Common) Unset JAVA_HOME – Often the system JAVA_HOME conflicts with the Oracle home’s embedded Java.
java.home=/path/to/valid/jdk This bypasses auto-detection entirely. chcon -t bin_t $ORACLE_HOME/jdk/bin/java restorecon -v $ORACLE_HOME/jdk/bin/java Or temporarily disable (not recommended for production): setenforce 0 . 5.5 Windows-Specific Fix Wrap JAVA_HOME in short path names: not a version requirement.
$ORACLE_HOME/OPatch/opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc > /dev/null if [ $? -eq 1 ]; then echo "Java detection failure - abort patching" exit 1 fi The error “java -1.6- could not be located. opatch cannot proceed. opatch returns with error code 1” is not a simple “missing Java 1.6” problem. It is a symptom of broken Java discovery logic within OPatch , usually triggered by environment pollution, corrupted Perl scripts, or permission issues. The “-1.6-” is an artifact of uninitialized variables, not a version requirement. usually triggered by environment pollution