Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java installation through a command line?

 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have Ubuntu server installed right now, and I'm trying to install the j2re, j2sdk and eventually tomcat. I've been searching around but unable to find any answers except that it's impossible, which I know can't be true. I'm thinking I would use wget for this, but finding a url seems to be a problem.

If anyone has any ideas as to how to download and install java through a command line, I'd really appreciate your help!!

Thanks,
Jason
 
Joe Ess
Bartender
Posts: 9279
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I take it you are talking specifically about downloading the JDK install bin file without a web browser because it is necessary to agree to the license agreement, right?
Why don't you download the BIN file on another computer and transfer it over to the server?
Except for downloading the JDK, the rest of the procedure is very straightforward and doesn't require a GUI.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless the machine is totally off the Internet, you can use Lynx (or links) to download the installable. Were it not for the need to agree before downloading, a simple wget would do the trick. Lynx/links isn't true command-line - it's an interactive text-mode GUI, but that might be close enough.

For actual installation, you'd either run the downloaded bin, if that's what you have, or explode the archive, if you have that instead. The end result is the same - a directory somewhere in your filesystem (preferably under /usr/java) that contains the JDK or JRE you want.

Under Linux, there's no "magic". No Registry, not even any /etc config files for Java. Everything's contained within the JDK/JRE directory.
 
Jason Kwok
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Joe Ess:
I take it you are talking specifically about downloading the JDK install bin file without a web browser because it is necessary to agree to the license agreement, right?


Exactly!!

I guess I'll download the j2re and j2sdk on my laptop, burn to cd and install through the cd.
 
Neerav Narielwala
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nice idea try it ..
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Ubuntu you can use the apt-get or aptitude to get Sun JDK, either 1.4 or 1.5.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic