Install Eclipse Ns3 in Ubuntu 14.04

Source: Internet
Author: User

1. NS3 Install

Refer to NS3 tutorial.

2.eclipse

2.1 Downloads

: http://www.eclipse.org/downloads/

Eclipse IDE for C + + developers

Note:you can know whether your Ubuntu is 32-bit or 64-bit by executing the command "Uname-m".

If i686 is displayed, you have installed a 32-bit operating system

If x86_64 is displayed, you have installed a 64-bit operating system

2.2 JRE JDK Installation

2 ways, the first type of personal use, can be used on the line Bai, not the focus:

The first type:

Installing default JRE/JDK

This is the recommended and easiest option. This would install OpenJDK 6 on Ubuntu 12.04 and earlier and on 12.10+ it'll install OpenJDK 7.

Installing Java with are easy apt-get . First, update the package index:

sudo apt-get update

Then, check if Java was not already installed:

java -version

If it returns "The program Java can is found in the following packages", Java hasn ' t been installed yet, so execute the FO llowing command:

sudo apt-get install default-jre

This would install the Java Runtime Environment (JRE). If you instead need the Java development Kit (JDK), which are usually needed to compile Java applications (for Exampleapach E Ant, Apache Maven, Eclipse and IntelliJ idea execute the following command:

sudo apt-get install default-jdk

That's everything that's needed to install Java.

The second type:

Step 1:install Java 8 (JDK 8)

Add The Webupd8team Java PPA Repository in our system and install Oracle JAVA8 using following set of commands.

$ sudo add-apt-repository ppa:webupd8team/java$ sudo apt-get update$ sudo apt-get install Oracle-java8-installer
Step 2:verify JAVA Version

After successfully installing Oracle Java using above step verify installed version using following command.

$ Java-versionjava Version "1.8.0_25" Java (tm) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot (tm) 64-bit Server V M (build 25.25-b02, Mixed mode)
Step 3:setup JAVA Environment

Webupd8team is providing a package to set environment variables, Install the This package using following command.

$ sudo apt-get install Oracle-java8-set-default

References:
Https://launchpad.net/~webupd8team/+archive/java

2.3 Eclipse Installation

Unzip Eclipse

Use Ctrl+alt+t to open the terminal and extract Eclipse to the/opt/directory for global use using the following command:

cd/opt/&& sudo tar-zxvf ~/download/eclipse-*.tar.gz

Once the decompression is complete, you can see Eclipse in the/opt/directory.

2.4. Create an Eclipse shortcut

1. Execute the following command in the terminal

Gksudo Gedit/usr/share/applications/eclipse.desktop

2. Paste and save the following content

[Desktop Entry]
Name=eclipse 4
Type=application
Exec=/opt/eclipse/eclipse
Terminal=false
icon=/opt/eclipse/icon.xpm
comment=integrated Development environment
Nodisplay=false
Categories=development;ide;
Name[en]=eclipse

So far, we've installed the latest version of Eclipse Kepler in Ubuntu 14.04 and can use it.

3. Configure Eclipse NS3

Refer to 2 articles:

Http://blog.sina.com.cn/s/blog_5d2054d901019vcj.html

Https://www.nsnam.org/wiki/HOWTO_configure_Eclipse_with_ns-3

The official documentation takes note of the pictures, in addition to the names of their ns3 works.

Steps:

3.1 Configure Waf Builder 3.2 Configure Debugger 3.3 Configure to Run from Eclipse
  1. Add an external builder (run->external tools->external Tools Configuration) and add a new program. Then you can configure it:
    • Location = your WAF location (i.e./home/x/workspace/ns-3-dev/waf)
    • Working directory = your NS3 directory (i.e./home/x/workspace/ns-3-dev/)
    • Arguments =--run "${string_prompt}"
    Then you can run your program (with arguments) with the new created external builder.

4. Concluding remarks

Finally, if you run the program with parameters in the command line, you need to include the program name and parameters in double quotation marks, such as:
./waf--run "RPS 4" (Description: RPS is the program name, "4" is a parameter)

Directly enter the program name and those parameter settings

such as: myfirst–xx=xx

Do not add quotation marks

Install Eclipse Ns3 in Ubuntu 14.04

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.