As the output of ls -l
indicates, java-1.8.0-openjdk-amd64
is not a real subdirectory, but a symbolic link to subdirectory java-8-openjdk-amd64
located in the same directory (/usr/lib/jvm
in this case). Which is btw. also indicated by the arrow sign next to the folder icon in Nautilus - the arrow sign indicates it's a link.
So if you copy that link to another location, and don't copy the corresponding subdirectory java-8-openjdk-amd64
to the same location as well, the copied link will be broken, as the object it points to does not exist.
This happens because the link points to a relative name, which is resolved using the same base directory as the directory that contains the link. If the link would point to an absolute name like /usr/lib/jvm/java-8-openjdk-amd64
instead of just java-8-openjdk-amd64
, it could be copied to any location without becoming broken.
You can create such link yourself, without the need to copy the original one. Go to your target directory:
cd /home/xendyex/Desktop/files/myjavastuff
and type the command:
ln -s /usr/lib/jvm/java-8-openjdk-amd64 java-1.8.0-openjdk-amd64
You have created a link java-1.8.0-openjdk-amd64
in your directory /home/xendyex/Desktop/files/myjavastuff
that points to /usr/lib/jvm/java-8-openjdk-amd64
.
But note this does not copy the original Java folder (if this is what you wanted to do), it only creates a link to it in another location. If you want to make an actual copy, you need to copy the actual subdirectory java-8-openjdk-amd64
and not the link.