-
Junior Member
registered user
java compiler and interpreter
i have a dual boot system with XP and knoppix.
i am not very well versed when it comes to linux, but i can't really concentrate on learning linux because i am stuck using windows for all the programming stuff i do.
i tried to download the compiler and interpreter from java.sun.com but i really don't know how to make it install or run. as i said im not well versed in linux. can i apt-get them someway?
any help would be appreciated
-
Junior Member
registered user
Sun does not use an open license for Java so it is not included with the official Debian archives, so you can't apt-get install with a stock /etc/sources.list file.
However, the Blackdown project (blackdown.org) provides Java packages for Debian (and many others). These are not very up to date (usually) so I just download the Java SDK (not the JRE!) from Sun and install it.
Here's how you do it:
1. Download the "Linux self-extracting file" package from http://java.sun.com/j2se/1.4.2/download.html
2. Create a directory for Java related stuff under /usr/local:
$ cd /usr/local
$ su (enter password for root, note that the prompt changes when you're root)
# mkdir java
# cd java
3. Then you need to run the file. With this file you can do it like this:
# sh j2sdk-1_4_2_01-linux-i586.bin
....or like this:
# chmod +x j2sdk-1_4_2_01-linux-i586.bin (this makes the file executable)
# /home/hw/downloads/j2sdk-1_4_2_01-linux-i586.bin (execute it - run this from the /usr/local/java directory)
4. Now it's installed. Still, the java and javac commands won't work from the command line because the /bin subdirectory from the SDK isn't in the path. We need to add them somehow. There are many different ways of doing this but this is how I usually do it:
Edit /etc/profile (as root) with your favourite text editor. There should be a line that specifies directories that contain executables and should be added to the PATH environment variable. Something like this:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
The directories are separated by colons(
. Add a colon at the end of the line (but before the closing quote) and add the Java bin directory. If you followed my outline above it should be /usr/local/java/j2sdk1.4.2/bin/.
Now the line looks like this:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/usr/local/java/j2sdk/bin"
Save the file! 
Either log out and log in again or do a "source /etc/profile" to let the changes take effect. Type "javac" at the shell prompt and you should see the exact same thing as you see on Windows!
hw
-
Junior Member
registered user
thanks a shitload!! i will try this tonight for sure. thank you for your help, ill post if i have any troubles (i probably wont)
-
Junior Member
registered user
Thanks a shit-load indeed. That is an excellent how-to post. You are a scholar and a gentleman.
-
Senior Member
registered user
Yup, getting everything from java.sun.com is a good idea. That way you have the full java suite including javac, java, javadoc and appletviewer.
However, I use the following method without installing anything to an hdinstall (also works off a liveCD boot).
http://www.knoppix.net/forum/viewtopic.php?p=38190
http://www.knoppix.net/forum/viewtopic.php?p=38440
Enjoy!
Regards,
AJG
-
Senior Member
registered user
OK, I just tried to install the *.rpm with alien and kpackage as root. I used the *.rpm for J2SE 1.5 instead of the method listed above because I need to change the version of java system wide so all my users would get the update. The JDK that comes with KNOPPIX doesn't include javax.swing.*, javadoc or appletviewer. So I want all my users to get all this stuff! The problem is that the new java installation isn't available to my users. Did I forget to do something???
TIA,
AJG
Similar Threads
-
By mrobertson in forum General Support
Replies: 0
Last Post: 06-07-2005, 02:45 PM
-
By gopikrish in forum General Support
Replies: 1
Last Post: 08-21-2004, 02:52 AM
-
By Ralf79 in forum General Support
Replies: 0
Last Post: 11-26-2003, 09:34 PM
-
By Rookie in forum General Support
Replies: 3
Last Post: 10-11-2003, 11:30 PM
-
By michaelmontagne in forum General Support
Replies: 1
Last Post: 09-04-2003, 09:17 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

MegaRAID 9580-8i8e 16-port 12G SAS/SATA/NVMe 8GB PCIe RAID - 05-50076-00
$1619.30

Broadcom 9600-24i Tri-Mode RAID Controller 4.0 NVMe SAS SATA NEW 05-50111-01003
$639.69

G-Technology G-SPEED Studio XL 48TB Thunderbolt 2 Storage - Housing Only
$200.00

HP controller P3410-69003 NetRAID-1M SCSI 64-bit U160 32MB Cache (PCI)
$359.00

Broadcom LSI 9305-16i 12Gbps SAS-3 PCIe x8 HBA 16-Ports Raid Controller
$64.99

Inspur LSI YZCA-00424-101 12Gbps SAS 3.0 RAID Controller CARD HBA HDD
$14.99

OWC Mercury Elite Pro Quad 4 Bay RAID Storage Enclosure USB 3.1 Gen 2 No Drives
$149.95

LSI 9260-8i 512MB SAS SATA 8-port PCI-E 6Gb RAID Controller Card US
$29.88

Serial ATA two-port SATA PCI card (SiI3112 sil3112 chipset)
$18.99

KTN-STL3 EMC VNX 15-slot Disk Array Expansion, full 15 x 2tb drives 100% health
$360.00