Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

using sun jdk  RSS feed

 
Ranch Hand
Posts: 119
Java Opera Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i have a linux machine which has a Open JDK installed.

i downloaded a sun jdk and installed, it, now i want the system to use the sun jdk how do i configure it ??

i have the following

[root@localhost opt]# find / -name java
/usr/share/swig/1.3.40/java
/usr/share/mysql-gui/common/java
/usr/share/javadoc/java-1.6.0-openjdk/api/org/omg/stub/java
/usr/share/javadoc/java-1.6.0-openjdk/api/java
/usr/share/javadoc/java-1.6.0-openjdk/jre/api/plugin/dom/com/sun/java
/usr/share/javadoc/java
/usr/share/java
/usr/share/doc/db4-devel-4.7.25/java
/usr/share/doc/db4-devel-4.7.25/ref/java
/usr/bin/java
/usr/java
/usr/java/jdk1.6.0_25/bin/java
/usr/java/jdk1.6.0_25/jre/bin/java
/usr/lib/jvm-exports/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java
/usr/lib/jvm/java
/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/bin/java
/usr/lib/java
/opt/sun/javadb/demo/programs/scores/java
/opt/sun/javadb/demo/programs/vtis/java
/var/lib/alternatives/java
/etc/alternatives/java
/etc/pki/java
/etc/java
[root@localhost opt]# clear
[root@localhost opt]# find / -name java
/usr/share/swig/1.3.40/java
/usr/share/mysql-gui/common/java
/usr/share/javadoc/java-1.6.0-openjdk/api/org/omg/stub/java
/usr/share/javadoc/java-1.6.0-openjdk/api/java
/usr/share/javadoc/java-1.6.0-openjdk/jre/api/plugin/dom/com/sun/java
/usr/share/javadoc/java
/usr/share/java
/usr/share/doc/db4-devel-4.7.25/java
/usr/share/doc/db4-devel-4.7.25/ref/java
/usr/bin/java
/usr/java
/usr/java/jdk1.6.0_25/bin/java
/usr/java/jdk1.6.0_25/jre/bin/java
/usr/lib/jvm-exports/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/java
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/java
/usr/lib/jvm/java
/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/bin/java
/usr/lib/java
/opt/sun/javadb/demo/programs/scores/java
/opt/sun/javadb/demo/programs/vtis/java
/var/lib/alternatives/java
/etc/alternatives/java
/etc/pki/java
/etc/java
[root@localhost opt]#
 
Atul Darne
Ranch Hand
Posts: 119
Java Opera Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i set the path by

export PATH=/usr/java/jdk1.6.0_25/bin:$PATH

i need to configure this startup

 
Bartender
Posts: 20777
124
Android Eclipse IDE Java Linux Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java is not like Internet Explorer where there can be only one version for the entire OS. You can have multiple JDKs and/or JREs installed at once and pick which one to use on a per-application basis (although not a per-webapp basis, since web application servers are counted by the OS as a single Java app).

Therefore, assigning a JDE or JRE to the PATH depends on the shell instance.

I don't assign Java's PATH on a global basis, since apps such as Tomcat don't need Java in the path - the Tomcat control script simply uses the JAVA_HOME environment setting that was in effect when Tomcat was launched.

My development user account, however, does set (export) JAVA_HOME and adds $JAVA_HOME/bin to my PATH when I login or spawn a new shell process. I assign it in my .bashrc script, which isn't really the best place to put it out of the 8 or so possibilities, but it suffices for me.
 
Atul Darne
Ranch Hand
Posts: 119
Java Opera Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks i updated an entry in .bashrc script by editing
 
He's dead Jim. Grab his tricorder. I'll get his wallet and this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!