LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (http://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Sun JVM installation for VanetMobiSim/NS-2 in Ubuntu 10.04 LTS (http://www.linuxquestions.org/questions/ubuntu-63/sun-jvm-installation-for-vanetmobisim-ns-2-in-ubuntu-10-04-lts-938728/)

xptional 04-08-2012 07:29 AM

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 !

knudfl 04-08-2012 10:35 AM

Quote:

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
No javac in the run time package sun-java6-jre.

The sun 'javac' is in package 'sun-java6-jdk' :
http://www.botskool.com/forum/comput...u-1004-jdk-jre

.

xptional 04-08-2012 01:17 PM

First I thank you for your help !
I already did the same thing for adding repository, but the result is as below, "Malformed"
Code:

khan@khan:~$ sudo add-apt-repository "deb http://archive.canonical.com/lucid partner"
[sudo] password for khan:
khan@khan:~$ sudo apt-get update
E: Malformed line 43 in source list /etc/apt/sources.list (dist parse)

I think,its because of, in the sources.list, the below already exist,
Code:

deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

,


I am going to delete,
Code:

deb http://archive.canonical.com/lucid partner
in the sources.list,

Your cooperation in resolving this problem will be appreciated,
Thnkx

knudfl 04-08-2012 02:43 PM

The package is present in the repo.
( You can just follow the link http://archive.canonical.com/ )

So I guess you can do : sudo apt-get install sun-java6-jdk


If the repo is present in the sources.list : No need to add it.

.

xptional 04-08-2012 04:15 PM

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.

Now, I don't know how to advance to resolve it ?

xptional 04-11-2012 06:30 AM

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,
Code:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install update-java
sudo update-java

Here it will prompt to select the java version, please choice "/usr/lib/jvm/java-7-oracle"

Hope you will get success.
For confirmation, do
Code:

java -version

javac -version

Its all:)


All times are GMT -5. The time now is 11:52 AM.