Thanks to some hints from Andrew2 I have come up with a work around but I still think there might be an issue here with Lucee or CFML, or possibly just the documentation.
createObject( 'java', 'com.amazonaws.auth.BasicAWSCredentials', '/mypath/aws-java-sdk.jar')
If I manually give the path of the library jar file in the createObject call then it finds it just fine, but this was equally confusing because the .jar files that I put into WEB-INF/lib are getting moved to WEB-INF/lucee-server/bundles so it took me a few minutes to actually find them.
I am using a commandbox image so it might be Ortus that is moving the jars to the bundle dir.
It also seems bad practice to have to include a path outside of the source code tree in the code itself.
Granted I can just move the jar files into the web app directory to avoid this but all the same a config setting makes more sense.
On the page that describes using java in Lucee here:
I copied the files from the bundles dir to the WEB-INF/lib then restarted Lucee.
Step 2 says to place the files in WEB_INF/lib to make them visible to Lucee but even if the files exist there I still need to manually include the path to avoid the class not found error.
Is there a class path setting that needs to be setup for either the lib or bundle dirs to make this work as per the docs, if there is it needs to be added to the docs on this page.
If not Lucee is clearly not operating as per the instructions provided.