-
Java Upgrade Hell
After recently installing Knoppix on my new computer, I decided to start working on a programming project in Java started on my previous computer. I discovered that some of the code was not compiling correctly, possibly related to javac being gcj on my new system as opposed to the Sun java compiler on my old system. Anyway, I decided to try installing some new java tools.
Not really sure what I needed, I installed Synaptic to help my search. So far so good. I see the Jikes compiler, try it, don't get it to work, no biggie, move onto Eclipse. Here is where things get hairy. I try to install the complete Eclipse development kit/platform, whatever, about 6 pacakges in total. Something breaks along the way, although eclipse seems partially installed. I can run it sometimes, though it crashes easily and most times cannot start at all. I decide to say screw it and just uninstall both Jikes and all the Eclipse stuff.
I think I got some more apt-get errors on uninstall, though I can't remember for sure. My Java VM still seems to run okay, although now it gives the error:
Mar 22, 2004 11:11:16 PM java.util.prefs.FileSystemPreferences$3 run
WARNING: Could not create system preferences directory. System preferences are unusable.
when I run something, which it did not before. I would like to know what is happening here and how I can clean it up.
The biggest problem though is that Mozilla no longer recognizes the Java plugin! Everything looks correct, although the symlinks seem a bit convoluted they all point to the correct places: /usr/lib/mozilla/plugins/javaplugin_oji.so --> /etc/alternatives/javaplugin_oji.so --> /usr/lib/j2se/1.4/jre/i386/mozilla/javaplugin_oji.so. In that final target the mozilla directory is itself a symlink to same level directory ns610-gcc32. Everything appears to be just as it should but mozilla shows no java plugin under About -> Plugins, and tells me I need to install a plugin when I try to run applets. This is after multiple Mozilla restarts and a system reboot.
Getting my Java VM and plugin back in working order is my top priority. After that, and advice related to getting a solid, Java 1.4 development environment setup would be greatly appreciated. Currently I have gcj-3.3 as my java compiler and j2re1.4 (Blackdown 1.4.0.99beta-1) as VM. Both of these were included in the original Knoppix install and AFAIK have not been modified but the other installations I've tried.
Thanks.
-
addition
Just discovered that Java works fine in Konqueror, so my problem isn't quite as "tragic" as I thought it might be, although Mozilla is still my preferred browser and I'd really liek to get everything at least back to working as well as it did before, and prefereably better as far as Java development.
-
Senior Member
registered user
To get rid of
Mar 22, 2004 11:11:16 PM java.util.prefs.FileSystemPreferences$3 run
WARNING: Could not create system preferences directory. System preferences are unusable.
run *any* java app as *root* once; this creates the 'system preference directory'. You should then no longer see this message (regradless of whether you're runnign a java app as root or as a normal user).
Installing a jvm (or is it jre?) is a real pita. I've installed the same java version as you (via apt-get) and whenever I install any other package I still get a message that j2re1.4 is not correctly installed. Really should file a bug :( I don't know how to fix this, and I doubt I've got java support for Firefox (my preferred browser), haven't checked Konqueror yet.
I'm so annoyed with the j2re1.4 package that I'm considering uninstalling it and trying another jvm (kaffe perhaps).
HTH
-
I've used the JVM from Sun
I took the following steps after downloading the Sun's Linux JVM.
It would be nice if Sun would release Java as a DEB package
and would allow the debian mirrors to list it in the non-free (as in non-open source) section, but this script wasn't so bad.
After installing this way, I didn't have any problem installing/using eclipse.
su - root
chmod u+x ./j2sdk-1_4_2_03-linux-i586.bin
mkdir /usr/java/
cd /usr/java/
/root/j2sdk-1_4_2_03-linux-i586.bin
update-alternatives --install /usr/bin/java java \ /usr/java/j2sdk1.4.2_03/bin/java 350
update-alternatives --install /usr/bin/javac javac \
/usr/java/j2sdk1.4.2_03/bin/javac 350
update-alternatives --install /usr/bin/javah javah \
/usr/java/j2sdk1.4.2_03/bin/javah 350
-
First thanks to c123 for telling me how to get rid of that annoying system prefs message. I have a feeling I might have dealt with that sometime in the past, but forgotten about it.
Jam123, your advice sounds good too. I had thought about just installing the Sun VM since I've used it successfully before, and because there is a stable version of 1.4 available compared to the 1.4 beta of Blackdown, but was leary of installing non-Debian packages on my system which might cause conflicts. After looking up the update-alternatives command, the debian way of supporting interchangeable modules makes more sense to me now, and I plan on probably taking this route.
However, I would like to get my Mozilla plugin issue figured out, even though I will probably need to repeat the steps once I install the Sun JVM. I've made a little headway towards figuring things out. I noticed that my Mozilla plugins directory had a link to javaplugin_oji.so but NOT to libjavaplugin_oji.so, as is recommended on Mozilla's webpage. I added the link, and now about
lugins correctly identifies the plugin, but Mozilla freezes when I try to load a Java applet. I tried removing the seemingly unnecessary link to javaplugin_oji.so, but this makes no difference. Clearly something is happening, but not correctly.
Any ideas?
-
Senior Member
registered user

Originally Posted by
Arkaein
However, I would like to get my Mozilla plugin issue figured out, even though I will probably need to repeat the steps once I install the Sun JVM. I've made a little headway towards figuring things out. I noticed that my Mozilla plugins directory had a link to javaplugin_oji.so but NOT to libjavaplugin_oji.so, as is recommended on Mozilla's webpage. I added the link, and now about

lugins correctly identifies the plugin, but Mozilla freezes when I try to load a Java applet. I tried removing the seemingly unnecessary link to javaplugin_oji.so, but this makes no difference. Clearly something is happening, but not correctly.
Any ideas?
You may want to go to http://lists.debian.org and search the Debian User mailing list this topic comes up there all the time there is something about getting the right version with the proper complier used involved with the problem IIRC.
-
Well, if my problem is that my Blackdown JVM somehow got switched out with one compiled using an incompatible version of gcc, which I believe would explains why it works by itself but not with Mozilla, will the Sun JVM work correctly with Mozilla? I'm probably going to install it anyway, but I thought I read that at least a while ago Sun's JVMs were being compiled with a version of gcc incompatible with newer builds of Mozilla, is this still the case?
Also, for the method of installing Java jam123 suggested, should I uninstall my current JVM first, and if not, do I need to explicitly set which JVM is used by default through other update-alternatives commands (and do those backslashes in the commands do anything, or just supress linefeeds)?
Thanks.
-
Hello Arkaein,
like jam123 i would suggest to take the Java SDK from SUN's website directly and not use Debians' not that cool Java stuff.
First i would remove all of Debian's Java things (gcj) and then download and install SUN's Java ( http://java.sun.com/j2se/1.4.2/download.html ). Create some symlinks for some bin/ directory (e.g.: /usr/local/bin) to your Java binaries (java, javac, javaw, javadoc, ...).
Install Eclipse (2.1 found the Java installation on my system) and
be happy 
For your Mozilla problem: Which version do you use? Could it be that the Java plugin that is compiled with gcc3.2 is not the right thing for you? Java and Mozilla have to be compiled with the same gcc version, i think.
That was all I've done and I am very comfortable with it.
Hopefully my proposals will help you
-
Senior Member
registered user
I just don't understand why a compiler matters. This IMO is completely unacceptable and hard to convey message to an average user.
-
Thanks for the advice Jatronn, whether to uninstall stuff first was my bigget issue, although I think I will leave gcj and just make sure it is NOT linked to from /usr/bin/java. I may want to compile native binaries at some point, and the gcc set of tools are sufficiently separated from the Java runtime environment that these ought to be able to co-exist all right.
The plugin issue is strange, because like I mentioned above everything did work when I initially installed Knoppix. Mozilla 1.5, with libjavaplugin_oji.so in the mozilla/plugins directory linked to the actual file in the ns610-gcc32 directory (with the link in /etc/alternatives in the middle). This jives with everything I've read, including the documentation on mozdev.org. Oh well, I've already removed the link from Mozilla to prevent accidental crashes, so I'll just have to try out the new JVM when I get it installed.
BTW, I think I'll go with the Sun Java VM, since I've installed it before on previous systems, but has anyone compare the IBM JVM with the Sun one? I've read that the IBM VM may give better perfomance on average, and I might like to try it out.
Similar Threads
-
By Schopenhauer101 in forum Hdd Install / Debian / Apt
Replies: 12
Last Post: 01-18-2005, 06:25 AM
-
By mystical_kakarot in forum Hdd Install / Debian / Apt
Replies: 1
Last Post: 02-10-2004, 09:20 PM
-
By freeballer in forum Customising & Remastering
Replies: 4
Last Post: 09-30-2003, 02:11 PM
-
By Jackson5 in forum General Support
Replies: 6
Last Post: 05-30-2003, 05:02 AM
-
By vesselinpeev in forum General Support
Replies: 0
Last Post: 05-26-2003, 09:03 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Computer Photo History Altair 8800 Philco 212 CDC 6600 DEC PDP-8 Apple 1 UNIVAC
$69.99

S-100 Vector Graphic 64K Ram Board (Altair, IMSAI)
$99.95

S-100 Vector Graphic 12K PROM/RAM Board (Altair, IMSAI)
$99.95

S-100 Bus Handbook Altair 8800 IMSAI 8080 Board Schematics Xitan Pertec Cromemco
$89.99

Vintage Digital Research ZSID 1.4 8" Floppy Disk CP/M Z80 Software S-100 Altair
$69.99

1979 Microprocessor Projects Altair 8800 Intel 8080 KIM-1 COSMAC Elf SWTPC 6800
$59.99

Altair MITS S100 Backplane 8080A S-100 Replica IMSAI CP/M (bare board)
$40.00

BYTE Magazine Cover Jan 1977 Canvas Print 8"x10" Retro Computer Altair 880
$7.00

CP/M 86 1.1R 8086 Highmonitor 8 Inch Floppy Diskette 80s IMSAI Altair
$29.99

ALTAIR Bitcoin Mining Solutions PDU IEC SERIES 100-250V 30A/24A Power Distribute
$99.00