Given that you get the error
Not a directory, it is obvious that the symlink in the tar archive is
lib/jre/ -> lib/jre1.8.0_46
which is different from what you tell us in your text.
gtar does not complain about that link, it is broken.
Unfortunately, you did not give sufficient information about your constraints.
We need to know:
- what type of tar archive are you talking about. You get the type via
star -t -print-artype < foo.tar.gz
- what is the exact entry in the archive. You get the answer via
star -tv < foo.tar.gz pat='*jre*'
Archives created with
gtar are not POSIX compliant and may even change the archive type in the middle of the archive. You should understand that this may have really strange results.
star, I recommend to fetch the latest
schilytools from: https://sourceforge.net/projects/schilytools/files/ and compile them.