Installing JDK and JRE: ----------------------- Notes: I am using Virtual Box with Ubuntu 12.04.5 64bit. 1. At the terminal command prompt, type: file /sbin/init Note the bit version of your Ubuntu Linux operating system architecture it will display whether it is 32-bit or 64-bit. ----------------------------------------------------------------------------------------------------------------- /sbin/init: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x2b5d2db96270e85fa5e68475e37a5e94c479a396, stripped ----------------------------------------------------------------------------------------------------------------- 2. Check if you have Java installed on your system. java -version If you have OpenJDK installed on your system it may look like this: java version "1.7.0_15" OpenJDK Runtime Environment (IcedTea6 1.10pre) (7b15~pre1-0lucid1) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode) If you have OpenJDK installed on your system, you have the wrong vendor version of Java installed for this exercise. 3. Completely remove the OpenJDK/JRE from your system and create a directory to hold your Oracle Java JDK/JRE binaries. This will prevent system conflicts and confusion between different vendor versions of Java. At the terminal command prompt,type: sudo apt-get purge openjdk-\* This command will completely remove OpenJDK/JRE from your system 4. Type: sudo mkdir -p /usr/local/java This command will create a directory to hold your Oracle Java JDK and JRE binaries. 5. Download the Oracle Java JDK and JRE for Linux - http://www.oracle.com/technetwork/java/javase/downloads/index.html Make sure you select the correct compressed binaries for your system architecture 32-bit or 64-bit (which end in tar.gz). 6. Copy the Oracle Java binaries into the /usr/local/java directory. Assuming you have download the file to - /home/"your_user_name/Downloads/ Type: cd /home/"your_user_name"/Downloads Type: sudo cp -r jdk1.8.0_92-linux-x64.tar.gz /usr/local/java/ Type: sudo cp -r jre1.8.0_92-linux-x64.tar.gz /usr/local/java/ Type: cd /usr/local/java Type: sudo tar xvzf jdk1.8.0_92-linux-x64.tar.gz Type: sudo tar xvzf jre1.8.0_92-linux-x64.tar.gz 7. Double-check your directories. At this point, you should have two uncompressed binary directories in /usr/local/java for the Java JDK/JRE listed as: Type: ls -a jdk1.8.0_92 jre1.8.0_92 8. Edit the system PATH file /etc/profile and add the following system variables to your system path. sudo gedit /etc/profile 9. Scroll down to the end of the file using your arrow keys and add the following lines below to the end of your /etc/profile file: Type/Copy/Paste: JAVA_HOME=/usr/local/java/jdk1.8.0_92 JRE_HOME=$JAVA_HOME/jre PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin export JAVA_HOME export JRE_HOME export PATH JRE_HOME=/usr/local/java/jre1.8.0_92 PATH=$PATH:$JRE_HOME/bin export JRE_HOME export PATH 10. Save the /etc/profile file and exit. 11. Inform your Ubuntu Linux system where your Oracle Java JDK/JRE is located. This will tell the system that the new Oracle Java version is available for use. Type/Copy/Paste: sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.8.0_92/jre/bin/java" 1 sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.8.0_92/bin/java" 1 *This command notifies the system that Oracle Java JRE is available for use Type/Copy/Paste: sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.8.0_92/bin/javac" 1 *This command notifies the system that Oracle Java JDK is available for use Type/Copy/Paste: sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.8.0_92/bin/javaws" 1 *This command notifies the system that Oracle Java Web start is available for use 12. Inform your Ubuntu Linux system that Oracle Java JDK/JRE must be the default Java. Type/Copy/Paste: sudo update-alternatives --set java /usr/local/java/jdk1.8.0_95/jre/bin/java sudo update-alternatives --set java /usr/local/java/jre1.8.0_95/bin/java *This command will set the java runtime environment for the system Type/Copy/Paste: sudo update-alternatives --set javac /usr/local/java/jdk1.8.0_92/bin/javac *This command will set the javac compiler for the system Type/Copy/Paste: sudo update-alternatives --set javaws /usr/local/java/jdk1.8.0_92/bin/javaws sudo update-alternatives --set javaws /usr/local/java/jre1.8.0_92/bin/javaws *This command will set Java Web start for the system 13. Reload your system wide PATH /etc/profile by typing the following command: Type/Copy/Paste: source /etc/profile 14. Type/Copy/Paste: java -version This command displays the version of java running on your system -------------------------------------------------------------------------------- java version "1.8.0_92" Java(TM) SE Runtime Environment (build 1.8.0_92-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode) -------------------------------------------------------------------------------- 15. javac -version This command lets you know that you are now able to compile Java programs from the terminal. ------------------------------------------------------------------------------- javac 1.8.0_92 ------------------------------------------------------------------------------- 16. Now reboot your Ubuntu Linux system. ############################################################################################################ Install C/C++ mLinux Toolchains: -------------------------------- http://www.multitech.net/developer/software/mlinux/mlinux-software-development/mlinux-c-toolchain/ ############################################################################################################ Installing the Eclipse Mars: ---------------------------- 1. Go to this link and download Eclipse IDE for C/C++ Developers : http://www.eclipse.org/downloads/ - Choose 64bit. 2. Double click on eclipse-inst 3. Click on 'Eclipse IDE for C/C++ Developer' 4. Click on 'Install' button. 5. Click on 'Accept license'. 6. Click on 'Launch'. 7. Accepting the default path for 'work space'. 8. File New -> C++ Projects -> Project Name -> helloConduit 9. Project Type -> Hello World C++ project 10. Tools chain -> Cross GCC -> Click Next. 11. Enter your Author-> Next. 12 Next. 13. Cross GCC command -> Cross compiler prefix -> arm-mlinux-linux-gnueabi- 14. Cross compiler path -> /opt/mlinux/3.1.0/sysroots/x86_64-mlinux-linux/usr/bin/arm-mlinux-linux-gnueabi 15. Click Finish. 16. Click on 'Hammer' icon to build it. In console, you should have this: --------------------------------------------------------------------------------------------------- Invoking: Cross G++ Compiler arm-mlinux-linux-gnueabi-g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/helloConduit.d" -MT"src/helloConduit.o" -o "src/helloConduit.o" "../src/helloConduit.cpp" Finished building: ../src/helloConduit.cpp Building target: helloConduit Invoking: Cross G++ Linker arm-mlinux-linux-gnueabi-g++ -o "helloConduit" ./src/helloConduit.o Finished building target: helloConduit 19:40:44 Build Finished (took 6s.284ms) --------------------------------------------------------------------------------------------------