Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1


Ratings: (0)|Views: 25|Likes:
Published by Abdul Khalique

More info:

Published by: Abdul Khalique on Feb 14, 2012
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less





Java Technology (Internet Technologies)Key Components:1.Programming Lang – source language (JPL)2.Runtime Environment facility to run applets or programs3.Class LibraryCharacteristics:1.High level2.General Purpose3.Similar to C++ - same semantic constructs4.Object Orientated5.Dynamic – instance of object created at RT6.Strongly Typed data item declared, intended & prohibited7.Statically Type Checked typed compatibility checked @ RT8.Concurrent – Multiple threads execute concurrentlyJava as a platform
Virtual Machine – (JVM)
Java API – ready made software components; grouped into libraries (packages)1.Objects, strings, threads, I/O2.Applets3.Networking (TCP, UDP)4.Internationalisation5.Security6.Software like Javabeans7.Object Serialisation (RMI)8.JDBCJava ProgramJava APIJava Virtual MachineHardware-Based PlatformJVM
Interpretive Execution - unlike a conventional compiler that translates sourceinto a binary object, machine independent binary representation known as byte code is read by interpreter
Automatic garbage collection- allocate and release memory
Multi-threaded Execution – concurrent thread execution, scheduling and context switching (microkernel)
Internet Access – includes socket library, java program can become client using TCP or UDP
Graphics – control display, create windowsJPL, Runtime, byte code are independent of hardware, produces the same output onany computer. Interpreter makes programs portable.Advantages:1.Agnostic computer brand, download and run copy of active document2.Guarantees document produce correct output on all browsers3.Reduces document creation costs, one version instead of multiple versions for each type of computer.
Bout Applets1.Applets are stored on an Internet/Intranet server.2.Run on JVM provided by the browser3.Delivery and execution is supervised under of Security Manager which regulates tasks4.Browser looks at the <APPLET> tag on the page5.Class loader inside JVM checks to see what classes are needed6.Class loading process, classes are loaded through a verifier to ensure no malevolent code is run7.Different from java program where classes are found using CLASSPATH, applets use CODEBASE attribute in the <APPLET> tag
Java is case sensitive
Use fully qualified name (include package name, classname etc..)
Ensure quotes around values like CODE, CODEBASE
Ensure browser support and versioning
Some browsers may omit certain parts of the java functionality
Browsers differ in their implementation of the Security Mgr.Solutions to browser issues:
Use same version of JDK
Write only JDK 1.02 code
Get the non-core Java classes installed on clients
Pick on browserTips for deployment of Applet
Get files to right location, move HTML files aove class hierarchy (where your compile files go)
Use packages to avoid conflicts with classes
Have the most current browser
Use archive files, compressed class files for the client to use.Java Overview ReviewFeatures:
OO with classes and inheritance
Strong typing and safety
Garbage collection
Huge platform
Applets and applicationsTypeAll variable declarations must be typed including parameter of methods. Mostly static type checking (some dynamic and casting)Primitive Types, All Classes, ArraysClassesTemplatesPublic class DogClass { …} // class definePublic void bark() //dog method or field
Object & ConstructorsInitialize a class or its methods. Constructor method is same name as the classnameClass Fields are methods defined in classesSubclasses and Inheritancepubic class Smallthing extends Mainthing Visibility:
Private – viewable only inside the class
Package – viewable inside class and in the same package
Protected – private + package and subclasses
Public – all classesInterfaces:Interface declarationPublic interface something {…}Used in a class declaration to extendExceptions:Use of Try - Catch syntaxJava Security Notes:Manage threats by active content by isolating all sensitive, potentially unsafefunctions of programming lang.Browser defines security policy for authorized and unauthorized accessJPL must gain permission from module (Sec. Mgr) enforcing policy to run sensitive functions to completion and access resource. – SandboxingJava defines Security Manager class
# of access-control methods
Sandboxes major threats to active document
Security manager methods have naming convention with checkXXXXBrowser measures trustworthiness of java codeApplets and Apps loaded locally are considered trustworthyApplets and apps on network are not & access is limited by sandboxing so:1.System resources are limited2.All the checkXXX methods in SecMgr class throw security exceptionsSockets…are Software interfaces that connect an app to the network. 64K addressable sockets, colloquially known as port numbers.Server programs listen to these sockets for any service requestsClient program needs to open socket of its own before it can connect to a serversocket at the endServerSocket (Server) and Socket (Client) classes provide complete TCP/IP connectivity support; provides methods to connect any stream (I/O) to a socket to communicate through.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->