• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

using sun jdk

 
Ranch Hand
Posts: 119
Oracle Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Oracle Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Saloon Keeper
Posts: 26290
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Oracle Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks i updated an entry in .bashrc script by editing
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic