Le 03/12/2013 14:01, Alan Feuerbacher a écrit : > In installing OpenJDK-1.7.0.45/IcedTea-2.4.3 I've got to the BLFS book's > section "Configuring OpenJDK". I'm confused by the instructions. > > The 1st instruction says: > > <<<<<<<< > There are now two OpenJDK SDKs installed in /opt. You should decide on > which one you would like to use as the default. For example if you > decide to use the precompiled OpenJDK, do the following as the root user: > > ln -v -nsf OpenJDK-1.7.0.45-bin /opt/jdk This create a symbolic link /opt/jdk-->OpenJDK-1.7.0.45-bin, that is, when you set: > >>>>>>>> > > The 2nd instruction contains the line "JAVA_HOME=/opt/jdk". JAVA_HOME is actually pointing to /opt/OpenJDK-1.7.0.45-bin Just remove '-bin' if you want to use the just compiled OpenJDK. > > The 3rd instruction has several references to "opt/jdk". > > The 4th instruction has the line "cd /opt/jdk". > > So these instructions assume that somewhere in the instructions above, > the directory "/opt/jdk" has been created. No. /opt/jdk is a pointer to a directory, not a directory itself. > But nowhere above do I see > that directory being created. > > The 1st instruction has you create a link that I don't understand. Since > I want to use the COMPILED OpenJDK, I did not execute the "ln" command. > After things did not work, I experimented and did this: > > mkdir /opt/jdk Do not do that, just the next line (rmdir /opt/jdk first): > ln -v -nsf OpenJDK-1.7.0.45 /opt/jdk > > This created a link in /opt/jdk: "OpenJDK-1.7.0.45 -> OpenJDK-1.7.0.45" > which I don't understand. There are some variations on the ln -s syntax: ln -s <path/name> <path2>, creates a symbolic link inside the directory referred to by <path2>, whose name is <name>, and pointing to <path/name>... Now: ln -s <path1/name1> <path2/name2>, creates a symbolic link <name2>, pointing to <path1/name1>, inside the directory refrred to by path2. If path1 is a relative path, it is relative to path2.
So, if the second argument is a path to a directory, it creates something inside it. If it is a path to a non-existent file, it creates that file. I think it fails if the second argument is an already existing file. More information at "man ls". Regards Pierre -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
