Thanks very much. :)
I followed the first choice:
export APPCPATH=$APPCPATH:/opt/glassfish/domains/domain1/lib/ext/myexternaljar1.jar:/opt/glassfish/domains/domain1/lib/ext/log4j-1.2.15.jar
..and it worked!
[Message sent by forum member 'igorilla' (igorilla)]
http://forums.java.net/jive/thread.jspa?messageID=333637