24
Master on Free Software Java Platform & Free Software José María Casanova Crespo

Java platform and free software

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Java platform and free software

Master on Free Software

Java Platform & Free Software

José María Casanova Crespo

Page 2: Java platform and free software

Master on Free Software

Introduction Agenda

● Basic ideas● OO programming and basic syntax.● History and Versions● License● Java Community

Page 3: Java platform and free software

Master on Free Software

Basic Ideas

● Java ...– is an object oriented programming language– programs are compiled once and executed

everywhere (bytecode and Virtual Machine)– syntax is derived from C++– is supposed to be platform independent– implements automatic memory management– platform is almost Free Software ;-)

Page 4: Java platform and free software

Master on Free Software

Object Oriented programming Concepts

● Classes● Objects● Methods● Message passing

● Inheritance● Encapsulation● Abstraction● Polymorphism

Page 5: Java platform and free software

Master on Free Software

Remembering SyntaxPractice

● Create a class Animal that Sleeps.

● Create a Main class for playing with animals.

● Create a Subclass Pet that has a Name and Owner that is a Person.

● Re-factor it to define Pet and Animal as abstract classes and create Dog and Elephant

● Overwrite methods and make possible not animal pets (Interfaces)

● Introduce the use of packages

Page 6: Java platform and free software

Master on Free Software

The Father: James Gosling

● 1955, Born in Calgary

● 1983, PhD at Carnegie Mellon University.

● 1984, joins SUN Microsystems.

● 1991, invents Java Programing Language

● 2006, he shaved for the first time in decades.

Page 7: Java platform and free software

Master on Free Software

The early years

● Created in June 1991● Initially called Oak ....

– ... later called Green....● ... finally renamed to JAVA

● SUN launched JAVA on May 23, 1995● More info:

– http://java.sun.com/features/1998/05/birthday.html

Page 8: Java platform and free software

Master on Free Software

Oak

● Oak goals:– Platform independent– Extremely reliable– Compact

● Target market: Interactive TV and PDAs● But in 1993 SUN changed the target

because of Internet.

Page 9: Java platform and free software

Master on Free Software

Java Versions

● JDK 1.0 (1995) – 8 packages, 212 classes.– Included in Netscape 2.0-4.0– Other companies licensed Java

● JDK 1.1 (1997)– 23 packages, 504 classes– inner classes,improved JVM, SWING– MS develops a VM for IE

Page 10: Java platform and free software

Master on Free Software

Java Versions

● JDK 1.2 (2000), known as JAVA2)– 59 packages, 1520 classes– Java Foundation Classes (SWING) included in

the core.– Collections: support for lists, sets, hashmaps.– Code and Tools distributed as the SDK

Page 11: Java platform and free software

Master on Free Software

Java Versions

● JAVA 1.3 (2000)– 76 packages, 1842 classes– Better performance (Hotspot VM)

● JAVA 1.4 (2002)– 135 packages, 2991 classes– Improved IO, XML

Page 12: Java platform and free software

Master on Free Software

Java Versions

● JAVA 1.5 (2004) renamed to JAVA5– Generics– Faster startup and improved memory usage– Improved multithreading features

● JAVA 6 – new desktop related features– simplified GUI development– integrated with NetBeans 5.5

Page 13: Java platform and free software

Master on Free Software

Multiple Platforms

– Java Enterprise Edition (JAVA EE)– Java Micro Edition (JAVA ME)– Java Standard Edition (JAVA SE)

● JRE vs JDK

Page 14: Java platform and free software

Master on Free Software

Java License Questions

● Look for the current License of JDK, go for downloading.

● Which is the current state of Java as FLOSS?

● Operating System Distributor License for Java (DLJ) ... what is it?

● Lets review History ....

Page 15: Java platform and free software

Master on Free Software

The JAVA TRAP

● Richard Stallman Apr 12, 2004● http://www.gnu.org/philosophy/java-trap.html

● Nov 15, 2006● SUN “releases Java” under GPL● http://www.sun.com/2006-1113/feature/story.jsp

– Hotspot VM, javac

Page 16: Java platform and free software

Master on Free Software

The Classpath Exception (1/2)

Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination.

Page 17: Java platform and free software

Master on Free Software

The Classpath Exception (2/2)

As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.

Page 18: Java platform and free software

Master on Free Software

Current State

● Several Open Source projects– Java SE -> OpenJDK– Java ME -> Mobile & Embedded (PhoneME)– Java EE -> Glass Fish

● http://www.sun.com/software/opensource/java/index.jsp

Page 19: Java platform and free software

Master on Free Software

JAVA Communities

● APACHE Foundation– JAVA related projects (JAKARTA)

● http://jakarta.apache.org● Ant, Tomcat, Structs, Lucene, ...● Lets review the website.

● Open Source in Java– Open source directory about Java Apps.

● http://java-source.net/

Page 20: Java platform and free software

Master on Free Software

Java Community Process

● http://www.jcp.org/en/home/index– Introduced in 1998 – an open, participative process to develop and

revise the Java™ technology specifications– define reference implementations and test

suites

Page 21: Java platform and free software

Master on Free Software

ECLIPSE

● http://www.eclipse.org● Version 3.3 called Europa (Jupiter moon)● written in Java.● lots of plug-ins for different languages.● Eclipse Java Development Tools,

incremental Java Compiler, visual editor interfaces.

● Eclipse Public License

Page 22: Java platform and free software

Master on Free Software

NETBEANS

● http://www.netbeans.org● Directly from SUN Microsystems● NetBeans 6 is the last version● Lately supporting more languages● Oct 2007, CDCL and GPLv2 License

Page 23: Java platform and free software

Master on Free Software

JDEE EMACS

● http://jdee.sourceforge.net/– JDEE menu with compile, run, debug, build, browse, project,

and help commands

– syntax coloring

– auto indentation

– compile error to source links

– source-level debugging

– source code browsing

– make file support

– automatic code generation

– Java source interpreter (Pat Neimeyer's BeanShell)

Page 24: Java platform and free software

Master on Free Software

Compiling game

● Working in pairs based in knowledge in each IDE platform.

● Choose a JAVA not web based project in Source Forge (the simpler the easier)

● Compile it and execute● Analyze the possibilities with Source Code

Repositories (SVN,CVS)● Which is the better IDE ?