-
Senior Member
registered user
installing jdk
OK, I've never had to install java before because KNOPPIX has backdown java and supports javac and java which is all my students need.
My problem is that I'm trying out QUANTIAN and java is not installed. I knoppix-installed QUANTIAN and downloaded the latest javasdk, j2sdk-1_4_2_04-linux-i586.bin, and installed it as root to /usr/local. It created sub directories:
j2sdk1.4.2_04/bin
j2sdk1.4.2_04/demo
j2sdk1.4.2_04/jre
j2sdk1.4.2_04/include
j2sdk1.4.2_04/lib
j2sdk1.4.2_04/man
Now, how do I set the path to include at least /usr/local/j2sdk1.4.2_04/bin (where javac, java, appletviewer and javadoc live) so everyone can use it?
TIA,
AJG
-
Jorge,
I did installed java several times. But never used besides, the need in netscape to enter (and use) certain sites.
I installed from the sun binaries until recently....
Knoppix, quantian are Debian-based distribution, so you've got the powerfull apt-get tool.
Edit
/etc/apt/source.list
and add at the end:
deb ftp://metalab.unc.edu/pub/linux/deve...own.org/debian woody main non-free
(one single line)
then run :
apt-get update
apt-get install j2sdk1.3
This will install the j2sdk1.3
(the whole lot of java package are available:
apt-cache search j2sdk
and you'll see all the package available)
sorry if I put too much details in the apt-get description...
hope this help
talueguito
raul
-
Senior Member
registered user
Oh, thanx! I couldn't find blackdown with apt-cache search so I went to http://java.sun.com.
In anycase, I'd still like to know how to set the path in case I need it for other apps. I need to install yabasic (IBM BASICA for DOS clone) and phoenix (M$ Visual BASIC clone) - among other things - too!
BTW, now that I've gone to the trouble to install a full jdk, I'd like to use swing and javadoc and appletviewer (not in blackdown). I do use swing in blackdown but I have to download a MAC file swingall.jar in ftp://ftp.baldwinschools.net/calcpage/apcs/JarFiles.zip
TIA,
AJG
-
Senior Member
registered user
Welcome Jorge.
This is a Java-Developer speaking.
edit /etc/profile
Code:
JAVA_HOME=/usr/local/java
PATH=$PATH:/usr/local/java/bin
export JAVA_HOME
export PATH
I used 'java' instead of 'j2sdk1.4.0-4-beta-alpha.linux-bla' because of 2 reasons:
1) To lazy to tip it in.
2) I recommend to create a symbolic link:
Code:
ln -s /usr/local/j2sdk1.4.0-4 /usr/local/java
Then you may install a jdk1.5 parallel, and just change the link, to test the tiger.
But the path and JAVA_HOME (which is important) still point to the right direction.
If you don't like this solution, just specify the complete path in 'profile'.
You needn't restart the system.
To read the profile again, you can source /etc/profile.
But perhaps on user (or root) -level the system-variables have been manipulated after reading profile (~/.profile, /etc/bashrc, ~/.bashrc, ~/.bashlogin)
I guess a re-login will work.
P.S.: I made good experiences using eclipse-gtk for development.
For small files, the midnight-commander and scite are good editors.
I guess scite isn't included in the distro (as well as eclipse).
-
Senior Member
registered user
Good, that's what I was looking for, /etc/profile!
My profile is listed below. Can I simply edit the PATH= line and add the path to the jdk?
TIA,
AJG
# /etc/profile
umask 022
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games"
export PATH
# Set LOCALE
if [ -f /etc/sysconfig/i18n ]; then
. /etc/sysconfig/i18n
[ -n "$LANG" ] || LANG="de_DE"
export LANG
[ -n "$LC_CTYPE" ] && export LC_CTYPE || unset LC_CTYPE
[ -n "$LC_COLLATE" ] && export LC_COLLATE || unset LC_COLLATE
[ -n "$LC_MESSAGES" ] && export LC_MESSAGES || unset LC_MESSAGES
[ -n "$LC_NUMERIC" ] && export LC_NUMERIC || unset LC_NUMERIC
[ -n "$LC_MONETARY" ] && export LC_MONETARY || unset LC_MONETARY
[ -n "$LC_TIME" ] && export LC_TIME || unset LC_TIME
[ -n "$LC_ALL" ] && export LC_ALL || unset LC_ALL
[ -n "$LANGUAGE" ] && export LANGUAGE || unset LANGUAGE
[ -n "$LINGUAS" ] && export LINGUAS || unset LINGUAS
[ -n "$_XKB_CHARSET" ] && export _XKB_CHARSET || unset _XKB_CHARSET
if [ -n "$SYSFONTACM" ]; then
case $SYSFONTACM in
iso01*|iso02*|iso15*|koi*|latin2-ucw*)
if [ "$TERM" = "linux" ]; then
if ls -l /proc/$$/fd/0 2>/dev/null | grep -- '-> /dev/tty[0-9]*$' >/dev/null 2>&1; then
echo -n -e '\033(K' > /proc/$$/fd/0
fi
fi
;;
esac
fi
unset SYSFONTACM
fi
# END LOCALE
# enable bash completion in interactive shells
[ "$PS1" -a -f /etc/bash_completion ] && . /etc/bash_completion
PS1="\u@\h:\w\\$ "
alias which="type -path"
alias where="type -all"
alias ll="ls -l --color=auto"
alias rm="rm -i"
alias mv="mv -i"
alias cp="cp -i"
alias la="ls -la --color=auto"
alias ls="ls --color=auto"
-
Senior Member
registered user
Yes.
And don't forget JAVA_HOME!
-
Senior Member
registered user
Yes.
And don't forget JAVA_HOME!
-
Senior Member
registered user
Why do I need JAVA_HOME? I simply added the path to the PATH= line in etc/profile and all is well.
It strikes me that I should not have downloaded the javasdk*.bin and installed it by making it executable. I think they had a javasdk*.rpm I could have installed via alien. If I had done that I probably wouldn't have to do all this path stuff by hand, right? I've never had to do that with *.deb or *.rpm files....
Another thing, the dox on java.sun.com said to install the *.bin in /usr/local. I don't know why. If I had installed it in /usr/bin, would I have had to worry about the path as /usr/bin was already on my PATH?
TIA,
AJG
-
Senior Member
registered user
You normally put only executables in /usr/bin.
If you installed the bin (which is more or less a zip-file, which get's unzipped), your path would have to be set to '/usr/bin/java/bin', because the whole java-directory would have been extracted there.
You could of course move the binaries from /opt/java/bin/* to /usr/bin, but that's not a good idea. Solipcistic binaries do well in /usr/bin, but a big package like java is better managed as a big entity.
You often don't only need to know, where the binaries are, but too where the libs are (*.jar), the docs, etc.
Tools like eclipse, ant, ... only need to know the JAVA_HOME, and can figure out the rest, if the structure $JAVA_HOME/bin, $JAVA_HOME/lib, $JAVA_HOME/docs, ... isn't changed.
If you use JAVA_HOME, you will have nearly zero CLASSPATH - questions.
I don't have any CLASSPATH.
I put all often used jars into /opt/java/jre/lib/ext and everything is found.
I don't like rpms, debs etc.
A installation-script for 2 variables to set?
I don't know how deb and rpm handle multi-user installations, and whether they do well, with multiple versions.
For experimenting I need the 1.5-beta, while still using the 1.4.2-release too.
I guess such things aren't easily to be handled by an installation-script.
You run the binary and set up 2 environment-variables (in words: two! ) - in my opinion the dependencies are really reduced to an absolute minimum.
-
jre1.1 Java installation
FYI
from knoppix 3.4,kernel 2.4.26 :
Kpackage, then install jre1.1, then all (almost) java applets will
work in mozilla, I think. Correct me if I'm wrong
A+
Similar Threads
-
By jza in forum Hdd Install / Debian / Apt
Replies: 1
Last Post: 05-03-2003, 11:30 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
AMD EPYC 7282 CPU Processor 16 Cores 32 Threads 2.8GHZ up to 3.2GHZ 120W no lock
$75.00
Intel - Core i7-12700K Desktop Processor 12 (8P+4E) Cores up to 5.0 GHz Unloc...
$419.99
Intel Xeon E5-2697A V4 2.6GHz CPU Processor 16-Core Socket LGA2011 SR2K1
$39.99
Intel - Core i9-12900K Desktop Processor 16 (8P+8E) Cores up to 5.2 GHz Unloc...
$619.99
Intel Quad Core i3-12100 3.3GHz 12MB LGA1700 12th Gen. CPU Processor SRL62
$46.03
AMD Ryzen 5 4500 6-Core 3.6GHz Socket AM4 65W CPU Desktop Processor
$79.00
Intel Core i9-13900KF Unlocked Desktop Processor - 24 Cores (8P+16E) & 32 Thread
$539.99
Intel Core i7-3770 3.40GHz Quad-Core CPU Processor QC1W LGA1155 Socket
$33.49
AMD Ryzen 7 7700 Processor (5.3 GHz, 8 Cores, Socket AM5) Boxed -...
$259.99
Intel Core i7-3770 3.40GHz 8MB Quad Core Socket LGA1155 CPU Processor SR0PK
$35.00