Intro to Java Technology
-
Upload
jussi-pohjolainen -
Category
Technology
-
view
2.221 -
download
0
description
Transcript of Intro to Java Technology
Java Technology
Jussi PohjolainenTampere University of Applied Sciences
INTRODUCTION TO JAVA TECHNOLOGY
Introduction to Java
• Java is a programming language developed by James Gosling at Sun Microsystems
• Released in 1995• Syntax derived from C and C++
History
• Java 1.0 in 1995• Initial Success:– Write Once Run Anywhere (WORA)– Web Browsers incorporated the ability to run small
Java – programs called Applets• Java 2 was introduced in 1998, divided into three
categories:– Java2 Enterprise Edition (J2EE)– Java2 Standard Edition (J2SE)– Java2 Micro Edition (J2ME)
Today
• In 2006 Sun renamed Java 2 versions– Java EE– Java SE– Java ME
• Java versioning: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 and 1.6 (which is the current)
• Most popular programming language!– http://www.tiobe.com/index.php/content/
paperinfo/tpci/index.html
Java on Desktop: SwingSet demo
Java on Mobile: Opera Mini
Java on Server: Etuovi.com
Java's Future?• Very few Java desktop apps– Sluggish performance?– Why use Java when you have Qt?
• Popular on the enterprise and mobile side– Mobile programming is under heavy turbulence at the
moment: • Nokia's Qt (C++)• Apple's iPhone (Objective-C)• Google's Android (Java)
• Sun Microsystem's financial trouble, Oracle bought Sun in April 2009!
Compiling Java Apps
http://java.sun.com/docs/books/tutorial/getStarted/intro/definition.html
Compiling Qt Apps
http://www.symbianresources.com/tutorials/qt/01-QtIntroduction.pdf
JAVA TOOLS
Java Tools
• Three platforms: Java SE, Java ME, Java EE• Java SE is used for desktop apps:– Java SE Runtime Environment (JRE)• For running Java apps
– Java SE Development Kit (JDK)• For developing and running Java Apps• Includes JRE!
NetBeans Bundle
• The JDK comes with only the necessary tools to compile and run apps
• The JDK with NetBeans bundle is a IDE (Integrated Development Environment) that has all the tools to create Java SE apps
NetBeans on Mac OS X
Using Text Editor and JDK
• NetBeans is very powerful tool for creating Java Apps
• If you are about to start learning programming, I do not recommend NetBeans, use plain text editor and JDK instead!– NetBeans does a lot work in the background – NetBeans can be sluggish on older computers– NetBeans can be confusing for junior
programmers
Basic JDK Commands (Command Prompt)
• javac – Java Compiler– javac MyProgram.java
• java – Running Java Apps– java MyProgram
• That's it!
NotePad++
• Free text editor indented for programming (Windows)
• Change settings / preferences– New Document: Format: Unix / Windows • Depending on your configuration
– New Document: Encoding: ISO-8859-1– New Document: Default Language: Java– Document: Tab Size 4, [x] Replace by Space
Exercise
• Download and configure Notepad++• Download Java SE 6• Read ...– http://java.sun.com/docs/books/tutorial/
getStarted/cupojava/win32.html
• ... and Compile and run "HelloWorld"-application