You are not logged in.

#1 2007-01-17 19:57:58

2k
Member
From: UK
Registered: 2006-02-17
Posts: 76

Java problems

Hi there,

First off apologies if this is in the wrong forum, but i was unsure where to post this...

I have recently decided to start programming again, after an absence of about 7 years. rather than going down the C route i'm going to try and learn java.

my problem is the following and despite extensive googleing i'm non the wiser to fixing it.

i have written a basic java program and when i try to compile it i'm getting the following error

javac: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory

does anyone know why this is happening, and how to fix it. i dare say  it's something that i have done.

once again sorry if this is in the wrong forum.

Cheers, Mike

Offline

#2 2007-01-17 20:13:04

fishonadish
Member
Registered: 2006-11-04
Posts: 125

Re: Java problems

libjli.so is part of the jre package. It's at /opt/java/jre/lib/i386/jli/libjli.so.
If java and jdk are both installed then javac is presumably looking for it in the wrong place?

Fishonadish

Offline

#3 2007-01-17 20:47:01

2k
Member
From: UK
Registered: 2006-02-17
Posts: 76

Re: Java problems

curious...

everything was installed, i looked where you said and the file was there. then i decided to reboot the machine and it now works nice one. How easy was that? don't know why i had to reboot though sad

thanks for your help smile

Mike

Offline

#4 2007-01-17 21:28:40

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Java problems

/opt/java is not in your path by default. When you installed the java packages, the file /etc/profile.d/jre.sh was put in place, which appends /opt/java to the various paths already set in your system. However, this only if you do one of two things - either reboot, as you did, or

source /etc/profile

in a terminal.

Offline

#5 2007-01-18 10:12:09

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Java problems

You might want to check out the GNU Java compiler (though I haven't really used it myself).


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#6 2007-01-18 17:56:39

2k
Member
From: UK
Registered: 2006-02-17
Posts: 76

Re: Java problems

tomk wrote:

/opt/java is not in your path by default. When you installed the java packages, the file /etc/profile.d/jre.sh was put in place, which appends /opt/java to the various paths already set in your system. However, this only if you do one of two things - either reboot, as you did, or

source /etc/profile

in a terminal.

Cheers for that, i didn't know that and that is much more preferable to rebooting smile

Offline

#7 2007-01-18 17:57:46

2k
Member
From: UK
Registered: 2006-02-17
Posts: 76

Re: Java problems

Basu wrote:

You might want to check out the GNU Java compiler (though I haven't really used it myself).

I have heard that it isn't as good as Sun's Java which has now been released under the gpl (i think)

Offline

#8 2007-01-19 01:32:06

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Java problems

2k wrote:
tomk wrote:

/opt/java is not in your path by default. When you installed the java packages, the file /etc/profile.d/jre.sh was put in place, which appends /opt/java to the various paths already set in your system. However, this only if you do one of two things - either reboot, as you did, or

source /etc/profile

in a terminal.

Cheers for that, i didn't know that and that is much more preferable to rebooting smile

Rebooting is not necessary here. Loging out and reloging would've updated the paths.

Offline

Board footer

Powered by FluxBB