On Thu, Nov 8, 2012 at 5:33 PM, Jiri B <ji...@devio.us> wrote:
> On Thu, Nov 08, 2012 at 05:04:32PM +0100, David Coppa wrote:
>> > javaws is looking for libjava.so in /usr/local/lib/amd64 instead
>> > of /usr/local/jdk-1.7.0/jre/lib/amd64, but workaround with symlink
>> > works fine.
>> >
>> > Could anybody check this crap in icedtea-web source?
>> >
>> >  27677 java     CALL  sigprocmask(SIG_SETMASK,0<>)
>> >  27677 java     RET   sigprocmask ~0x10100<SIGKILL|SIGSTOP>
>> >  27677 java     CALL  access(0x7f7fffff38b0,0<F_OK>)
>> >  27677 java     NAMI  "/usr/local/lib/amd64/libjava.so"
>> >  27677 java     RET   access -1 errno 2 No such file or directory
>> >  27677 java     CALL  access(0x7f7fffff38b0,0<F_OK>)
>> >  27677 java     NAMI  "/usr/local/jre/lib/amd64/libjava.so"
>> >  27677 java     RET   access -1 errno 62 Too many levels of symbolic links
>> >  27677 java     CALL  sigprocmask(SIG_BLOCK,~0<>)
>> >  27677 java     RET   sigprocmask 0<>
>> >  27677 java     CALL  
>> > mprotect(0x1a2fed30b000,0x1000,0x3<PROT_READ|PROT_WRITE>)
>> >
>> > and then
>> >
>> >  27677 java     CALL  sigprocmask(SIG_SETMASK,0<>)
>> >  27677 java     RET   sigprocmask ~0x10100<SIGKILL|SIGSTOP>
>> >  27677 java     CALL  write(0x2,0x7f7fffff2fb0,0x20)
>> >  27677 java     GIO   fd 2 wrote 32 bytes
>> >        "Error: could not find libjava.so"
>> >  27677 java     RET   write 32/0x20
>> >  27677 java     CALL  sigprocmask(SIG_BLOCK,~0<>)
>> >  27677 java     RET   sigprocmask 0<>
>> >  27677 java     CALL  
>> > mprotect(0x1a31f8a4f000,0x2000,0x3<PROT_READ|PROT_WRITE>)
>> >  27677 java     RET   mprotect 0
>>
>> On this machine, what does 'which java' say?
>>
>> Have you correctly set your environment up?
>>
>> I usually have:
>>
>> export JAVA_HOME=/usr/local/jdk-1.7.0
>>
>> And then I add '${JAVA_HOME}/bin' to my PATH
>
> No, doesn't work either $JAVA_HOME is set and/or $JAVA_HOME/bin
> in PATH.
>
> It must be hardcoded inside icedtea-web, I will check landry@
> tip.

I've found the issue.

The "could not find libjava.so" error does not come from icedtea, but from java.

It's the "-a" flag of exec (a bashism, iirc) that trips up java.

>From the bash manpage:

"If -a is supplied, the shell passes name as the zeroth argument to
the executed command."

Changing last line of /usr/local/bin/javaws from:

exec -a "javaws" "${COMMAND[@]}"

to:

exec "${COMMAND[@]}"

fixes the problem for me.

Ciao,
David

Reply via email to