LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices



Reply
 
Search this Thread
Old 04-08-2012, 07:29 AM   #1
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Rep: Reputation: 11
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 !
 
Old 04-08-2012, 10:35 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
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

.
 
1 members found this post helpful.
Old 04-08-2012, 01:17 PM   #3
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
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
 
Old 04-08-2012, 02:43 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,286

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
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.

.
 
Old 04-08-2012, 04:15 PM   #5
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
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 ?
 
Old 04-11-2012, 06:30 AM   #6
xptional
LQ Newbie
 
Registered: Mar 2011
Location: France
Distribution: Ubuntu 14.04 LTS, Dell Latitude E5400
Posts: 26

Original Poster
Rep: Reputation: 11
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
 
1 members found this post helpful.
  


Reply

Tags
java, ns-allinone, ns2, sun java6 jdk, sun-java6-jre, vanet


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
switching from gnu jvm to sun jvm without uninstalling gnu jvm vishal.gokhale Linux - Newbie 1 06-10-2009 10:14 AM
Need to install 1.3.1 Sun JVM on RH Enterprise v 4.5 OOsorio Linux - Newbie 2 01-31-2008 12:44 PM
sun JVM installation on fedora and tomcat kumar.craja Linux - Server 2 05-27-2007 01:45 PM
LXer: Announcing Ubuntu 6.06 LTS server for SUN Sparc64 LXer Syndicated Linux News 0 06-17-2006 01:21 AM
Sun JVM and Konqueror webterractive Linux - Distributions 4 04-11-2004 03:28 AM


All times are GMT -5. The time now is 02:33 PM.

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