PDA

View Full Version : Installing Java Is Such A Headache with Knoppix



gccradioscience
04-03-2008, 12:11 AM
I am having a problem or just don't know how to install java on my Knoppix Desktop. I was looking at J Package, I still don't understand it. Linux is like a whole different language. I wish Java would install just like it did on Windows XP. Like simply point and click and there it is.

Trying to learn on how to install Java so I can use Limewire PRO for looking up some ebooks. But doing it the
way Sun Solutions told me on their website is good for very experienced linux users. Also I think I need more
RAM for this operating system. Its on its way from compusa.

Adam E.

dahveed3
04-12-2008, 04:22 PM
If you have Knoppix 5.3.1, it is mostly Debian Lenny. Right now on i386 the only sun-java that the official Debian repo installs correctly so it works is the sun-java5-jre sun-java5-plugin combination.

I believe it is already installed on Knoppix 5.3.1 though, so perhaps you are looking to install the development kit? I think that is sun-java5-sdk (something like that). Just do:

aptitude update
aptitude keep-all
aptitude search sun-java5

See what the exact package is named.

aptitude install sun-java5-sdk (if that's the name).

I say do aptitude keep-all because Knoppix may have been built using apt-get and/or synaptic so aptitude needs to be told not to start removing what it thinks were automatically installed packages. From then on you can use it safely as long as you just use it. If you intend to install/remove stuff using apt-get or synaptic then you'd need to do aptitude keep-all again, defeating the purpose of its internal package management. Might as well never use it in that case. It's the best Debian front end to apt, but must be used exclusively to be most effective. Open the NCurses GUI by just running:

aptitude

and check out its help manual.

If you don't love aptitude then just use apt-get or synaptic to accomplish the same purpose. You should be able to get Java installed and working fine. Eventually the Java 6 packages will get fixed.

To make sure sun is set as the system java:

update-java-alternatives java-1.5.0-sun set
update-alternatives --config java
update-alternatives --config java_vm
update-alternatives --config javaws
update-alternatives --config firefox-javaplugin.so
update-alternatives --config iceweasel-javaplugin.so
update-alternatives --config mozilla-javaplugin.so
update-alternatives --config iceape-javaplugin.so
update-alternatives --config xulrunner-javaplugin.so

Not sure whether you'll need to do the update-alternatives --config stuff once you've done update-java-alternatives with the set switch as that usually configures all of them.

kirol
04-12-2008, 06:35 PM
I believe it is already installed on Knoppix 5.3.1 though, so perhaps you are looking to install the development kit?
Oddly enough on 5.3.1 the default java identifies as "kaffe-1.4.2". Sun's 1.5 jre is there, though. It's available under /usr/lib/jvm/java-1.5.0-sun. So, "/usr/lib/jvm/java-1.5.0-sun/jre/bin/java -version" returns "1.5.0_14"

"dpkg -l | grep sun-java" returns

ii sun-java5-bin 1.5.0-14-3
ii sun-java5-demo 1.5.0-14-3
ii sun-java5-fonts 1.5.0-14-3
ii sun-java5-jdk 1.5.0-14-3
ii sun-java5-jre 1.5.0-14-3
ii sun-java5-plugin 1.5.0-14-3

You can establish sun's version as the default using the aforementioned update-java-alternatives, but might break something in the process. You should be able to run software that needs version 1.5 by explicitly configuring it to use the version under /usr/lib/jvm/java-1.5.0-sun/jre.

On my 5.1.0 CD (from Dec06), Sun's java was the default and was already at 1.5 level. No idea why Klaus Knopper reverted to some other/older implementation now that Sun have released "the real thing" as open source ...

dahveed3
04-14-2008, 04:50 AM
Heh, not sure why a lot of things! :)

One of them being the Konqueror browser only having on the settings plugins section the old netscape plugin folders that don't even exist anymore. The other distros keep those too, but also have in there where the plugins are installed NOW. So even though Iceweasel has the plugins installed, Konqueror has no idea that the totem-plugin is there, Flash when installed (flashplayer-mozilla from debian-multimedia.org), RealPlayer (which I install from debian-multimedia's testing repo and uninstall the Helix stuff) plugins, etc. As long as we install the w32codecs from debian-multimedia.org and gstreamer0.10-plugins-ffmpeg gstreamer0.10-plugins-pitfdll, gstreamer0.10-plugins-reallybad, and ffmpeg-full we get the normal web stuff going with the totem-gstreamer when the plugin calls for it. I think good and ugly are already installed.

I also rename the libtotem-complex so and xpt ones in those folders (especially the totem gstreamer folder where they all link to) so that RealPlayer will handle all the Real files on the net as long as you open RealPlayer up once and go through its wizard.

I just click add in there, browse to the various paths that hold the plugins (like /usr/lib/iceweasel/plugins, /usr/lib/totem/gstreamer, /usr/lib/mozilla/plugins, etc). Then I click refresh plugins and all of a sudden Konqueror will play all the stuff.

After doing the update-alternatives things, just putting java in the Konqueror Java box gets sun-java5 going in Konqueror as well. Or put the path to it in there, whichever.

I can see not installing the patent encumbered stuff by default, but not updating the plugin links in Konqueror's plugin settings is weird. Not everyone knows where to browse for the plugin folders so lots of folks will just think Konqueror is not usable for playing media from the web.