WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: javac doesn't work [SOLVED, kinda]  (Read 4477 times)

nomer

  • Guest
javac doesn't work [SOLVED, kinda]
« on: April 06, 2012, 05:44:43 PM »
I want to be able to compile a program written in java. Unfortunately, I just discovered that my compiler isn't working.
I'm using sun-jdk.tcz from the repository.
When I run "javac" with or without arguments at the commandline, I get this response:
Quote
javac: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
sun-jdk.tcz is in onboot.lst
Quote
echo $JAVA_HOME
/usr/local/java-sun/
Quote
echo $J2SDKDIR
/usr/local/java-sun
Quote
find /usr | grep libjli.so
/usr/local/java-sun/jre/lib/i386/jli/libjli.so
Does anyone else have sun's jdk working on tinyCore 4.4 ?

P.S. I would use openjdk but libreoffice.tcz currently depends on sun-jre.tcz and I don't feel like having two jre's on my system.
« Last Edit: April 07, 2012, 09:19:54 AM by nomer »

nomer

  • Guest
Re: javac doesn't work
« Reply #1 on: April 07, 2012, 09:19:10 AM »
I believe that I've solved my problem simply by installing openjdk-7-jdk.tcz
Now both the openjdk7 versions of "java" and "javac" are higher in the path than their sun-jdk counterparts.
chromium-browser is still using the sun-jre plugin and LibreOffice seems to be working fine.
This is all fine with me.


Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: javac doesn't work [SOLVED, kinda]
« Reply #2 on: April 07, 2012, 11:56:58 AM »
Today i try sun-jdk7:

make file named myfirstjavaprog.java
Code: [Select]
class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}

exec javac myfirstjavaprog.java
exec java myfirstjavaprog.java

Code: [Select]
tc@box:~/java$ java myfirstjavaprog     
Hello World!

In my case jdk works