|
SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Howto: Install Java correctly for sage
After stumbling around this in the past, and getting a few PM's on it I thought I would make a readme.
This information extended from bastafidli's thread (much credit to him) http://forums.sagetv.com/forums/showthread.php?t=29968 and the link in that thread http://www.howtoforge.com/installati...5.1-desktop-p7 Linux is kind of an eye sore with java. Many distros don't come with an up to date java, due to Sun licensing. One of these is debian, Centos is the same way. Centos provides rpm's but I've never found them to be good with java Some Comments - Quote:
Quote:
Quote:
# vi /etc/apt/sources.list. add - deb http://www.backports.org/debian etch-backports main contrib non-free # apt-get update -- Note: All backports are disable by default - if you want to install something from backports apt-get -t etch-backports install “package” or under aptitude aptitude -t etch-backports install “package” first off - this is on a default debian install - etch #java-version java version "1.4.2" gij (GNU libgcj) version 4.1.2 20061115 (prerelease) (Debian 4.1.1-20) 1.4.2 is way old - we are going to grab a newer one Download Java JRE for linux from http://java.sun.com - you do NOT want the rpm, and you want 32 bit if there is an option I'm going to grab 1.5.0 update 15 - it downloads as jre-1_5_0_15-linux-i586.bin #chmod +x jre-1_5_0_15-linux-i586.bin #./jre-1_5_0_15-linux-i586.bin hit spacebar a few times it will ask you to say yes, and then will extract to a directory - lets then move it to /opt because we installed sage there probably #mv jre1.5.0_15/ /opt -------Read this for going full system install of java between the marks if not skip beyond (have only succesfully done this on Centos not Debian base)-------- This is Centos steps and I have not successfully figured this out as there is no /etc/profile.d in debian that I can find just /etc/profile in debian etc, so if you are successful in debian do share You will notice, that well this didn't override system settings for java - java-version still shows the old one - you don't really need your system completely updated, but if you do hit up http://www.howtoforge.com/installati...5.1-desktop-p7 on 7.1.3 Sun Java JRE about half way down the page. You are going to have to edit profile.d/java.sh, as well as alternatives install. Here is a brief synopsis link it to mozilla #ln -s /opt/jre1.5.0_15/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/ #vi /etc/profile.d/java.sh add or adjust (it's a blank file most of the time) export J2RE_HOME=/opt/jre1.5.0_15 export PATH=$J2RE_HOME/bin:$PATH #source /etc/profile.d/java.sh #alternatives --install /usr/bin/java java /opt/jre1.5.0_15/bin/java 2 #/usr/sbin/alternatives --config java Select the new JRE #2 Check to make sure it is ok #/usr/sbin/alternatives --display java and #java-version you should now see your new version --------------END FULL SYSTEM JAVA INSTALL----------------------- Ok - so if you did the above full system install, you can probably just run java as normal - if not follow these steps, as default java will still be pointing at 1.4.2 #vi /opt/sagetv/server/kegen.sh under #!/bin/bash PATH=/opt/jre1.5.0_15/bin:$PATH export PATH #vi /opt/sagetv/server/startsage.sh PATH=/opt/jre1.5.0_15/bin:$PATH export PATH This will have sage use the jre1.5.0, if you want to try different versions just adjust. I found that if I didn't do it to the keygen it would report encryption errors on registering your key Last edited by Zervun; 05-23-2008 at 11:37 AM. |
#2
|
|||
|
|||
Maybe the first step should be to uninstall gjc or to do not install gjc in the first place when installing Linux. I have never found any real use for it and since we are going to install full Java anyway, it is not needed.
|
#3
|
||||
|
||||
Personally, if your distro has a java package for a recent jre, then I'd use that package first. It'll be easier to maintain the long run.
Ubuntu 8.04 (and even earlier releases) had fairly recent java packages. Code:
# sudo apt-get installl sun-java6-jre
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#4
|
|||
|
|||
Quote:
This way allows to test multiple java instances though which is nice |
#5
|
|||
|
|||
Quote:
I'm actually a Centos man, my next task is to 64 bit it, and get Kmod with XFS. I tried debian for just cross knowledge and also XFS out of the box. Ubuntu is a bit to cutting edge for my linux tastes but seems like easier out of the box. My intention is to get some install instructions on each OS in 64 bit in the future you inspired me bastafidli I run a commercial Centos 5.0 server, so thats the one I really want =) |
#6
|
|||
|
|||
I thought Debian did have it.
I know in Etch, one can install sun-java5-jre (I had main contrib and non-free enabled). I have added the backports.org repository and they have sun-java6-jre (I think it is 1.6.06). Of course, my machine isn't working right now, so I don't know if the backports java works right |
#7
|
|||
|
|||
Going to keep adding your guys's comments on the first post - it's nice getting all this info
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sage6 install craters windows firewall | gateslinger | SageTV Software | 1 | 12-26-2006 05:39 PM |
Java question | matrix35 | General Discussion | 0 | 12-04-2006 04:12 PM |
Java problem with AwtToolkit | Ctrl-Z | SageTV Beta Test Software | 0 | 11-01-2005 09:32 AM |
Java Runtime - Fresh Install Error | greggerm | SageTV Software | 10 | 03-04-2004 07:17 AM |
java install error 1722 | batorok | SageTV Beta Test Software | 2 | 02-26-2004 10:20 AM |