-   Programming (
-   -   Fixing Java path on Ubuntu (

jmessick 08-15-2012 08:14 AM

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

kbp 08-15-2012 08:02 PM

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.

NevemTeve 08-17-2012 12:14 AM

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.

All times are GMT -5. The time now is 03:12 PM.