Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-15-2012, 07:14 AM   #1
LQ Newbie
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
Fixing Java path on Ubuntu

I am studying java. I can compile and test on my laptop, but was trying to get it working under Ubuntu on an Amazon EC2 account. But when I tried to compile there were apparently several versions in the path. I'd just like it to resolve to the most current version. I'm pretty rusty with Unix, do you know how I can fix my path? Thanks. James

BTW, here's a sample of my call to the compiler and the response I got. James

ubuntu@ip-10-80-173-103:~/java$ javac v*
The program 'javac' can be found in the following packages:
* openjdk-6-jdk
* ecj
* gcj-4.4-jdk
* gcj-4.6-jdk
* gcj-4.5-jdk
* openjdk-7-jdk

Thanks, jem
Old 08-15-2012, 07:02 PM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
I think what it's saying is that java isn't installed and is offering you a list of packages that can provide it - it will be up to you to install one though. Openjdk-7-jdk is probably what you want unless you have a specific requirement to use java 1.6.
Old 08-16-2012, 11:14 PM   #3
Senior Member
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,387

Rep: Reputation: 1035Reputation: 1035Reputation: 1035Reputation: 1035Reputation: 1035Reputation: 1035Reputation: 1035Reputation: 1035
This a bit of dark ubuntu magic. Actually it means: 'right now you don't have "javac" installed', but it also gives you some hints how to get one (ie installing one or of those packages. (I'd offer direct download from Sun/Oracle, and install it under /opt. (Requires a bit experience in-linux administration though.)))

PS: if your aren't root-user on that computer, don't try to install/download anything, contact the help/support/administrator.

Last edited by NevemTeve; 08-16-2012 at 11:17 PM.


java, path

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set class path for java in ubuntu 9.10 kumar116 Linux - Software 2 05-24-2010 04:33 PM
1. wireless in ubuntu; 2. new path in bashrc; 3. running java johnyjj2 Linux - Newbie 1 11-01-2009 06:46 PM
java path,classpath problem on ubuntu 9 n3mbers Ubuntu 1 08-16-2009 06:13 AM
Java path problems in Ubuntu 7.04 nexl Linux - Software 3 05-26-2008 02:21 PM
Ubuntu 7.10 64bit - how to set java path to/redirect java to ? Thane Ubuntu 1 03-25-2008 05:52 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration