Java vs. J++ (or why J++ failed) Elisa Chong CS 151.

Slides:



Advertisements
Similar presentations
A Programmer's Introduction to Java - from a S/370 user (c) IDMS/SQL News
Advertisements

Programmer-defined classes Part 2. Topics Returning objects from methods The this keyword Overloading methods Class methods Packaging classes Javadoc.
1 CSC 551: Web Programming Spring 2004 client-side programming with JavaScript  scripts vs. programs  JavaScript vs. JScript vs. VBScript  common tasks.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
The Web Warrior Guide to Web Design Technologies
MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.
Object Orientated Programming
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Introduction to Java Programming, 4E
1 Chapter 3 Programs and Packages. 2 Java Virtual Machine (JVM) Java programs execute on the JVM. The JVM is a virtual rather than a physical machine,
PHY281Introduction to JavaSlide 1 Introduction to Java In this section we will learn how how to use Java and write our first Java Applet:  The Java Development.
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Introducing JavaBeans Identify the features of a JavaBean Create and add a bean to an application Manipulate bean properties using accessor and mutator.
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
S.W. Ma/CIM/LWL41211/2 Prog. IIA Page 1 HKIVE (Lee Wai Lee Campus) Department of CIM Course : Year 2 Module : Programming IIA Textbook : Introduction.
4.1 JavaScript Introduction
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CS413: Java Programming language Applications Applets
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Java Programming, 3e Concepts and Techniques Chapter 2 - Part 2 Creating a Java Application and Applet.
LESSON 2 CREATING A JAVA APPLICATION JAVA PROGRAMMING Compiled By: Edwin O. Okech [Tutor, Amoud University]
CISC6795: Spring Object-Oriented Programming: Polymorphism.
Programming Fundamentals 2: Background/ F II Objectives – –give a non-technical overview of Java Semester 2, Background.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
CSC 142 B 1 CSC 142 Java objects: a first view [Reading: chapters 1 & 2]
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
The Basics of Javadoc Presented By: Wes Toland. Outline  Overview  Background  Environment  Features Javadoc Comment Format Javadoc Program HTML API.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
POS 406 Java Technology And Beginning Java Code
Introduction to Java Programming with Forte Y. Daniel Liang.
JAVA BASICS Prepared by The Smartpath Information Systems
More on Hierarchies 1. When an object of a subclass is instantiated, is memory allocated for only the data members of the subclass or also for the members.
Session 1 Introduction to Java. Objectives Java Simplified / Session 1 / 2 of 32 Explain the history of Java Explain Java in brief List the types of Java.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Fall 2015CISC124 - Prof. McLeod1 CISC124 Have you filled out the lab section survey? (As of last night 54 left to fill out the survey.) TA names have been.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Today… “Hello World” ritual. Brief History of Java & How Java Works. Introduction to Java class structure. But first, next slide shows Java is No. 1 programming.
Creating a Java Application and Applet
Java – in context Main Features From Sun Microsystems ‘White Paper’
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
Object Oriented Programming Object and Classes Lecture 3 MBY.
Introduction to Programming 1 1 2Introduction to Java.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
JAVA TRAINING IN NOIDA. JAVA Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented and specifically.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
 This work confers an application which makes possible to use a Bluetooth enabled mobile phone to remote control home appliances such electric fan, LEDs.
Introduction to Java Programming, 4E Y. Daniel Liang.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Computer System Structures
Object Oriented Programming in
Before You Begin Nahla Abuel-ola /WIT.
Internet and Java Foundations, Programming and Practice
Remote Method Invocation
Packages and Interfaces
Constructors, GUI’s(Using Swing) and ActionListner
(Computer fundamental Lab)
F II 1. Background Objectives
Introducing Java.
Java Remote Method Invocation
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Java vs. J++ (or why J++ failed) Elisa Chong CS 151

History Microsoft’s “Java-compliant” J++ violated Java's philosophy of "Write once, run anywhere". Dangerous to Microsoft is the possibility that if enough portable Java applications are written, the need for Windows evaporates.

Background June 20th of Microsoft Corporation announced support for Sun Microsystems' Java in Internet Explorer version 3.0. October 7, Announced today that it is suing Microsoft for failing to stick to the letter of its Java licensing agreement.

Sun’s Reasons Prevent MS from misleading Java developers and prevent them from delivering anything but fully compatible Java technology implementations Prevent Microsoft from improperly using the Java Compatible logo Get MS back into compliance (By not shipping the complete JDK in the final version of IE 4.0, MS breached its contractual obligation

Microsoft’s Strategy The first was to implement standard Java libraries poorly or not at all, and then provide a Windows-only alternate library that runs well on Windows operating systems and not at all on non-Microsoft operating systems. Add functionality to the standard Java libraries by providing libraries to fill voids. (i.e. The Java AWT does not provide access to all the Windows GUI functionality. Microsoft extended the AWT to provide access to these functions. A side effect was that Java programs using these Microsoft library extensions were not able to be ported to non-Windows machines.

Summary of Violations Microsoft's COM imports violate standard Java coding conventions by being embedded inside Javadoc-style comment blocks. Microsoft's Internet Explorer 4.0 and SDK (software development kit) version 2.0 do not support the JNI Specification and do not natively support RMI (Remote Method Invocation)

Summary of violations (cont.) MS added the following: 16 new classes were added into java.awt 1 was added into java.lang 32 new public methods 3 new instance variables Lots of new Locales for internationalization 8 additional security methods

Summary of violations (cont.) MS's implementation is missing a required method – the toString() method of the ByteArrayOutputStream that accepts a character encoding name as a parameter MS’s Visual J++ includes the WFC (Windows Foundation Classes), which support a language construct called delegates or bound method references. This construct, and the new keywords, "delegate" and "multicast", introduced to support it, are not a part of the Java programming language.

Compiler Directives Non-descriptive attributes are placed in class files that only Microsoft's Java VM understands. These refer commands in javadoc-style comments: size=2]) */ auto) */ */ Size") */ When the MS compiler finds this directive in the source, it adds an attribute to the class file to load the specified dynamic library. However, the standard Java way to load a library is with the System.loadLibrary() method. Because non-Microsoft Java VMs will not recognize the attribute added by directive, the necessary library will not load and the program will not work correctly.

No JNI or RMI Support JNI is the native code interface used to access platform- specific capabilities, like a serial port or a microphone, for things that aren't available yet through the Core API. The goal of JNI is to allow developers to provide a single set of native libraries for every Java implementation on a specific platform. The lack of JNI support in MS products requires native-library vendors to maintain multiple libraries for integration into different Java virtual machines on the same platform. MS provided the RMI classes separately from all its products, it doesn’t provide the rmic compiler. The lack of the rmic compiler makes both the SDK and J++ environments incomplete and incompatible. When it comes to RMI, the remote method invocation library for executing Java code directly within other Java virtual machines.

New Classes 16 new classes where added to java.awt All classes are peer classes for AWT components, where a peer is the platform-specific representation of a graphical component.

New Classes (cont.) With the exception of the last one, all the classes are peer classes for AWT components, where a peer is the platform- specific representation of a graphical component like a button or menu. Normally, these classes would go into a different package like sun.awt.windows or sun.awt.motif. Since you aren't supposed to use them anyway, they should be easy to avoid. The WUIPeer class also is a peer, but it supports a Microsoft-specific behavior.

New Methods

New Methods (cont.) Key problem appears in public methods that microsoft introduced. All the methods on the previous slide are platform dependant and will only run with MicroSoft’s environment. You will need to avoid all of the above methods, unless you want your Java programs to run only with Microsoft's environment.

New Instance Variables

New Instance Variables & Locale PUBLIC_DECLARED is brand new to Member, and appWorkspace is brand new to SystemColor, while pData was private and is now public. Microsoft's environment seems to understand a few additional languages, that JavaSoft doesn't.

New Interfaces

Interfaces (cont.) An interface defines a partial template that a class must follow. MS modified the templates of some of the security interfaces. The way interfaces work, when you create a class that implements an interface, you define a method for each method declared in the interface. By increasing the number of methods in the interfaces, Microsoft is breaking every class that implements each original interface. If you need to create programs to work in both Microsoft and non- Microsoft environments, it is necessary to always implement the additional behavior, whenever you implement either interface in a class.

Missing Method The toString() method of ByteArrayOutputStream that accepts a character encoding name as a parameter isn't present. A character encoding permits localized display of text messages. The workaround for this omission is to ask for the byte array of the stream ( toByteArray() ) and then use the String constructor that accepts an encoding name. By always taking these two steps, even with the JDK, you'll be sure your programs will work when used with Microsoft's runtime environment.

Bibliography - sun article discussing items on J bunch of why j++ is not compliant examples. - very good update.html - ok

In Conclusion Microsoft Attempted to fragment the standardized application programming environment established by the Java technology, to break the cross- platform compatibility of the Java programming environment, and to implement the Java technology in a manner calculated to cause software developers to create programs that will operate only on platforms that use defendant Microsoft's Win32-based operating systems and no other systems platform or browser This in turn caused developers to be wary of the J++ SDK and for the sake of writing Java code that would be