In a bash shell script on Ubuntu/Mint, I need to create some symlinks in the /jre/lib/ext/ directory under the java installation directory.
For example, if openjdk6 is the default java, /usr/bin/java points to:
/usr/lib/jvm/java-6-openjdk/jre/bin/java
I can find this in my script with:
MYJAVAPATH=readlink -f `which java`
The path I would need in my shell script would be based on part of that path, plus the path fragment above:
/usr/lib/jvm/java-6-openjdk/jre/lib/ext/
Can anyone tell me to to derive the path immediately above in a bash shell script? Thanks.