PDA

View Full Version : compiling a java file



stasch
April 8th, 2005, 07:37 PM
can i compile a java file in ubuntu? do i need to download an sdk or jre and if so were can i get it?

Leif
April 8th, 2005, 07:41 PM
You can download it from the sun site and run the installer. I prefer to add this to my sources :

deb http://ubuntu.tower-net.de/ubuntu/ warty java

and apt-get it

stasch
April 8th, 2005, 08:08 PM
Thanx but when i clicked on ur likn i got the following msg

"Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.

Error 403
ubuntu.tower-net.de
Fri Apr 8 21:06:37 2005
Apache/2.0.49 "

Leif
April 8th, 2005, 10:04 PM
Sorry for not being clear. Do this :

1) open a terminal
2) type sudo gedit /etc/apt/sources.list
3) place that whole line (deb http://ubuntu.tower-net.de/ubuntu/ warty java) at the end of your file
4) close gedit
5) start synaptic*
6) reload
7) search for sun-j2sdk1.5
8) install

* alternatively, just type these instead at the terminal :
5) sudo apt-get update
6) sudo apt-get install sun-j2sdk1.5

taygan
April 9th, 2005, 06:06 AM
Hmm I'm running hoary, but put in the warty java repository, and it gives me this:

sun-j2sdk1.5:
Depends: sun-j2sdk1.5debian but it is not installable

any ideas?

Leif
April 9th, 2005, 09:22 AM
Unfortunately I'm not savvy enough to figure out where packages I installed come from. Do you have universe/multiverse enabled ?

defkewl
April 11th, 2005, 03:52 PM
Why don't you download java sdk from java.sun.com?
They have the installer for linux too.
Pick the .bin ones since you're using ubuntu.

thePythonAlchemist
April 12th, 2005, 03:39 AM
I put the Sun SDK on my system; it's not really any harder than installing a package. Just remember to add these lines to /etc/bash.bashrc for better usability:


JAVA_HOME=/path/to/java/dir
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

flightcrank
May 5th, 2005, 09:35 AM
I put the Sun SDK on my system; it's not really any harder than installing a package. Just remember to add these lines to /etc/bash.bashrc for better usability:


JAVA_HOME=/path/to/java/dir
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
thanks worked a treat !

jerome bettis
May 5th, 2005, 06:20 PM
http://www.ubuntuforums.org/showthread.php?t=22646

that an automated script that sets up java and lots of other good stuff.