[blfs-support] Trouble with OpenJDK-1.7.0.45/IcedTea-2.4.3Installation

Alan Feuerbacher alanf00 at comcast.net
Tue Dec 3 17:10:22 PST 2013


On 12/3/2013 8:37 AM, Pierre Labastie wrote:
> 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

Thank you for explaining that. What you and Fernando explained is much 
clearer than what's in the man page for "ln".

My mistake was in failing to note that when the BLFS book said that one 
option was to make this link:

ln -v -nsf OpenJDK-1.7.0.45-bin /opt/jdk

that the other option -- not explicitly stated but apparently implied -- 
was to make this link:

ln -v -nsf OpenJDK-1.7.0.45 /opt/jdk

Perhaps it would be helpful to relative beginners like me for these two 
options to be called out explicitly. I found the instructions ambiguous; 
hence my mistake.

Alan




More information about the blfs-support mailing list