About JAVA -Programming language

Programming language JAVA


  Sun Microsystems released the first public implementation as Java 1.0 in 1995. Initially it was called as Oak. Then they renamed it as "JAVA". James Gosling was the person who developed it.

Java is purely Object oriented as it follows all the oops principles such as
  1. Encapsulation: It a process of bundling up of data into one block and that block is called Class. So, according to Encapsulation whatever you write that has to be inside Class.
  2. Inheritance: It is a process of deriving the properties of one class into another class. First class is called Base or Super class and next is called Derived or Sub Class
  3. Polymorphism: It is a process of defining two or more methods with same method name but with different forms. There are two types of Polymorphism and they are
    a. Static Polymorphism(Method Overloading). and
    b. Dynamic Polymorphism(Method Overriding)
What is Java?
It is used to create stand-alone applications, net based programs and programs for consumer devices.

Example: cellular phones, palm pilots

Java is Basically divided into
1. J2SE: Java To Standard Edition. (All Core Concepts).
2. J2EE: Java To Enterprise Edition. (All Advance Concepts).
3. J2ME: Java To Mobile Edition (All Mobile Applications).

Features Of Java:
  1. Simple: Java is simple as it is very much similar to c,c++ but all the confusing concepts like pointers are removed from java.
  2. Object Oriented: As it follows all the oops principles and we can relate every thing in java as an object.
  3. Platform Independent: Java is platform independent as we can write the program on one operating system and can execute on any other operating system.
  4. Secure: Java is more secure as virus cannot spread through java files easily.It has more security for data compared to c and c++.
  5. Distributed: Java can be used to develop applications that are portable across multiple platforms,operating systems, and graphic user interfaces.
  6. MultiThreading: Java uses this concept to perform multiple tasks simultaneously.
  7. RMI: Remote Method Invocation allows applications to call objects located at remote sites and communicate with them.
  8. Robust: Java checks the code at the time of compilation and also at the time of interpretation.
  9. Swing: A new set of classes and interfaces used to create an advanced GUI with a "Look and Feel" design.
  10. Memory Management: Java manages its memory efficiently using Garbage Collector.
Types of Applications In Java:
  1. Console Based:In case of these applications the life cycle starts in the main method and ends in the main method. We can print only text form of output.
  2. Applets: These are small programs of java which run on java enabled web browser. If we want to print any grap-hical outputs then we go for applets, which is a part of AWT package. It has certain life cycle methods like init(), start(), paint(), stop() and destroy().
  3. ServerSide: These applications also have certain life cycle methods like init(), service() and destroy().We sho-uld compile the program and run at the server.
    Ex: Servlets, Jsp, Struts e.t.c.

The advance technologies that are in the present market are
  • Struts
  • EJB
  • Xml/Web Services
  • Ajax
  • Springs
Java also provides many design patterns to do the real time projects very efficiently. If you know the advance concepts with the design patterns with some exposer in projects then you can be sure of a job.

At present there is lot of demand for the certified people in the market. Not only in India but also in foreign countries like U.S, Australia, Nigeria, Saudi etc.

The fee structure for one java certification voucher is around Rs.6,500.

There are different certification levels in java such as
  • SCJA. (Sun Certified Java Associate)
  • SCJP. (Sun Certified Java Programmer)
  • SCWCD. (Sun Certified Web Component Developer)
  • SCBCD. (Sun Certified Business Component Developer)
  • SCDJWS. (Sun Certified Developer For Java Web Services).
  • SCMAD. (Sun Certified Mobile Application Developer).

comparison between DOS (COMMAND.COM and MS/Windows NT CMD.EXE shell commands) and the equivalent Linux/Unix or Bash shell commands

Command Comparison:

DOS Command UNIX or Bash Command Action
DIR ls -l (or use ls -lF)(-a all files)
(df -k Space remaining on filesystem)
List directory contents
DIR *.* /o-d
DIR *.* /v /os
DIR /s
DIR /aa
ls -tr
ls -ls
ls -R
ls -a
List directory contents by reverse time of modification/creation.
List files and size
List directory/sub-directory contents recursively.
List hidden files.
TREE ls -R List directory recursivly
CD cd Change directory
MKDIR
MD
mkdir Make a new directory
ASSIGN ln Create a file or directory link
RMDIR
RD
rmdir Remove a directory
CHDIR pwd Display directory location
DEL
ERASE
rm -iv Remove a file
RMDIR /S (NT)
DELTREE (Win 95...)
rm -R Remove all directories and files below given directory
COPY cp -piv Copy a file
XCOPY cp -R Copy all file of directory recursivly
RENAME or MOVE mv -iv Rename/move a file
TYPE cat Dump contents of a file to users screen
MORE more Pipe output a single page at a time
HELP or COMMAND /? man Online manuals
CLS clear
ctrl-l
Clear screen
EXIT
EXIT0
exit
exit 0
Exit a shell
FIND
FINDSTR
grep Look for a word in files given in command line
COMP diff Compare two files and show differences. Also see comm, cmp, mgdiff and tkdiff.
FC diff Compare two files and show differences. Also see comm, cmp, mgdiff and tkdiff.
SET set and env List all environment variables
SET variable=value
echo %variable%
set

export variable=value
echo $variable

Set environment variables
Show environment variables
ECHO text echo text Echo text to screen
SET variable setenv (for C shell) or export VAR=val (for Korn shell. Also VAR=val) Set environment variables
PATH
PATH %PATH%;C:\DIR
echo $PATH
PATH=$PATH:/dir
Display search path for executables.
Set PATH environment variable.
PROMPT $p$g export PS1='\h(\u)\W> ' Set user command prompt.
DATE or TIME date Show date. (also set date - DOS only)
DOSKEY /h history List command history
DOSKEY NAME=command alias NAME=command Set command alias
BREAK ON trap Trap ctrl-break / Trap signals.
SORT sort Sort data alphabetically/numerically
EDLIN ed Line mode editor
EDIT filename.txt pico, gnp, vi, xedit, xemacs,dtpad Edit a file. The Linux editor which looks most like DOS edit is probably Pico. (Not a recomendation!)
BACKUP files A:\ tar -cvf /dev/fd0 files
mdir, mcopy
doswrite -a file (AIX only)
Save files to floppy.
See
Using DOS floppies
RESTORE A:\ files tar -xvf /dev/fd0 files
mdir, mcopy
dosread -a file (AIX only)
Read files from floppy.
See
Using DOS floppies
ATTRIB [+r|-r] [+a|-a] [+s|-s] [path\file] /s chmod Change file permissions. DOS: +:set to -:remove r:Read only a:Archive s:System /s:recursively
ATTRIB +h or -h mv file .file Change file to a hidden file - rename file with prefix "."
PRINT lpr Print a file
CALL
COMMAND /C (DOS), CMD (NT)
source script (cshrc)
. script (
bash)
sh script
Execute script from within batch shell.
MEM free
top
Show free memory on system
TASKLIST (WIN2K, XP) ps -aux
top
List executable name, process ID number and memory usage of active processes
MSD lsdev Show system info (Command borrowed from AIX)
SCANDISK
DEFRAG C:
fsck
debugfs
Check and repair hard drive file system
CHDISK du -s Disk usage.
FDISK fdisk Tool to partition a hard drive.
SUBST V: C:\directory\path mount Mount a drive letter to a folder/directory on your hard drive.
FORMAT mke2fs
See:
fdformat and mformat for floppies
Format drive file system.
For floppy drive use see
YoLinux Tutorial Using DOS Floppies with Linux
VER uname -a
echo $SHELL
cat /etc/issue
Operating system/shell version
pkzip tar and zip Compress and uncompress files/directories. Use tar to create compilation of a directory before compressing. Linux also has compress, gzip
HOSTNAME hostname Print host name of computer
PING ping Send packets to a network host
TRACERT traceroute Show routes and router hops to given network destination.
IPCONFIG (NT)
WINIPCFG (Win 95...)
ifconfig Display/configure network interface
NBTSTAT (Netbios info: -n, -c)
NBTSTAT -A IP-address
nslookup host-name
host host-name
Print DNS info for host.
NBTSTAT -a hostname nmblookup -A hostname lookup NetBIOS names.
ROUTE PRINT route -n Print routing table.
NET HELP START chkconfig --list |grep on List services.
NET STARTservice-name
NET STOPservice-name
service service-name start
service service-name stop
Start/stop service/daemon.
NET SHARES df Show mounted shares/filesystems.
NET SEND <node-name> <message> (NT) smbclient -M MS-Windows-host-name
talk
Send pop-up to a MS/Windows PC
Send message to another Unix/Linux user. See
YoLinux tutorial
WIN startx Start X-Windows.
REBOOT shutdown -r now Reboot system.
To find out how to do something on UNIX simply type "man -k subject_matter". This will do a key word search for all commands dealing with the subject matter. Then use the appropriate command. Online manuals are available on all the commands by typing "man command_name".

Installing Flash Player Plugin on Firefox without having Administrator Access or Premissions


Installing Flash Player Plugin on Firefox without having Administrator Access or Premissions

Last updated on Tue, 2010-02-02 16:43. Originally submitted by fabio on 2007-02-19 16:32.

UPDATE: The following guide, originally written for Firefox 2, has been used successfully on Firefox 3, Firefox 3.5 and Firefox 3.6. Users of Firefox Portable edition (versions 3, 3.5 and 3.6) also have been successful using this guide.

The Windows computers available at my University permits login only by autenticated users (students) who don't have Administrator access and permissions.

Installing software on those PC is then not possible.

Recently they finally installed Firefox 2 but without the Flash plugins, which is absolutly useful/needed.

I then tryed to install the Flash Player using the "standard" way (click on the missing plugin link then install the plugin..). However without administrator plugins it was not possible to install.

Then I started doing some tests trying to install the plugin manually. Now I have it installed and working perfectly!

This is how I managed to install it without administrator permissions:

  1. Download the XPI archive of the Flash Player Plugin to your hard disk (right click on the download link then "Save link as.."). XPI archives are only ZIP files containing the files used by the plugins.
  2. So you can safely rename the file you just downloaded, called flashplayer-win.xpi, into flashplayer-win.zip (you are changing its extension from .xpi to .zip)
  3. Extract the files in the archive. You can use any program capable of opening .zip files (WinZip, WinRAR or the free and great 7-zip). There are also websites which can uncompress archives: wobzip.org.
  4. Copy the files flashplayer.xpt and NPSWF32.dll to %APPDATA%\Mozilla\Plugins\
    • %APPDATA% is not a real folder. It's an alias. By inserting it in your windows explorer address bar, you'll be redirected to the real folder which holds your applications profiles and settings. The location of this folder depends on various setting that's why we need the alias and not an absolute path.
    • You can open this folder simply choosing "Start → Run → Type in %APPDATA% → OK".
    • In case you don't have a Plugins folder you can create one and place your files there.
  5. Restart Firefox
  6. Enjoy your flash websites!

Dual booting for linux

Dual booting means that there are two or more operating systems installed on the same computer and that the user is given the choice by the bootloader at boot time to choose the OS to use. Usually the choice for the other OS besides Linux is a version of Windows.

With Windows

First, install Windows, then install Linux. For all modern distributions (tested with SUSE  and Ubuntu ), the Linux installer will offer to create a grub bootloader that lets you choose at computer startup if you want to run Linux or Windows.

With MacOS

The bootloader for Mac OSX is yaboot. It has support for dual booting.

Tricks if things don't work

You don't need the installer if you have a Live CD which can boot you into a desktop/kernel command prompt.

The standard method to get to into a distress Linux is by "change root" whereby you "jump" from the Live CD Linux into another Linux installed in a hard disk.

After you boot to a Live CD, click terminal, do a su and supply the root password if demanded, make a tempoary directory in /mnt, mount it, chroot and enjoy the access to the distressed Linux. Assuming your Linux / is in hda2. You type

mkdir /mnt/hda2
mount /dev/hda2 /mnt/hda2
chroot /mnt/hda2

At this point onward you are inside the Linux installed in hda2 and can do whatever you like with it. With a bit of luck you can even access to the desktop by just typing

startx

Here's how I found out by trial and error. Assuming you have Windows and a Linux distro installed on the the same drive or two drives as I have. Check this link for getting boot loader back onto the first sector. http://geocities.com/epark/linux/grub-w2k-HOWTO.html When you have that set up,

  1. Boot Windows
  2. Obtain bootpart.exe (http://www.winimage.com/bootpart.htm) You need a zip utility for this.
  3. Extract to C:\
  4. Open a command prompt, type bootpart
  5. Note the number that corresponds to Linux (usally 1 or 2)
  6. At the command promt, type:
    bootpart 2 bootsect.lnx YourDistro (mine's Fedora)

    (Replace the "2" with the appropriate partition number noted in step 5
  7. Reboot, you are finished. Boot options will display at the next boot.

No changes are made to the Windows MBR.

Another thing I found out about Vista. I had WindowsXP obn the first sector of my first hard drive and Fedora on a second drive. After installing Vista, on re-boot there was XP and Fedora, Vista found them and now I can boot into Fedora or XP from Vista, neat eh?