Role of Java

download Role of Java

of 17

Transcript of Role of Java

  • 8/8/2019 Role of Java

    1/17

    1

    A

    Project Report

    Of

    ISM

    On

    ROLE OF JAVA IN MARKETSubmitted in partial fulfillment of the requirement for the award of degreeof

    MBA

    Submitted by

    Tanya GuptaUniv. roll No.:- 131

    Northern India Engineering College DEC-2010

  • 8/8/2019 Role of Java

    2/17

    2

    INTRODUCTION

    With the advent of technical Civilization, where competition isthe only survival maxim, JAVA is much ahead than its counterpart

    technologies. Its flexibility is its power and 'inheritance of legacy' is buzzword among techno-savvy.

    Java is a programming language originally developed by JamesGosling at Sun Microsystems (which is now a subsidiary of OracleCorporation) and released in 1995 as a core component of SunMicrosystems Java platform. The language derives much of itssyntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to

    bytecode (class file) that can run on any Java Virtual Machine(JVM) regardless of computer architecture. Java is a general-

    purpose, concurrent, class-based, object-oriented language that isspecifically designed to have as few implementation dependenciesas possible. It is intended to let application developers "write once,run anywhere". Java is currently one of the most popular

    programming languages in use, and is widely used from applicationsoftware to web applications. As of May 2007, in compliance withthe specifications of the Java Community Process, Sun relicensedmost of its Java technologies. Latest version of java is jre 1.6.

    Java programming source code files are compiled into a formatcalled byte code, which can then be executed by a Java

    programming interpreter. The whole technology is based on theconcept of Java Virtual Machine (JVM) that acts as a translator of

    byte code into machine language. In other words JVM converts the java byte codes into platform specific machine language.

    This high-level powerful programming language provides a powerful software platform as the JVM installed on different platform understand the same byte code. This is ideal for server side web programming and runs in a secured manner over internet.It has enhanced the computing power of the users by taking merelyfrom desktop to the resource of the web. It contains JVM and JavaApplication Programming Interface (API) that are kinds of

  • 8/8/2019 Role of Java

    3/17

    3

    readymade software components, and for using any component, theneed is just to import a related package in your program use thefunctionality. It offers development tools that can be used incompiling, running, debugging and documenting the application,

    making the Java programming fun and easy. The automatic garbagecollection mechanism helps in avoiding memory leaks and itscoding takes less development time than other programminglanguages like C++.

    JAVA programming enables secure and high performance softwaredevelopment on multiple platforms. Many companies in India havewell-qualified software engineers having expertise in Java, JavaScript, J2SE, JSP, and J2ME, JAVA Programming Services help

    your businesses to do better. They provide variety of Javadevelopment services including project solutions.

    Unders t nd ing t e Java Techno l ogyJava technology is based on the concept of a single Java virtualmachine (JVM) -- a translator between the language and theunderlying software and hardware. If you want to start java

    programming then you need to use a text editor to create and editthe source code. By using the Java complier, you can change the

    source code into byte code. The byte code can be run on any platform having Java interpreter that can convert the byte code intocodes suitable for the operating system.

  • 8/8/2019 Role of Java

    4/17

    4

    H ISTORIC DEVELOPMENT

    James Gosling, Mike Sheridan, and Patrick Naughton initiated theJava language project in June 1991. Java was originally designed

    for interactive television, but it was too advanced. The languagewas initially called Oak after an oak tree that stood outsideGosling's office; it went by the name Green later, and was later renamed Java, from a list of random words. Gosling aimed toimplement a virtual machine and a language that had a familiar C/C++ style of notation. . Language Oak was developed in earlynineties at Sun Microsystems as a platform-independent languageaimed at allowing entertainment projects such as video gameconsoles and VCRs to communicate. Java as programminglanguage was first slated to appear in small devices such as set-top

    boxes designed to provide video-on-demand services. JavaProgramming Language is simplified to eliminate language featuresthat cause common programming errors.

    Sun Microsystems released the first public implementation as Java1.0 in 1995. It promised "Write Once, Run Anywhere" (WORA),

    providing no-cost run-times on popular platforms. Fairly secure andfeaturing configurable security, it allowed network- and file-accessrestrictions. Major web browsers soon incorporated the ability torun Java applets within web pages, and Java quickly became

    popular. With the advent of Java 2 (released initially as J2SE 1.2 inDecember 19981999), new versions had multiple configurations

    built for different types of platforms. For example, J2EE targetedenterprise applications and the greatly stripped-down version J2MEfor mobile applications (Mobile Java). J2SE designated theStandard Edition. In 2006, for marketing purposes, Sun renamednew J2 versions as Java EE, Java ME, and Java SE, respectively.

    Oracle Corporation's acquisition of Sun Microsystems in 2009 2010, Oracle has described itself as the "steward of Java technologywith a relentless commitment to fostering a community of

    participation and transparency".There were five primary goals inthe creation of the Java language:

  • 8/8/2019 Role of Java

    5/17

    5

    1. It should be "simple, object oriented and familiar" . 2 . It should be "robust and secure" . 3 . It should be "architecture neutral and portable" . 4 . It should execute with "high performance" . 5 . It should be "interpreted, threaded, and dynamic" .

    Sun Microsystems officially licenses the Java Standard Edition platform for Linux, Mac OS X and Solaris. Although in the pastSun has licensed Java to Microsoft, the license has expired and hasnot been renewed. Through a network of third-party vendors andlicensees, alternative Java environments are available for these andother platforms.

    Sun's trademark license for usage of the Java brand insists that allimplementations be "compatible". This resulted in a legal disputewith Microsoft after Sun claimed that the Microsoft implementationdid not support RMI or JNI and had added platform-specificfeatures of their own. Sun sued in 1997, and in 2001 won asettlement of US$20 million, as well as a court order enforcing theterms of the license from Sun. As a result, Microsoft no longer

    ships Java with Windows, and in recent versions of Windows,Internet Explorer cannot support Java applets without a third-party plugin. Sun, and others, have made available free Java run-timesystems for those and other versions of Windows.

  • 8/8/2019 Role of Java

    6/17

    6

    SOME TERMS IN JAVA

    Java Platform

    One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on anysupported hardware/operating-system platform. This is achieved bycompiling the Java language code to an intermediate representationcalled Java bytecode, instead of directly to platform-specificmachine code. Java bytecode instructions are analogous to machinecode, but are intended to be interpreted by a virtual machine (VM)written specifically for the host hardware. End-users commonly usea Java Runtime Environment (JRE) installed on their own machine

    for standalone Java applications, or in a Web browser for Javaapplets.

    Java performance

    Programs written in Java have a reputation for being slower andrequiring more memory than those written in C. However, Java

    programs execution speed improved significantly with theintroduction of Just-in-time compilation in 1997/1998 for Java 1.1,the addition of language features supporting better code analysis(such as inner classes, StringBuffer class, optional assertions, etc.),and optimizations in the Java Virtual Machine itself, such asHotSpot becoming the default for Sun's JVM in 2000.

    G arbage collection (automatic memory management )

    Java uses an automatic garbage collector to manage memory in theobject lifecycle. The programmer determines when objects arecreated, and the Java runtime is responsible for recovering thememory once objects are no longer in use. Once no references to anobject remain, the unreachable memory becomes eligible to befreed automatically by the garbage collector. One of the ideas

    behind Java's automatic memory management model is that programmers can be spared the burden of having to perform manualmemory management.

  • 8/8/2019 Role of Java

    7/17

    7

    Garbage collection may happen at any time. Ideally, it will occur when a program is idle. It is guaranteed to be triggered if there isinsufficient free memory on the heap to allocate a new object; thiscan cause a program to stall momentarily. Explicit memory

    management is not possible in Java. Java addresses this problemwith automatic garbage collection, i.e., the Java Virtual Machine periodically searches for memory that is no longer in use andrecycles it for future use.

    Java syntax

    The syntax of Java is largely derived from C++. Unlike C++, whichcombines the syntax for structured, generic, and object-oriented

    programming, Java was built almost exclusively as an object-oriented language. All code is written inside a class, and everythingis an object, with the exception of the intrinsic data types (ordinaland real numbers, boolean values, and characters), which are notclasses for performance reasons.Java suppresses several features (such as operator overloading andmultiple inheritance) for classes in order to simplify the languageand to prevent possible errors and anti-pattern design.

    Java uses similar commenting methods to C++. There are threedifferent styles of comment:1. a single line style marked with two slashes (//)2 . a multiple line style opened with a slash asterisk (/*) and

    closed with an asterisk slash (*/) . This type of comment canbe used to hold a lot of information or deactivate code but itis very important to remember to close the comment .

    3 . The Javadoc ( a comprehensive documentation system,created by Sun Microsystems, used by many Java developersand provides developers with an organized system fordocumenting their code) commenting style opened with aslash and two asterisks (/**) and closed with an asterisk slash(*/) . The Javadoc style of commenting allows the user to run

  • 8/8/2019 Role of Java

    8/17

    8

    the Javadoc executable to compile documentation for theprogram .

    Java Applet

    Java applets are programs that are embedded in other applications,typically in a Web page displayed in a Web browser.

    Java Servlet

    Java Servlet technology provides Web developers with a simple,consistent mechanism for extending the functionality of a Webserver and for accessing existing business systems. A servlet canalmost be thought of as an applet that runs on the server side without a face. This enables a developer in adding content to a webserver by using Java platform. In short, servlets provides platformindependent and component based web based application.

    JavaServer Pages ( JSP)

    These are server-side Java EE components that generate responses,typically HTML pages, to HTTP requests from clients.

    G enerics in Java

    In 2004 generics were added to the Java language, as part of J2SE5.0. Prior to the introduction of generics, each variable declarationhad to be of a specific type. For container classes, for example, thisis a problem because there is no easy way to create a container thataccepts only specific types of objects. Either the container operateson all subtypes of a class or interface, usually Object, or a differentcontainer class has to be created for each contained class. Genericsallow compile-time type checking without having to create a largenumber of container classes, each containing almost identical code.

  • 8/8/2019 Role of Java

    9/17

    9

    Java editions

    Sun has defined and supports four editions of Java targetingdifferent application environments and segmented many of its APIsso that they belong to one of the platforms. The platforms are:

    y Java Card for smartcards . y Java Platform, Micro Edition (Java ME) targeting

    environments with limited resources . - Java Micro Edition orJME for short is an accumulation of Java APIs that are usedfor the development of software for devices like mobilephones, PDAs, TV set-top boxes, game programming . Theplatform of micro edition generally consists of an easy user

    interface, a robust security model and a wide variety of built-in networks for running Java based application .

    y Java Platform, Standard Edition (Java SE) targetingworkstation environments . Java SE or Java Standard Editionprovides tools and API's that you can use to create serverapplications, desktop applications, and even applets . Theseprograms developed using Java SE can be run on almost

    every popular operating system, including Linux, Macintosh,Solaris, and Windows .

    y Java Platform, Enterprise Edition (Java EE) targeting largedistributed enterprise or Internet environments . Based onthe foundation framework of the standard edition, JavaEnterprise Edition helps in web application service,component model and enterprise class service oriented

    architecture (SOA) .

  • 8/8/2019 Role of Java

    10/17

    10

    F eatures of Java Programm i g

    Java programming technology having a list of features

    1. simple and secure2. Java is also portable, high performance, multithreaded that is theconcept of OOPs and networks that enable it in constructingsoftware that can run along in small machines that are portable.3.Java is completely base on OOPs that mean the whole javatechnology is work on the concept of Java Virtual Machine that isJVM that is main part of java compile, that acts as translators of

    byte code into machine language and compile the code. The work of JVM converts the Java byte codes into platform specific machine

    language that is the main concept of java.4. Java technology is high-level, object-oriented, very robust programming language.

    5.Java is platform independent programming language and you canrun your compiled code on any operating system withoutrecompiling your source code. Java technology is based on theconcept of a single Java virtual machine a translator between thelanguage and the underlying software and hardware. Java complier changes the source code into byte code with help of JVM. The

    compile byte code can be run on any platform having Javainterpreter that can convert the byte code into codes suitable for theoperating system and end user can find required out put.

  • 8/8/2019 Role of Java

    11/17

  • 8/8/2019 Role of Java

    12/17

    12

    compiled once, and the bytecode generated by the Javacompiler can run on any platform .

    Java is secure : Java is one of the first programming languagesto consider security as part of its design . The Java language,compiler, interpreter, and runtime environment were eachdeveloped with security in mind .

    Java is robust : Robust means reliable and no programminglanguage can really assure reliability . Java puts a lot of emphasis on early checking for possible errors, as Javacompilers are able to detect many problems that would firstshow up during execution time in other languages .

    Java is multithreaded : Multithreaded is the capability for aprogram to perform several tasks simultaneously within aprogram . In Java, multithreaded programming has beensmoothly integrated into it, while in other languages,operating system-specific procedures have to be called inorder to enable multithreading . Multithreading is a necessityin visual and network programming . It is an open source, so

    users do not have to struggle with heavy license fees eachyear

  • 8/8/2019 Role of Java

    13/17

    13

    CURRENT ISSUES

    1. Java does not work in Firefox 3 .6

    Starting in Firefox 3.6 you need the new Java plugin (which enableapplets to be run in Web browsers ) that is included in Java 6Update 10 and above. If you are using an older version of Java, youwill need to update your Java plugin.

    2 . Java applet causes backwards or jumbled typing in text boxes

    Sometimes running a Java applet during the browser session cancause the cursor to behave erratically when you type in a text field,

    so that your text will display backwards or jumbled. Additionally,you may not be able to copy text to the clipboard. If you are havingthese problems, exit Firefox completely (or restart the computer)and then reopen Firefox.

    3 . Java on Windows Vista

    Older versions of the Java Runtime Environment may cause Firefoxto hang. To resolve the issue, download the latest version of the

    Java Runtime Environment (JRE) from Java.com and manuallyinstall it.

    4 . Memory use

    All versions of Java can consume large amounts of memory, andJRE 5 versions may use substantially more memory than JRE 6. If you are concerned about high memory usage, update Java to thelatest available version.

    5 . Java applet causes Firefox process to remain in memory

    When you close Firefox after running a Java applet, Firefox mayremain in memory. When Firefox is restarted, a Close Firefoxdialog may appear, including the following message:

  • 8/8/2019 Role of Java

    14/17

    14

    Firefox is already running, but is not responding. To open a newwindow, you must first close the existing Firefox process, or restartyour system.

    6. Performance

    Java can be perceived as significantly slower and more memory-consuming than natively compiled languages such as C or C++.

    7 . Look and feel

    The default look and feel of GUI applications written in Java usingthe Swing toolkit is very different from native applications. It is

    possible to specify a different look and feel through the pluggablelook and feel system of Swing.

    8 . Single-paradigm language

    Java is predominantly a single-paradigm language. However, withthe addition of static imports in Java 5.0 the procedural paradigm is

    better accommodated than in earlier versions of Java.

  • 8/8/2019 Role of Java

    15/17

    15

    EXPECTED IMPACT ON EMPLOYEES, INDUSTRY OR G OVERNMENT

    The computer java technology, needless to say, has changed theface of the world. Computers can store, organize and manage hugeamounts of data. They can process large amounts of information.Computers have given rise to the software industry, one of the most

    progressive industries of the world. Modern technologies hadreduced the complexities of daily life. Complex programminglanguages are replaced by simpler ones. So, Java technology hasreplaced other complex technologies in schools and offices.Java plays an important role in the business environment. It hasapplication scalability. Application scalability enables the successof a business. Java technology has the following advantages: Dataintegrity, Availability, Scalability, Manageability.

    Java technology is not complex. It has application portability. It paves way for rapid transaction growth. Java technology eliminates pointer manipulation. Pointers are responsible for run-time errors.Java is multi-threaded. With the availability of back-end complier,Java could replace C++ in corporate development shops.

    Java refers to a number of computer software products andspecifications from Sun Microsystems that together provide asystem for developing application software and deploying it in across-platform environment. Java is used in a variety of computing

    platforms from embedded devices and mobile phones on the lowend, to enterprise servers and supercomputers on the high end. Javais nearly everywhere in mobile phones, Web servers and enterpriseapplications, and while less common on desktop computers; Java

    applets are often used to provide improved functionality while browsing the World Wide Web.

    The Internet has brought an important positive change to theentertainment and advertising industry. Advertisements can reachthe masses within seconds over the Internet. The entertainment

  • 8/8/2019 Role of Java

    16/17

    16

    media has progressed only because of the advancements in javatechnology.

    The digitization of information has made it possible for us to store

    it in a compact form. Digitization enriches the quality of information storage. Digital voice and digital images are of a higher quality. Digital cameras and digital television provide their userswith an enriched picture quality, thus bettering their experiencewith java technology.

    Cellular communication has revolutionized the communicationindustry. The conventional telephone, also a piece of javatechnology, was one of the earliest technological developments in

    communication. Mobile phones have broadened the horizons of communication by enabling convenient long-distance calling.

    Satellite communication is another important dimension of javatechnology. Satellite TVs and satellite radios have eased the

    broadcasting of events across the globe.

    These were only a few of the fields influenced by java technology.It is almost impossible to enlist all the positive effects of java

    technology on society. This was just a glimpse of the real big picture.

  • 8/8/2019 Role of Java

    17/17

    17

    REFERENCES

    Wikipedia . com complete reference of java by Herbert Schildt http : //www .clearleadinc . com/site/science-technology .html http : //findarticles . com/p/articles/mi_m0NXD/is_3_ 1 2/ai_n24982307/