[SOLVED] Sun JVM installation for VanetMobiSim/NS-2 in Ubuntu 10.04 LTS
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26
Rep:
Sun JVM installation for VanetMobiSim/NS-2 in Ubuntu 10.04 LTS
I have installed vanetMobiSim-1.1 on my machine,
Dell, Ubuntu 10.04 LTS , http://vanet.eurecom.fr/
I have followed all the steps of installation,
I installed Apache Ant by ,
Code:
sudo apt-get install ant
then,
Code:
ant patch
worked well, but
Code:
ant all
did not work, the output is below,
Code:
khan@khan:~/networkSim/vanetMobiSim1.1/VanetMobiSim-1.1$ ant all
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-sun-1.6.0.24/lib/tools.jar
Buildfile: build.xml
init:
compile:
[javac] Compiling 127 source files to /home/khan/networkSim/vanetMobiSim1.1/VanetMobiSim-1.1/classes
BUILD FAILED
/home/khan/networkSim/vanetMobiSim1.1/VanetMobiSim-1.1/build.xml:47: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "/usr/lib/jvm/java-6-sun-1.6.0.24/jre"
Total time: 1 second
It shows error of java compiler,
for java what I have in my machine, is
I did,
Code:
java -version
the output is as follows,
Code:
khan@khan:~/networkSim/vanetMobiSim1.1/VanetMobiSim-1.1$ java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Client VM (build 19.1-b02, mixed mode, sharing)
and out put for java compiler is as follows,
Code:
javac -version
..
Code:
khan@khan:~/networkSim/vanetMobiSim1.1/VanetMobiSim-1.1$ javac -version
The program 'javac' can be found in the following packages:
* openjdk-6-jdk
* ecj
* gcj-4.4-jdk
* gcj-4.3
Try: sudo apt-get install <selected package>
It suggests to install some packages, I tried, I took help from google, from some forums and sites, but I could not arrive to solve my problem for VanetMobiSim,
Your help would be highly appreciated. I thank you in advance !
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26
Original Poster
Rep:
Thanks for help,
I tried to get it directly from the site, but I got error that server is down,
Quote:
Not Found
The requested URL /pool/partner/s/sun-java6/sun-java6-jdk_6.26-2lucid1_i386.deb was not found on this server.
Apache/2.2.8 (Ubuntu) Server at archive.canonical.com Port 80
Anyhow I tried on Terminal, There is an error of dependencies,
Code:
khan@khan:~$ sudo apt-get install sun-java6-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-jdk has no installation candidate
and same error for sun-java6-plugin
Code:
khan@khan:~$ sudo apt-get install sun-java6-plugin
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sun-java6-plugin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package sun-java6-plugin has no installation candidate
And,
sun-java6-jre and sun-java6-bin output is below, it seems ok,
Code:
khan@khan:~$ sudo apt-get install sun-java6-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
sun-java6-jre is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Code:
khan@khan:~$ sudo apt-get install sun-java6-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
sun-java6-bin is already the newest version.
sun-java6-bin set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26
Original Poster
Rep:
YES, it is solved,
I removed all the directories from
Code:
sudo /usr/lib/jvm
and
Code:
sudo /opt/java/32
Then do update as well,
Code:
sudo apt-get update
After that I download the 32 bit version " jdk-7u3-linux-i586.tar.gz", from http://www.oracle.com/technetwork/ja...d-1501626.html
Then I put this .tar.gz file into /usr/lib/jvm/ and /opt/java/32/
I extracted it using the command,
Code:
tar zxvf jdk-7u3-linux-i586.tar.gz
in both the directoried, and the extracted directory should be renamed as "java-7-oracle"
Then I took help from http://www.webupd8.org/2011/09/how-t...-7-jdk-in.html
Here it does not explain the work for the directory /opt/java/32/ but you should do that please.
Then by using the following commands as per order,
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.