-
Senior Member
registered user
J2SE-1.5???
OK, I just downloaded the latest Java Developers' Kit (JDK) from sun as an *.rpm. I used alien to make a *.deb. I used kpackage *.deb to install it. Of course, I did all this logged-in as root.
I followed all the directions in:
http://java.sun.com/j2se/1.5.0/install-linux.html
for using the *.rpm but I still only have access to the javac and java apps that came installed on KNOPPIX. Is there a missing step I need to do to get the new javac and java recognized by my users? I seem to recall someone had a similar issue last year, but I can't find that post....
BTW, I don't really need javac 1.5 or java 1.5. What I'm trying to do is get javadoc and appletviewer for my users. Also, having the javax.swing.* graphics classes available in javac would be nice....
Please help!
TIA,
AJG
-
Senior Member
registered user
java doesn't need a complicated installation mechanism.
You have to set the JAVA_HOME to your java-directory, i.e.:
Code:
export JAVA_HOME=/opt/j2se
in /etc/profile.
And include $JAVA_HOME/bin in your path. If your old java-app is in the path, the order who appears first is important.
Code:
export PATH=$PATH:$JAVA_HOME/bin
will show you, which javac is found first (if one at all).
-
Senior Member
registered user
OK, now I get it. Half the problem is that I couldn't find where the new java utilities were installed! Blackdown uses /usr/bin/ You suggest /opt/j2se/ Where it ended up is /usr/java/jdk1.5.0/ So, now, all I have to do is add /usr/java/jdk1.5.0/bin to my path in /etc/profile, right?
Well, I did that. I placed /usr/java/jdk1.5.0/bin at the end of the PATH line in /etc/profile and ran source /etc/profile. However which javac still returned /usr/bin/javac! So I placed /usr/java/jdk1.5.0/bin on the PATH in /etc/profile before /usr/bin and ran source /etc/profile. Now which javac returns /usr/java/jdk1.5.0/bin/javac, good.
New Problem: when I run any of the following:
appletviewer -version
javadoc -version
javac -version
java -version
I get this error:
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
What now???
Thanx in advance,
AJG
-
Senior Member
registered user
Did you set JAVA_HOME?
Setting the /usr/java/jdk1.5.0/bin at the beginning of the path is a quick but dirty solution.
Every programm you call is firstly been searched in this directory, while most of them are in /usr/bin, usr/local/bin, /bin, /sbin /usr/sbin etc.
Probably in /usr/bin there are only a links to the blackdown-java stuff?
Code:
ls -la /usr/bin/java*
should show.
Then you could delete these links.
If not, you have to choose whether you delete the files, or move them to an archive.
Before the new java works correctly, I would keep them somewhere else.
And put the $JAVA_HOME/bin at the end of the path.
You may as well make a link to the javadoc and appletviewer:
Code:
ln -s /usr/java/jdk1.5.0/bin/appletviewer /usr/local/bin/appletviewer
and similiar for javadoc
Perhaps you have the somewhat braindead /etc/alternatives installed, which is confusing:
Code:
ls /etc/alternatives
I'm not familiar with it, and have to consult the manpages for the syntax, but you then need perhaps to update-alternatives or something similar too.
Code:
update-alternatives --help
man update-alternatives
for more information.
-
Senior Member
registered user
Thanx for the help! I finally got it working.
It wasn't the /etc/profile stuff, it was the *.rpm! It would seem that alien couldn't handle it and the *.deb got mangled. So, I downloaded jdk-1_5_0-rc-linux-i586.bin (a self extracting installer) from http://java.sun.com/j2se/1.5.0/download.jsp instead of the *.rpm.bin and everything installed great!
Thanx again,
AJG
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
![Type C USB 3.0 Flash Drive Thumb Drive Memory Stick for PC Laptop 1TB 2TB lot picture](/store/img/g/oroAAOSwsJNmFPcr/s-l225/Type-C-USB-3-0-Flash-Drive-Thumb-Drive-Memory-Stic.jpg)
Type C USB 3.0 Flash Drive Thumb Drive Memory Stick for PC Laptop 1TB 2TB lot
$73.29
![USB Flash Drive Memory Stick Pendrive Thumb Drive 4GB, 8GB, 32GB, 64GB 128GB LOT picture](/store/img/g/EI0AAOSwsBpju-XZ/s-l225/USB-Flash-Drive-Memory-Stick-Pendrive-Thumb-Drive-.jpg)
USB Flash Drive Memory Stick Pendrive Thumb Drive 4GB, 8GB, 32GB, 64GB 128GB LOT
$230.40
![1TB/2TB USB 3.0 Flash Drive Thumb U Disk Memory Stick Pen PC Laptop Storage lot picture](/store/img/g/PDMAAOSwlhdmFJ5R/s-l225/1TB-2TB-USB-3-0-Flash-Drive-Thumb-U-Disk-Memory-St.jpg)
1TB/2TB USB 3.0 Flash Drive Thumb U Disk Memory Stick Pen PC Laptop Storage lot
$80.39
![Sandisk 16GB 32GB 64GB 128GB Cruzer Blade Flash Drive Memory Stick USB Lot Pack picture](/store/img/g/H94AAOSw8zNjfbQ9/s-l225/Sandisk-16GB-32GB-64GB-128GB-Cruzer-Blade-Flash-Dr.jpg)
Sandisk 16GB 32GB 64GB 128GB Cruzer Blade Flash Drive Memory Stick USB Lot Pack
$138.90
![Lenovo 2TB USB Flash Drive 3.0, USB Flash Drive, High Speed Dr, New, Drk Silver picture](/store/img/g/fIsAAOSwkSNmZPNx/s-l225/Lenovo-2TB-USB-Flash-Drive-3-0-USB-Flash-Drive-Hig.jpg)
Lenovo 2TB USB Flash Drive 3.0, USB Flash Drive, High Speed Dr, New, Drk Silver
$9.99
![64GB USB 3.0 Flash Drive USB Memory Stick High Speed Retractable USB Thumb Drive picture](/store/img/g/1Q4AAOSwDeRivXJz/s-l225/64GB-USB-3-0-Flash-Drive-USB-Memory-Stick-High-Spe.jpg)
64GB USB 3.0 Flash Drive USB Memory Stick High Speed Retractable USB Thumb Drive
$6.99
![Lenovo Metal 2tb USB Flash Drive USB 3.0 High Speed File Transfer U Disk 16tb 8t picture](/store/img/g/nJcAAOSwLZlmaBE8/s-l225/Lenovo-Metal-2tb-USB-Flash-Drive-USB-3-0-High-Spee.jpg)
Lenovo Metal 2tb USB Flash Drive USB 3.0 High Speed File Transfer U Disk 16tb 8t
$7.99
![SanDisk Cruzer Blade 32GB USB 2.0 Flash Drive Thumb Memory Stick Pen SCDZ50 32G picture](/store/img/g/tfoAAOSw9IFjR2AH/s-l225/SanDisk-Cruzer-Blade-32GB-USB-2-0-Flash-Drive-Thum.jpg)
SanDisk Cruzer Blade 32GB USB 2.0 Flash Drive Thumb Memory Stick Pen SCDZ50 32G
$5.75
![SanDisk Ultra Flair USB 3.0 Flash Drive Memory 16GB 32GB 64GB 128GB 256GB 512GB picture](/store/img/g/QSEAAOSwV4xlKcuD/s-l225/SanDisk-Ultra-Flair-USB-3-0-Flash-Drive-Memory-16G.jpg)
SanDisk Ultra Flair USB 3.0 Flash Drive Memory 16GB 32GB 64GB 128GB 256GB 512GB
$241.99
![USB Flash Drive Thumb Drive Memory Stick Pendrive 4GB, 8GB, 32GB, 64GB 128GB LOT picture](/store/img/g/F24AAOSw8TNj9zeD/s-l225/USB-Flash-Drive-Thumb-Drive-Memory-Stick-Pendrive-.jpg)
USB Flash Drive Thumb Drive Memory Stick Pendrive 4GB, 8GB, 32GB, 64GB 128GB LOT
$308.13