-
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
![Gigabyte Z370P D3 ATX Z370 LGA1151 Motherboard (Support Intel 6/7th 8th 9th) picture](/store/img/g/QrkAAOSwMGNmLxf0/s-l225/Gigabyte-Z370P-D3-ATX-Z370-LGA1151-Motherboard-Sup.jpg)
Gigabyte Z370P D3 ATX Z370 LGA1151 Motherboard (Support Intel 6/7th 8th 9th)
$59.99
![ASRock B550M Pro SE AM4 DDR4 SATA 6Gb/s 1 PCIe 4.0 x16 Micro ATX Motherboard picture](/store/img/g/oXIAAOSwCn1k30lD/s-l225/ASRock-B550M-Pro-SE-AM4-DDR4-SATA-6Gb-s-1-PCIe-4-0.jpg)
ASRock B550M Pro SE AM4 DDR4 SATA 6Gb/s 1 PCIe 4.0 x16 Micro ATX Motherboard
$84.99
![Asus H81M-C Intel LGA1150 DDR3 Desktop Motherboard MicroATX Socket H3 picture](/store/img/g/CZ4AAOSwg8pmYirU/s-l225/Asus-H81M-C-Intel-LGA1150-DDR3-Desktop-Motherboard.jpg)
Asus H81M-C Intel LGA1150 DDR3 Desktop Motherboard MicroATX Socket H3
$23.99
![ASUS H110M-R Motherboard Intel 6th/7th Gen LGA1151 DDR4 Micro-ATX i/o shield picture](/store/img/g/FhQAAOSwzL9iDqc3/s-l225/ASUS-H110M-R-Motherboard-Intel-6th-7th-Gen-LGA1151.jpg)
ASUS H110M-R Motherboard Intel 6th/7th Gen LGA1151 DDR4 Micro-ATX i/o shield
$42.00
![Asus Prime A320M-K mATX AM4 Motherboard (Ryzen 1000-5000 Ready) picture](/store/img/g/v2sAAOSwFuxlhzOj/s-l225/Asus-Prime-A320M-K-mATX-AM4-Motherboard-Ryzen-1000.jpg)
Asus Prime A320M-K mATX AM4 Motherboard (Ryzen 1000-5000 Ready)
$49.99
![Asus Prime H310M-A R2.0 Intel LGA 1151 DDR4 Desktop Motherboard picture](/store/img/g/aowAAOSw9Bpmh3Fj/s-l225/Asus-Prime-H310M-A-R2-0-Intel-LGA-1151-DDR4-Deskto.jpg)
Asus Prime H310M-A R2.0 Intel LGA 1151 DDR4 Desktop Motherboard
$54.99
![NEW OEM ASRock H410M/MC LGA1200 Intel M-ATX Motherboard (Wifi) picture](/store/img/g/mUUAAOSwbGNmgEvT/s-l225/NEW-OEM-ASRock-H410M-MC-LGA1200-Intel-M-ATX-Mother.jpg)
NEW OEM ASRock H410M/MC LGA1200 Intel M-ATX Motherboard (Wifi)
$49.99
![ASUS B85M-E Motherboard Intel B85 (4th Gen) LGA1150 DDR3 microATX picture](/store/img/g/sjQAAOSw8blmdbCX/s-l225/ASUS-B85M-E-Motherboard-Intel-B85-4th-Gen-LGA1150-.jpg)
ASUS B85M-E Motherboard Intel B85 (4th Gen) LGA1150 DDR3 microATX
$31.99
![Gigabyte M-ATX motherboard with Intel Core i3 8100 CPU and 8GB DDR4 RAM picture](/store/img/g/CCsAAOSw9mtkQuoe/s-l225/Gigabyte-M-ATX-motherboard-with-Intel-Core-i3-8100.jpg)
Gigabyte M-ATX motherboard with Intel Core i3 8100 CPU and 8GB DDR4 RAM
$84.00
![ASUS PRIME Z690-P WIFI D4 ATX Motherboard Intel LGA1700 DDR4 HDMI picture](/store/img/g/gR8AAOSwhlJkracH/s-l225/ASUS-PRIME-Z690-P-WIFI-D4-ATX-Motherboard-Intel-LG.jpg)
ASUS PRIME Z690-P WIFI D4 ATX Motherboard Intel LGA1700 DDR4 HDMI
$99.99