Md. Istiaque Shahriar isti531@gmail.com COMP346 Lab1 - How to start? Md. Istiaque Shahriar isti531@gmail.com.

Slides:



Advertisements
Similar presentations
Lab III – Linux at UMBC.
Advertisements

Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
Object Oriented Programming in Java George Mason University Fall 2011
CSCI 1411 FUNDAMENTALS OF COMPUTING LAB Lab Introduction 1 Shane Transue MSCS.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
Course Introduction and Getting Started with C 1 USF - COP C for Engineers Summer 2008.
UPLOADING YOUR SERVER CODE TO YOUR VIRTUAL MACHINE.
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
CS0007: Introduction to Computer Programming Setting Up Java.
PART A Emac Lisp   Emac Lisp is a programming language  Emacs Lisp is a dialect.
Editing Java programs with the BlueJ IDE. Working environments to develop (= write) programs There are 2 ways to develop (write) computer programs: 1.Using.
A crash course in njit’s Afs
The Unix Environment and Compiling. Getting Set Up Your programs will be compiled and tested on the Departmental server ‘linprog’ The linprog servers.
Agenda What is Computer Programming? The Programming Process
BIF713 Operating Systems & Project Management Instructor: Murray Saul
LINUX System : Lecture 3 Vmware, Cygwin, LINUX installation Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang University.
CSCI 273: Processing An Introduction. Programming Languages –An abstract "human understandable" language for telling the computer what to do –The abstract.
(C) 2010 Pearson Education, Inc. All rights reserved.  Java programs normally go through five phases  edit  compile  load  verify  execute.
Unix Basics Chapter 4.
Drexel University Software Engineering Research Group 1 Eclipse for SE101.
UCSC All rights reserved. No part of this material may be reproduced and sold. 1 IT1202-Fundamentals Of Programming (Using JAVA) Interacting with.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
September 16, 2002Serguei A. Mokhov, 1 Setting Up Environment for Your UNIX Account in TAV COMP Operating Systems Tutorial.
POS 406 Java Technology And Beginning Java Code
COP 3330 Notes 1/12. Today's topics Downloading Java and Eclipse Hello World Basic control structures Basic I/O Strings.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
Object Oriented Programming Lecture 3. Introduction  In discussing Java, some items need to be clarified  The Java programming language  The Java virtual.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
1 Remote Access Telnet Telnet FTP FTP. 2 Applications and Communications Telnet Telnet  Program for accessing systems remotely.  Available on Windows.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Eclipse Project. Installing Visit to download a copy for your home computerhttp:// –Get Release version 3.0 (or.
1 Getting Started with C++ Part 2 Linux. 2 Getting Started on Linux Now we will look at Linux. See how to copy files between Windows and Linux Compile.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
 CSC 215 : Procedural Programming with C C Compilers.
CS 201 Lecture 1 (b) Using an IDE Tarik Booker CS 201: Introduction to Programming California State University, Los Angeles.
1 Remote Installation Service Windows 2003 Server Prof. Abdul Hameed.
Linux Workshop Session 2 By Amol and Prem. Overview of Presentation Brief Review Useful tools Remote Access Troubleshooting.
Review Why do we use protection levels? Why do we use constructors?
ENEE150 Discussion 01 Section 0101 Adam Wang.
Unix Environment Basics CSCI-1302
Lecture 1b- Introduction
Development Environment
CS1010: Intro Workshop.
ZIMBRA DESKTOP USER MANUAL
SUSE Linux Enterprise Desktop Administration
Linux/Unix - Download Ubuntu Linux :
A Short DOS Presentation
Text by: Lambert and Osborne
The Linux Operating System
Introduction to Programming the WWW I
Java programming lecture one
Intro to UNIX System and Homework 1
INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT
slides borrowed and adapted from Alex Mariakis and CSE 390a
How to Run a Java Program
Introduction to Algorithm Design
Web Programming Essentials:
CGS 3175: Internet Applications Fall 2009
Class Projects and Environment
Yung-Hsiang Lu Purdue University
Video Notes.
Running a Java Program using Blue Jay.
CSCE 206 Lab Structured Programming in C
Review of Previous Lesson
Lecture 6 Introduction to Process Management
DIBBs Brown Dog Tutorial Setup
Presentation transcript:

Md. Istiaque Shahriar isti531@gmail.com COMP346 Lab1 - How to start? Md. Istiaque Shahriar isti531@gmail.com

We will start with The following topics Basic Information Subscription to mailing list? Down load assignments Link to Electronic submission? Why do we need Java 1.2.1? How to connect to the alpha server? Work from your home pc How to modify your .cshrc file? How to move and compile YourFile.java on the alpha server? Md. Istiaque Shahriar isti531@gmail.com

Some Basic Information To subscribe https://mail.encs.concordia.ca:444/mailman/listinfo/coen346-w07 To see previous postings [downloading assignments] https://mail.encs.concordia.ca:444/mailman/private/coen346-w07/ To post a message to all the list members, send email to coen346-w07@encs.concordia.ca. Assignments are to be submitted electronically at https://eas.encs.concordia.ca/eas/authentication.jsp Md. Istiaque Shahriar isti531@gmail.com

Md. Istiaque Shahriar isti531@gmail.com Why do we need Java 1.2.1? For the purpose of learning various concurrency problems for the time being we’re stuck with the above mentioned JDK version on Linux. JVM of that version was installed in such a way so it uses so-called “green” threads, and manages them itself using the Round Robin scheduling policy (there are many policies out there, you’ll get to know what most of them are later on in the course), so the behaviour of the threads can be considered deterministic. NOTE: Java 1.2.2 is for Linux. For UNIX (ex. Solaris), Windows NT/2K/XP and Cygwin use 1.2.1. SunOS 4.x implemented "light-weight processes" or LWPs as fibers known as "green threads". Md. Istiaque Shahriar isti531@gmail.com

How to connect to the alpha server? You must have an alpha account ie. You encs account If you wish to use the alpha server from home (or anywhere outside Concordia) you should use the full name of the server - alpha.cs.concordia.ca in you ssh client. otherwise the short name alpha is enough from the Lab. Md. Istiaque Shahriar isti531@gmail.com

Md. Istiaque Shahriar isti531@gmail.com From Windows From Windows: You need a ssh tool such as one of listed below: Tera Term - should have a shortcut on your desktop under the icon “telnet”; PuTTY - a free tool that could be easily found on the net. Use the tool with the option “ssh” and the host “alpha” (or alpha.cs.concordia.ca). You may download it from here http://www.cse.concordia.ca/~hstang/teaching/cs346/useSSH.html And see the setup from here http://www.encs.concordia.ca/helpdesk/howto/ssh_tunnel.html SSH Client- This is like the one which you use from the Lab A free version is available at: http://www.encs.concordia.ca/helpdesk/howto/sftp.html Or directly http://ftp.ssh.com/pub/ssh/ and down load  SSHSecureShellClient-3.2.9.exe Md. Istiaque Shahriar isti531@gmail.com

Working In Windows (If you prefer??) Write your java program using any of the convenient editors (even the text editor is a good option) Create a folder (Comp346 is preferred) in the Network U: (Unix) drive Put (save) your .java file in that folder Now Connect to the alpha server (as described) using SSH Secure Shell Client (You’ll find one on the Desktop) Now Compile and Run your program javac FileName.java Java FileName Md. Istiaque Shahriar isti531@gmail.com

Md. Istiaque Shahriar isti531@gmail.com From Linux From Linux: Use Linux OpenSSH, which is already installed on your system. To confirm this open a terminal window and type type: ssh –v To connect to “alpha” or “sunset” server type: ssh -X alpha or ssh -X sunset or ssh -X alpha.cs.concordia.ca. Md. Istiaque Shahriar isti531@gmail.com

First modify your .cshrc file List all the files in your home directory to see if there is a file under the name of .cshrc . Type : ls –a If there is no such a file then: 1. Download the file from here: http://www.cs.concordia.ca/~m_shahri/.cshrc Feel free to modify this file and if you have any problems you can always download the file again. 2. Save the file in your home directory. 3. After downloading the file open a terminal and go to your home directory. 4. Typing source .cshrc will execute the script for you. 5. Use a text editor of your choice to view the file and make changes (for example gedit, xemacs, emacs, vim, pico etc.). Md. Istiaque Shahriar isti531@gmail.com

First modify your .cshrc file If there is such a file then: 1] Open the file for editing. Use a text editor of your choice to view the file and make changes (for example gedit, xemacs, emacs, vim, pico etc.). 2] Add to the beginning of set path clause the path /pkg/java-1.2.1/bin . 3] The new set path clause should look like this: set path=( /pkg/java-1.2.1/bin /usr/ucb /usr/bin /usr/sbin /bin ...) 4] To limit the virtual memory add in a new row limit vm 300m . Now, your .cshrc file should hold the following info: set path=( /pkg/java-1.2.1/bin /usr/ucb /usr/bin /usr/sbin /bin ...) limit vm 300M 5] Save the changes and close the text editor. Md. Istiaque Shahriar isti531@gmail.com

Md. Istiaque Shahriar isti531@gmail.com The .cshrc File #cshrc January 24, 2004 # Originally written by Emil vassev # This is where your personal configuration information is held # Feel free to edit this file and change things around as much as you wish # Lines preceeded by a # are comments, a \ is used to continue commands across multiple lines set path=( /pkg/java-1.2.1/bin /site/bin /usr/bin /usr/sbin \ /bin /usr/hosts /usr/X11R6/bin /sbin /usr/lib \ ~ ~/bin ~/bin/dev ) # noclobber prevents accidently destroying existing files by redirecting input over an # already-existing file. set noclobber limit vm 300M clear # EOF Md. Istiaque Shahriar isti531@gmail.com

How to move and compile YourFile.java on the alpha server? 1] Writing your program: Use any text editor to type your java file (the one you wish to compile and run on the alpha server). 2] File Transfer: a. Use a file-transfer tool (SSH Secure File Transfer Client) to move the file to the alpha server if the file is not there. OR b. If you work under Windows on a lab PC you could simply use your “U” drive, which is your Linux drive space. There you can edit and run your java applications without having the need to move files around. (we may prefer) 3] directory comp346: If there is no directory comp346 under your home directory type: mkdir comp346 4] To Compile: javac FileName.java 5] To Execute: java FileName (no extension needed) Md. Istiaque Shahriar isti531@gmail.com

Writing your first program("Hello World“) A Checklist  Work under Solaris platform connect to either “alpha” server or “Sunset” server Correct Version To write your first program, you need correct version of java: The JDK-1.2.1-A A text editor. In this example, we'll use NotePad, a simple editor included with the Windows platforms. You can easily adapt these instructions if you use a different text editor. Make sure that the file name and the class matches exactly. Md. Istiaque Shahriar isti531@gmail.com

Md. Istiaque Shahriar isti531@gmail.com The First Program /**   * The HelloWorldApp class implements an application that   * simply displays "Hello World!" to the standard output.   */ class HelloWorldApp {      public static void main(String[] args) {          //Display "Hello World!"          System.out.println("Hello World!");      } } Save filename as “HelloWorldApp.java” Md. Istiaque Shahriar isti531@gmail.com

Md. Istiaque Shahriar isti531@gmail.com When you're finished, the dialog box should look like this. Md. Istiaque Shahriar isti531@gmail.com

Md. Istiaque Shahriar isti531@gmail.com References www.chiark.greenend.org.uk/~sgtatham/putty/download.html man ssh www.cygwin.com http://www.cs.concordia.ca/~i_vassev/comp346_2006.html 5. http://www.encs.concordia.ca/helpdesk/howto/sftp.html Have a great Weekend Md. Istiaque Shahriar isti531@gmail.com