Installing Java (Windows) and Writing your First Program



Similar documents
Java Software Development Kit (JDK 5.0 Update 14) Installation Step by Step Instructions

How to use the Eclipse IDE for Java Application Development

A Short Introduction to Writing Java Code. Zoltán Majó

Installing Java. Table of contents

Setting up Sudoku example on Android Studio

Appendix A Using the Java Compiler

How to Install Java onto your system

Java Crash Course Part I

Introduction to Java

Eclipse installation, configuration and operation

Supplement I.B: Installing and Configuring JDK 1.6

Installing the Android SDK

WA1826 Designing Cloud Computing Solutions. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

Java Programming Unit 1. Your first Java Program Eclipse IDE

CS170 Lab 11 Abstract Data Types & Objects

With a single download, the ADT Bundle includes everything you need to begin developing apps:

WA Continuous Integration with Jenkins- CI, Maven and Nexus. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc.

LAB 1. Familiarization of Rational Rose Environment And UML for small Java Application Development

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

Supplement I.B: Installing and Configuring JDK 1.6

1001ICT Introduction To Programming Lecture Notes

Waspmote IDE. User Guide

Java Language Tools COPYRIGHTED MATERIAL. Part 1. In this part...

Installing (1.8.7) 9/2/ Installing jgrasp

HOWTO configure Xinu under Virtual Box

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Waspmote. Quickstart Guide

USB Eight Channel Relay Board 12V

Board also Supports MicroBridge

Creating a Java application using Perfect Developer and the Java Develo...

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Introduction to Java Applications Pearson Education, Inc. All rights reserved.

Lesson 06: Basics of Software Development (W02D2

Future Technology Devices International Ltd. Mac OS X Installation Guide

Creating Your Own TinyWeb Database. Ball State University - CS116 - Ashley Swartz

Android Environment SDK

Introduction to Object-Oriented Programming

Installing and configuring Ubuntu Linux 9.04

Lab 1 Beginning C Program

Using a Laptop Computer with a USB or Serial Port Adapter to Communicate With the Eagle System

Android: How To. Thanks. Aman Nijhawan

Setting Up a Windows Virtual Machine for SANS FOR526

Addonics T E C H N O L O G I E S. NAS Adapter. Model: NASU Key Features

FaxCore 2007 Getting Started Guide (v1.0)

USB TO SERIAL CONVERTER

AXE027 PICAXE USB CABLE

COMBOGARDPRO. 39E Electronic Combination Lock SOFTWARE INSTALLATION INSTRUCTIONS

Getting Started with Android Development

Click Start > Control Panel > System icon to open System Properties dialog box. Click Advanced > Environment Variables.

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

Homework 9 Android App for Weather Forecast

Java applets. SwIG Jing He

Web Services using Tomcat and Eclipse

SOFTWARE INSTALLATION INSTRUCTIONS

FileMaker 8. Installing FileMaker 8 ODBC and JDBC Client Drivers

Apache Hadoop 2.0 Installation and Single Node Cluster Configuration on Ubuntu A guide to install and setup Single-Node Apache Hadoop 2.

Setting up an online Java Jmonitor. server using the. EXPERIMENTAL code from. John Melton GØORX/N6LYT

User Manual (DA-70155)

Technical Note. TN_134 FTDI Android D2XX Driver

To perform Ethernet setup and communication verification, first perform RS232 setup and communication verification:

Canto Integration Platform (CIP)

[Setup procedure for Windows 95/98/Me]

Android Environment SDK

SAPIP GUI INSTALLATION. Table of Contents

Code Estimation Tools Directions for a Services Engagement

Guide to Installing BBL Crystal MIND on Windows 7

TellStick User Manual

Procedure to Create and Duplicate Master LiveUSB Stick

Alteryx Predictive Analytics for Oracle R

1 Introduction FrontBase is a high performance, scalable, SQL 92 compliant relational database server created in the for universal deployment.

Application Note: AN00141 xcore-xa - Application Development

USER MANUAL for USB to serial converter (PL2303)

1. How to install CDM driver on PC for Lambda devices

1) SETUP ANDROID STUDIO

Java with Eclipse: Setup & Getting Started

Introducing the Adafruit Bluefruit LE Sniffer

How to Install Applications (APK Files) on Your Android Phone

USB Stick Driver Installation Instructions

Consolidated Monitoring, Analysis and Automated Remediation For Hybrid IT Infrastructures. Goliath Performance Monitor Installation Guide v11.

Future Technology Devices International Ltd. Mac OS-X Installation Guide

Short Manual Intellect v SP2 module Unipos Contents:

Cosmic Board for phycore AM335x System on Module and Carrier Board. Application Development User Manual

Hypercosm. Studio.

Instructions for Installing and Using the FOCUS DL-15 Data Transfer Software

Opening a Command Shell

Virtual COM Port Driver Installation Manual

USB HSPA Modem. User Manual

Right now, the latest and greatest version of Java available for download is Start with this link to find out more about it

How to read Temperature and Humidity from Am2302 sensor using Thingworx Edge java SKD for Raspberry Pi

Centurion PLUS CPC4 Download Guide

USB > RS485 > 8 Channel Relay Controller

Introduction to Android Programming (CS5248 Fall 2015)

Using SQL Developer. Copyright 2008, Oracle. All rights reserved.

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

OpenCV on Android Platforms

Code::Blocks Student Manual

Getting Started using the SQuirreL SQL Client

DAKTON µ BOX MANUAL µbox User Manual 1

JDBC. It is connected by the Native Module of dependent form of h/w like.dll or.so. ex) OCI driver for local connection to Oracle

Transcription:

Appendix Installing Java (Windows) and Writing your First Program We will be running Java from the command line and writing Java code in Notepad++ (or similar). The first step is to ensure you have installed the Java SDK. It can be downloaded from the class webpage. Once downloaded, install. in order to run Java from anywhere in your system, the files need to be added to your PATH variable in windows. To do this, go to Control Panel -> System -> the Advanced system settings option on the left. Now under click environment variables and then click edit on the PATH variable. Once the PATH edit window appears, add a semicolon then the path to wherever the JAVA SDK binaries (bin) was installed. In this example, the JDK was installed to: C:\Program Files\Java\jdk1.6.0_24\bin If you do not think your PATH variable is correct you can type PATH into a command window to display your path. Now that you have installed Java, make a directory for your first Java program and open Notepad++. Make a new file called HelloWorld.java and save it into the directory you made. 13 P a g e

Enter the following code. Java is case sensitive, so be careful to capitalize EXACTLY the same as what is below. public class HelloWorld{ public static void main ( String[] args ) { System.out.println("Hello World!\n"); To run the program, you first need to compile the Java into byte code and then run it with the Java virtual machine. Open a command line and change to the directory where your class (program) is saved. Type the following two commands: javac HelloWorld.java java HelloWorld Installing Java (Linux) and Writing your First Program We will be running Java from the command line and writing Java code in Gedit (or similar). The first step is to ensure you have installed the Java SDK. It can be installed with the following commands: sudo apt-get install sun-java6-plugin sudo apt-get install sun-java6-jdk 14 P a g e

Now that you have installed Java, make a directory for your first Java program and open Gedit. Make a new file called HelloWorld.java and save it into the directory you made. Enter the following code. Java is case sensitive, so be careful to capitalize EXACTLY the same as what is below. public class HelloWorld{ public static void main ( String[] args ) { System.out.println("Hello World!\n"); To run the program, you first need to compile the Java into byte code and then run it with the Java virtual machine. Open a command line and change to the directory where your class (program) is saved. Type the following two commands: 15 P a g e

Installing Java (Mac) and Writing your First Program Java is installed by default on Mac OS, make a directory for your first Java program and open your editing program. Make a new file called HelloWorld.java and save it into the directory you made. Enter the following code. Java is case sensitive, so be careful to capitalize EXACTLY the same as what is below. public class HelloWorld{ public static void main ( String[] args ) { System.out.println("Hello World!\n"); To run the program, you first need to compile the Java into byte code and then run it with the Java virtual machine. Open a terminal and change to the directory where your class (program) is saved. Type the following two commands: javac HelloWorld.java java HelloWorld 16 P a g e

FTDI/Serial Installation Installing the FTDI drivers and a Terminal Program in Windows 1. Most versions of windows already have the FTDI driver as part of the operating system. Simply connect your Wunderboard to the Serial Connection usb port on the Wunderboard and to your computer. 2. If your computer asks for a driver, cancel it and download and install the Virtual Com Port (VCP) drivers from the website below: http://www.ftdichip.com/drivers/vcp.htm 3. Once installed, download and install a Terminal program. We recommend Termite. It can be found at: http://www.compuphase.com/software_termite.ht m 4. Once everything is installed, connect your Wunderboard as described in step 1. Give your computer time to setup drivers and then open the Termite program. Everything is functional if under Port in the Settings menu, you can select a COM port. 17 P a g e

Installing the FTDI drivers and a Terminal Program in Linux 1. Most versions of Linux already have the FTDI driver as part of the operating system. Simply connect your Wunderboard to the Serial Connection usb port on the Wunderboard and to your computer. 2. If your computer asks for a driver, cancel it and download and install the Virtual Com Port (VCP) drivers from the website below: http://www.ftdichip.com/drivers/vcp.htm This is not an ideal option as you will need to compile the files yourself. 3. Once installed, download and install a Terminal program. We recommend CuteCom. Open a terminal and type: 18 P a g e

4. Once everything is installed, connect your Wunderboard as described in step 1. Give your computer time to setup drivers and then open the Cutecom program by typing cutecom into a terminal. Everything is functional if under Device you can select a /ttyusb port. Installing the FTDI drivers and a Terminal Program on Mac 1. Connect your Wunderboard to the Serial Connection usb port on the Wunderboard and to your computer. 2. To install the driver, download and install the Virtual Com Port (VCP) drivers from the website below: http://www.ftdichip.com/drivers/vcp.htm 19 P a g e

3. Once installed, Open a terminal and type: ls /dev/tty.* This will display all possible tty devices. The Wunderboard will be called something like tty.usbserial To connect to the Wunderboard, now type: screen /dev/tty.usbserial-a800fpka 9600 Your device maybe a different name, change as needed. 4. To use screen, refer to the information found here: http://www.cheat-sheets.org/savedcopy/screen.cheat.sheet.txt Doxygen There are many different philosophies on how much documentation is enough and how it should be done. Many companies have a standard method that all of their employees must follow. In this manual, one method will be shown and expected. While other ways might seem sufficient, you must adhere to the philosophy in this manual. The commenting style used is Doxygen. When documenting code, essentially every line of code that is not a simple assignment should have an inline comment. These tags tell Doxygen that there is information inside of them to be processed. In addition to in line comments, well documented code includes comments for: variables, functions, includes, defines, and flow control. Variables When documenting a variable use a Doxygen comment following the variable definition. The style for a following comment is: /**< comment text */ Unless all variables are of an identical type and are used in essentially the same way, they should be declared on separate lines with a comment for each. Functions Functions have the most complicated definition. Functions should only be defined once. The definition should precede the function. Every function should have a brief description, all parameters defined, and the return 20 P a g e

value defined. For example, Documentation for the function main might look like: /** @brief Main Function @param void This function does not accept any input variables @return This function would return an error code to the OS if needed. */ int main (void) {... code... Includes When documenting an include use a Doxygen comment following the include statement. The style for a following comment is: /**< why is this file included? */ Defines and Variables When documenting a define use a Doxygen comment following the #define or variable definition. All variable and #defines should be commented if the name is not self-evident or there is another special reason for the definition. The style for a following comment is: /**< why is this define needed? */ Logic Control All statements that control flow of code must be commented. This includes; if(), while(), switch(), and for() statements. These comments should explain why the logic test exists, not just re-iterate what is already written. Ensure that every option has a following comment of the format: /**< comment */ 21 P a g e