Results 1 to 7 of 7

Thread: How to configure Sun Java runtime as default

  1. #1
    Join Date
    Oct 2009
    Location
    A place with no mountains
    Posts
    280

    Default How to configure Sun Java runtime as default

    How do I configure Sun Java runtime to be the default. I'm trying to get rxtxSerial working and I think the problem might be that OpenJDK is my default...

    Not sure why this isn't working:
    sudo update-alternatives --config java
    sudo: update-alternatives: command not found


    Thanks

  2. #2
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: How to configure Sun Java runtime as default

    i would suggest you use YaST to first remove the OpenJDK and then
    install SunJava..

    most folks that do that then have a java which works as expected..

    --
    DenverD (Linux Counter 282315)
    CAVEAT: http://is.gd/bpoMD
    posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
    2.6.22.19-0.4-default SMP i686
    AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
    CMedia 9761 AC'97 Audio

  3. #3
    Join Date
    Oct 2009
    Location
    A place with no mountains
    Posts
    280

    Default Re: How to configure Sun Java runtime as default

    YaST shows Sun Java is already installed.

    I got update-alternatives --config java to work.
    When I run
    Code:
    sudo update-alternatives --config java
    it fails.

    But when I run
    Code:
    sudo -s
    update-alternatives --config java
    it works

    Any idea why the first form doesn't work?

  4. #4
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: How to configure Sun Java runtime as default

    It will work if you write it as:

    sudo /usr/sbin/update-alternatives --config java

    (/usr/sbin is not on a normal user's PATH.)

  5. #5
    Join Date
    Oct 2009
    Location
    A place with no mountains
    Posts
    280

    Default Re: How to configure Sun Java runtime as default

    Quote Originally Posted by ken_yap View Post
    It will work if you write it as:

    sudo /usr/sbin/update-alternatives --config java

    (/usr/sbin is not on a normal user's PATH.)
    Thank you. What's the openSUSE recommended way to eliminate having to prepend /usr/sbin? I'd like to just be able to type sudo command rather than sudo /usr/sbin/command.

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: How to configure Sun Java runtime as default

    sudo -i blahblah

  7. #7
    Join Date
    Oct 2009
    Location
    A place with no mountains
    Posts
    280

    Default Re: How to configure Sun Java runtime as default

    Quote Originally Posted by ken_yap View Post
    sudo -i blahblah
    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •