Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jdk  RSS feed

 
Amit Lohar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using fedora 14 (i386)
i don't have jdk folder in /usr/share/java/
it is in javadoc folder...so is it correct or wrong?..
my JAVA_HOME and CLASSPATH are empty and no jre*.sh and jre*.csh file...

can anyone help me out please....
 
Campbell Ritchie
Marshal
Posts: 55698
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where did you install Java?
Try java -version and javac -version and which java at a terminal and see what the OS thinks.
Don’t write a classpath or JAVA_HOME at this stage. Don’t create such .sh files at this stage.
 
Amit Lohar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look i have done this things....

[root@root ~]# echo $CLASSPATH

[root@root ~]# echo $java_home

[root@root ~]# su -c "yum install java-1.6.0-openjdk"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
google-chrome | 951 B 00:00 ...
google-chrome/primary | 1.4 kB 00:00 ...
google-chrome 3/3
updates/metalink | 2.6 kB 00:00
Setting up Install Process
Package 1:java-1.6.0-openjdk-1.6.0.0-55.1.9.10.fc14.i686 already installed and latest version
Nothing to do
[root@root ~]# su -c "yum install java-1.4.2-gcj-compat"
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Setting up Install Process
Package java-1.5.0-gcj-1.5.0.0-34.fc14.i686 already installed and latest version
Nothing to do
[root@root ~]# vi /etc/profile
[root@root ~]# java -version
bash: java: command not found...
[root@root ~]# javac -version
bash: javac: command not found...
[root@root ~]# which java
/usr/bin/which: no java in (/usr/lib/qt-3.3/bin:/usr/lib/ccache:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin)

now please please help me out..
 
Ivan Jozsef Balazs
Rancher
Posts: 999
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
$ find / -name java

$ find / -name javac

 
Amit Lohar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[root@root ~]# find / -name java
/var/lib/alternatives/java
find: `/home/Amit/.gvfs': Permission denied
/etc/java
/etc/pki/java
/etc/alternatives/java
/usr/bin/java
/usr/share/java
/usr/share/doc/db4-devel-4.8.30/java
/usr/share/swig/2.0.1/java
/usr/share/javadoc/java
/usr/share/javadoc/java-1.6.0-openjdk/jre/api/plugin/dom/com/sun/java
/usr/share/javadoc/java-1.6.0-openjdk/api/java
/usr/share/javadoc/java-1.6.0-openjdk/api/org/omg/stub/java
/usr/lib/java
/usr/lib/openoffice.org/basis3.3/share/Scripts/java
/usr/lib/openoffice.org/ure/share/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/java
/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/bin/java
[root@root ~]# find / -name javac
/var/lib/alternatives/javac
find: `/home/Amit/.gvfs': Permission denied
/etc/alternatives/javac
/usr/bin/javac
/usr/share/javadoc/java-1.6.0-openjdk/jdk/api/javac
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/javac

now what??...
 
fred rosenberger
lowercase baba
Bartender
Posts: 12542
48
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't even read that above post...the color is hideous, and make it impossible to actually read. Could you please post it in such a way that it is readable?
 
Amit Lohar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[root@root ~]# find / -name java
/var/lib/alternatives/java
find: `/home/Amit/.gvfs': Permission denied
/etc/java
/etc/pki/java
/etc/alternatives/java
/usr/bin/java
/usr/share/java
/usr/share/doc/db4-devel-4.8.30/java
/usr/share/swig/2.0.1/java
/usr/share/javadoc/java
/usr/share/javadoc/java-1.6.0-openjdk/jre/api/plugin/dom/com/sun/java
/usr/share/javadoc/java-1.6.0-openjdk/api/java
/usr/share/javadoc/java-1.6.0-openjdk/api/org/omg/stub/java
/usr/lib/java
/usr/lib/openoffice.org/basis3.3/share/Scripts/java
/usr/lib/openoffice.org/ure/share/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/java
/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/bin/java
[root@root ~]# find / -name javac
/var/lib/alternatives/javac
find: `/home/Amit/.gvfs': Permission denied
/etc/alternatives/javac
/usr/bin/javac
/usr/share/javadoc/java-1.6.0-openjdk/jdk/api/javac
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/javac


now what??...
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16028
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally, the directory /usr/bin is in the PATH (that's were many programs are installed on most Linux systems), so I would expect that it would pickup /usr/bin/java and /usr/bin/javac.

Maybe this happens because you seem to be running things as root. What happens if you use the "java" or "javac" command as a normal, non-root user?

(You shouldn't be using "root" for anything else than system maintenance tasks!).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!