File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Java installation through a command line? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Java installation through a command line?" Watch "Java installation through a command line?" New topic
Author

Java installation through a command line?

Jason Kwok
Ranch Hand

Joined: Mar 31, 2005
Posts: 126
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

Joined: Oct 29, 2001
Posts: 8876
    
    8

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.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16020
    
  20

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jason Kwok
Ranch Hand

Joined: Mar 31, 2005
Posts: 126
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

Joined: Dec 08, 2006
Posts: 106
nice idea try it ..


<a href="http://www.java-tips.org/java-tutorials/tutorials/" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="http://www.planet-java.org" target="_blank" rel="nofollow">Java Weblog</a> | <a href="http://computer-engineering.science-tips.org" target="_blank" rel="nofollow">Computing Articles</a>
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
In Ubuntu you can use the apt-get or aptitude to get Sun JDK, either 1.4 or 1.5.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java installation through a command line?