Академический Документы
Профессиональный Документы
Культура Документы
INTRODUCTION
of Technology Used
Initially the language was called as “oak” but it was renamed as “Java” in 1995.
The primary motivation of this language was the need for a platform-independent (i.e.,
architecture neutral) language that could be used to create software to be embedded in
various consumer electronic devices.
Java has had a profound effect on the Internet. This is because; Java expands the
Universe of objects that can move about freely in Cyberspace. In a network, two
categories of objects are transmitted between the Server and the Personal computer. They
are: Passive information and Dynamic active programs. The Dynamic, Self-executing
programs cause serious problems in the areas of Security and probability. But, Java
addresses those concerns and by doing so, has opened the door to an exciting new form of
program called the Applet.
1
using C or C++. Java’s ability to create Applets makes it important. An Applet is an
application designed to be transmitted over the Internet and executed by a Java –
compatible web browser. An applet is actually a tiny Java program, dynamically
downloaded across the network, just like an image. But the difference is, it is an
intelligent program, not just a media file. It can react to the user input and dynamically
change.
SECURITY
Every time you that you download a “normal” program, you are risking a viral
infection. Prior to Java, most users did not download executable programs frequently, and
those who did scanned them for viruses prior to execution. Most users still worried about
the possibility of infecting their systems with a virus. In addition, another type of
malicious program exists that must be guarded against. This type of program can gather
private information, such as credit card numbers, bank account balances, and passwords.
Java answers both these concerns by providing a “firewall” between a network
application and your computer.
When you use a Java-compatible Web browser, you can safely download Java
applets without fear of virus infection or malicious intent.
PORTABILITY
The key that allows the Java to solve the security and portability problems is that
the output of Java compiler is Byte code. Byte code is a highly optimized set of
instructions designed to be executed by the Java run-time system, which is called the Java
Virtual Machine (JVM). That is, in its standard form, the JVM is an interpreter for byte
code.
2
Translating a Java program into byte code helps makes it much easier to run a
program in a wide variety of environments. The reason is, once the run-time package
exists for a given system, any Java program can run on it.
Although Java was designed for interpretation, there is technically nothing about
Java that prevents on-the-fly compilation of byte code into native code. Sun has just
completed its Just In Time (JIT) compiler for byte code. When the JIT compiler is a part
of JVM, it compiles byte code into executable code in real time, on a piece-by-piece,
demand basis. It is not possible to compile an entire Java program into executable code all
at once, because Java performs various run-time checks that can be done only at run time.
The JIT compiles code, as it is needed, during execution.
Beyond the language, there is the Java virtual machine. The Java virtual machine
is an important element of the Java technology. The virtual machine can be embedded
within a web browser or an operating system. Once a piece of Java code is loaded onto a
machine, it is verified. As part of the loading process, a class loader is invoked and does
byte code verification makes sure that the code that’s has been generated by the compiler
will not corrupt the machine that it’s loaded on. Byte code verification takes place at the
end of the compilation process to make sure that is all accurate and correct. So byte code
verification is integral to the compiling and executing of Java code.
Overall Description
Java byte code
Java .Class
Java programming uses to produce byte codes and executes them. The first box
indicates that the Java source code is located in a. Java file that is processed with a Java
compiler called javac. The Java compiler produces a file called a. class file, which
contains the byte code. The. Class file is then loaded across the network or loaded locally
3
on your machine into the execution environment is the Java virtual machine, which
interprets and executes the byte code
Java
PC Compiler Java
Interpreter
Source
(PC)
Code
Macintosh Byte code Java
………..
Compiler Interpreter
………..
(Macintosh)
SPARC
(Platform Java
dent) (Sparc)
…………
4
During run-time the Java interpreter tricks the byte code file into thinking that it is
running on a Java Virtual Machine. In reality this could be a Intel Pentium Windows 95
or SunSARC station running Solaris or Apple Macintosh running system and all could
receive code from any computer through Internet and run the Applets.
SIMPLE
Java was designed to be easy for the Professional programmer to learn and to use
effectively. If you are an experienced C++ programmer, learning Java will be even easier.
Because Java inherits the C/C++ syntax and many of the object oriented features of C++.
Most of the confusing concepts from C++ are either left out of Java or implemented in a
cleaner, more approachable manner. In Java there are a small number of clearly defined
ways to accomplish a given task.
OBJECT ORIENTED
Java was not designed to be source-code compatible with any other language. This
allowed the Java team the freedom to design with a blank slate. One outcome of this was
a clean usable, pragmatic approach to objects. The object model in Java is simple and
easy to extend, while simple types, such as integers, are kept as high-performance non-
objects.
ROBUST
The multi-platform environment of the Web places extraordinary demands on a
program, because the program must execute reliably in a variety of systems. The ability to
create robust programs was given a high priority in the design of Java. Java is strictly
typed language; it checks your code at compile time and run time.
5
Sun turned it into a language of Internet Programming. It allows us to publish a webpage
with Java code in it.
1.6 AWT
The Abstract Window Toolkit (AWT) package enables you to create GUIs in
your applets and applications. Different Windows API from different platforms were
looked at and components were identified that were common to all of them. The
AWT API communicates with the platform's native API's as to give your application
the native look and feel. Because they associate with their own native screen
resources, AWT components are called heavyweight components. Swing components
do not associate with native resources and are called lightweight components. The
AWT consists of components, both container and non-container ones (eg. Button,
Checkbox, Choice, ...) Container components (eg. Frame, Dialog, Window, Panel)
control the layout of other components. As containers are themselves components,
they can be placed inside other containers. Check out these links and subcategories
on how to create and work with these containers and components.
Subcategories
Button Insets
Canvas Input Method Framework
Checkbox and RadioButton Label
Choice Layout Managers
Color List
Data Transfer (java.awt.datatransfer.*) Menu, MenuItem
Dialog Robot
Drag and Drop (java.awt.dnd.*) Scrollbar
6
Event ScrollPane
Font Textfield, TextArea
Frame Toolkit
Graphics
1.7 SWING
Swing are light weight components which dependent on java API's. So same
look and feel on all Operating Systems. All swing components are designed using
architecture Model View Controller (MVC).
Model - Storage
View - Presentation
Controller – Event Handling
VDU
View Controller
Model
Keyboard Mouse
Fig.1.4 Model View Controller (MVC)
Netscape and sun has jointly produced the original swing set of components as part of the
Java Foundation Classes (JFC). Swing and JFC are not the same thing, rather swing is a
part of the JFC library. JFC provides the following featues: -
swing (The large UI package)
cut & paste (Clipboard support)
Accessibility features
The desktop color features
java 2D
7
The five APIs of the java Foundation Classes
Four new components have been introduced in Swing to deal with the
complexities involved in mixing up the heavy weight and the lightweight components in
the same container.
NetBeans IDE 8.0 is released, also providing new features for Java 8 technologies.
It has code analyzers and editors. NetBeans is an integrated development
environment (IDE) for developing primarily with Java, but also with other languages, in
particular PHP, C/C++, and HTML5.
8
Fig 1.7 NetBeans IDE 8.0
9
1.10 JSP (Java Server Page)
JSP is Short for Java Server Page. Server-side technologies, Java Server Pages are
an extension to the Java servlet technology that was developed by Sun. JSPs have
dynamic scripting capability that works in tandem with HTML code, separating the page
logic from the static elements the actual design and display of the page to help make the
HTML more functional .A JSP is translated into Java servlet before being run, and it
processes HTTP requests and generates responses like any servlet. However, JSP
technology provides a more convenient way to code a servlet. Translation occurs the first
time the application is run. A JSP translator is triggered by the .jsp file name extension in
a URL. JSPs are fully interoperable with servlets. You can include output from a servlet
or forward the output to a servlet, and a servlet can include output from a JSP or forward
output to a JSP.JSPs are not restricted to any specific platform or server..
10
Initialization ( jspInit() method is invoked by the container).
Request processing ( jspService() method is invoked by the container).
Destroy ( jspDestroy() method is invoked by the container).
1.11 Servlets
Servlet technology is robust and scalable because of java language. Before Servlet,
CGI (Common Gateway Interface) scripting language was popular as a server-side
programming language. There are many interfaces and classes in the servlet API such as
Servlet, GenericServlet, HttpServlet, ServletRequest, ServletResponse etc. Servlet can be
described in many ways, depending on the context. Servlet is a technology i.e. used to
create web application. Servlet is an API that provides many interfaces and classes
including documentations. Servlet is an interface that must be implemented for creating
any servlet. Servlet is a class that extends the capabilities of the servers and responds to
the incoming request. It can respond to any type of requests. Servlet is a web component
that is deployed on the server to create dynamic web page.
11
Fig 1.10 Servlets
1. Importing Packages
2. Registering the JDBC Drivers
3. Opening a Connection to a Database
12
4. Creating a Statement Object
5. Executing a Query and Returning a Result Set Object
6. Processing the Result Set
7. Closing the Result Set and Statement Objects
8. Closing the Connection
JDBC-ODBC bridge
Native-API Driver
Network-Protocol Driver(Middleware Driver)
Database-Protocol Driver(Pure Java Driver)
13
CHAPTER-2
INTRODUCTION
to Project Work
2.1 FIR (First Information Report)
As described in law:
When information about the commission of a cognizable offence is given orally, the
police must write it down.
The person giving information or making a complaint has a right to demand that the
information recorded by the police be read to him or her.
Once the information has been recorded by the police, it must be signed by the person
giving the information.
14
permission. The category of offences as per Criminal Procedure Code (CrPC) in which
Police can neither register FIR nor can investigate or arrest without the express
permission.
15
2.1 Procedure of submitting FIR
16
2.4 Law Resource India
The government must allow the online filing of first information reports in rape
cases as that alone will ensure mandatory and automatic registration of complaints on
January 18, 2013, Delhi police chief Neeraj Kumar announced that Zero First Information
Reports (FIRs) may be registered on the basis of a woman’s statement at any police
station irrespective of jurisdiction. This means women can file an FIR at any police
station and the complaint is required to be registered on the basis of the woman’s
complaint verbatim. Mr. Kumar stated: “The woman’s statement has to be taken as gospel
truth and a probe needs to be initiated on its basis.”
At the same time, the Delhi police chief announced a series of other measures
such as the recruitment of 418 women sub-inspectors and 2,088 women constables,
deployment of PCR vans outside women’s colleges, the provision that women can call
100 to seek assistance to be dropped home at night by a PCR van, and 24-hour police
cover for areas around entertainment hubs with heightened security between 8 pm and 1
am. While the foregoing measures must certainly be welcomed as an important step
forward towards making the criminal justice system functional, it is surprising that e-
governance has not been utilized by the Delhi police as an important solution in a country
which is considered the world’s leading provider of IT enabled solutions. The police have
often taken the view that, under Section 154 of the CrPC, complaints need to be
investigated before the FIR is registered because the complaint could be a disguised civil
or commercial dispute or a way of settling personal enmity. Complaints of criminal
cheating and fraud are sometimes filed as a way of pressuring business associates to settle
financial disputes or for personal grudges. However, this is highly unlikely to occur in the
case of rape. In fact, there is no reason why all complaints for at least cognizable offences
should not be registered as FIRs and then investigated.
17
online filing of FIRs will be made possible only upon the implementation of the Crime
and Criminal Tracking Network and Systems (CCTNS), an ambitious Rs. 2,000 crore
project of the Home Ministry, aimed at increasing the efficiency and effectiveness of
policing through e-governance.
18
Needs manual calculations.
No direct role for the higher officials.
Damage of machines due to lack of attention.
To avoid all these limitations and make the working more accurately the system needs
to be computerized.
19
most wanted person details mailing as well as chatting. Any Number of clients can
connect to the server. Each user first makes their login to sever to show their availability.
The server can be any Web Server. An SMTP Server must be maintained for temporary
storage of emails and chat jar files for enable the chatting facilities. The main modules in
this project are given below:
2.7.1 Modules
Admin
Police
Registered User
Visitor
Criminals
View and reply user complaint: - This module helps the admin to view and reply
user’s complaint details.
View and reply user crimes: - This module helps the admin to view and reply user’s
crimes details.
Add and delete latest hot news: - This module helps the admin to add and delete
latest hot news.
View and delete user’s feedback: -This module helps the admin to add and delete
user’s feedback.
Add, delete and view most wanted persons : -This module helps the admin to add,
delete and view most wanted person details
Add and view Criminal registration: -This module helps the admin to add
and view criminal registrations.
Add and view FIR: - This module helps the admin to add and view Fir reports.
Add and view history sheet: -This module helps the admin to add and view history
reports.
View and delete all complaint reply: -This module helps the admin to view and
delete complaint reply.
Add and view prisoner report: - This module helps the admin to add and
prisoner reports.
20
Change password: - This module helps the admin to update his or her password.
View and reply user complaint: - This module helps the police officer
to view and reply user’s complaint details
View and reply user crimes: - This module helps the police officer to view and
reply user’s crimes details
Update status: - police officer can update the status regarding the complaint of any
person.
Add Complaint: - This module helps the user to report online complaints.
Add Crime report: - This module helps the user to report online crimes.
Add Missing person: -This module help the user to report online missing persons
details also we have to add photos of missing person using heterogeneous database.
View Missing persons: - This module help the user to view all the missing person
details.
View Most wanted persons: -This module helps the user to view all most wanted
persons which can be given by the administrator.
Edit Complaint: -This module helps the user to edit his complaint details.
Edit Account: -This module helps the user to update his or her profile.
View complaint status: -This module allows us to view the status of all complaint
that you have posted earlier.
View crime status: -This module allows us to view the status of the all crimes that
you have posted earlier.
Add and View feedback: -This module helps the user to add and view feedbacks.
Mail: - This module helps the user to send mail to the administrator.
21
2.7.6 Criminal Module
In this module we have all the record of criminals and their crime type.
Home Page
FIR topics
What’s New
Thought Of the day
About Us
Online FIR
State Govt .& Police Links
Site Map
FAQ
Safety Tips
Children Safety tips
Home safety Tips
Vehicle Safety Tips
Personnel safety Tips
Road safety tips
Pride
Gallantry Awards
Mauritius awards
Information about accident
Complaint
Suggestion
Check Status
Acts & Rules
Newsletter
22
2.8 SAFETY TOOLS
2.8.1 Children Safety
Never leave children unattended in a vehicle, whether it is running or not. Children
should never be left unsupervised or allowed to spend time alone or with others in
vehicles as the potential dangers to their safety outweigh any perceived convenience
or “fun.”
Always accompany your child to the bathroom in a public place. Older children may
want to wander off and browse alone in a mall, at the beach, etc. Do not allow this.
Avoid buying children clothing displaying their names. A young child is usually
ready to trust anyone who uses his/her name. Explain that someone who knows your
name may not know you or your parents.
Be involved in your children’s activities: Know the places he or she goes and know
the other adults who are involved.
Make sure you know where each of your children is at all times. Know your
children’s friend and be clear with your children about the places and homes they may
visit. Make it a rule for your children to check in with you when they arrive at or
depart from a particular location and when there is a change in plans. You should also
let them know when you’re running late or if your plans have changed to show the
rule is for safety purposes and not being used to “check up” on them.
Listen to your children. Pay attention if they tell you they don’t want to be with
someone or go somewhere. This may be an indication of more than a personality
conflict or lack of interest in the activity or event.
Notice when anyone shows one or all of your children a great deal of attention or
begins giving them gifts.
Take the time to talk to your children about the person and find out why the person is
acting in this way.
23
Use slam-shut locks instead of pad locks. Install magic eye and safety chains on
doors.
Look through the magic eye and ensure the door chain is secure before opening the
door to a stranger.
Leave a light switched on when you go out of town. Inform your neighbors about
your absence from your home for a long or short period.
Insure all valuable properties like VCR, TV etc.
Mark valuables with an identification number like your Ration Card, Passport.
Install an alarm system and learn how to use it. Monitor your alarm system and
arrange for guard response. Stow away ladders and stools.
Make your home appear lived in. Don't keep huge amount of cash and ornaments in
the house. Use bank lockers.
Don't sleep near an open window during the night.
24
Never leave important documents in the glove box or boot.
Never identify your key ring with your name.
Do not offer a lift to anyone you do not know.
If someone needs assistance, stop some distance away and communicate through
locked doors and partially opened window.
In case of theft, immediately inform nearest police station, dial 100.
25
The Punjab Police is responsible for policing in the state of Punjab, India. The
mission of Punjab Police is the prevention and detection of crime, maintenance of law
and order and the enforcement of the Constitution of India. The current chief of Punjab
Police is Sumedh Singh Saini.
To uphold and enforce the law impartially, and to protect life, liberty, property,
human rights, and dignity of the members of the public;
to promote and preserve public order;
to protect internal security, to prevent and control terrorist activities, breaches of
communal harmony, militant activities and other situations affecting Internal Security;
To protect public properties including roads, railways, bridges, vital installations and
establishments etc. against acts of the vandalism, violence or any kind of attack.
To prevent crimes, and reduce the opportunities for the commission of crimes through
their own preventive action and measures as well as by aiding and cooperating with
other relevant agencies in implementing due measures for 2 prevention of crimes;
To accurately register all complaints brought to them by a complainant or his
representative, in person or received by post, e-mail or other means, and take prompt
follow-up action thereon, after duly acknowledging the receipt of the complaint;
To register and investigate all cognizable offences coming to their notice through
such complaints or otherwise, duly supplying a copy of the First Information Report
to the complainant, and where appropriate, to apprehend offenders, and extend
requisite assistance in the prosecution of offenders;
To create and maintain a feeling of security in the community, and as far as possible
prevent conflicts and promote amity;
To provide, as first responders, all possible help to people in situations arising out of
natural or man-made disasters, and to provide active assistance to other agencies in
relief and rehabilitation measures;
To aid individual, who are in danger of physical harm to their person or property, and
to provide necessary help and afford relief to people in distress situations;
To facilitate orderly movement of people and vehicles, and to control and regulate
traffic on roads and highways;
To collect intelligence relating to matters affecting public peace, and all kind of
crimes including social offences, communalism, extremism, terrorism and other
26
matters relating to national security, and disseminate the same to all concerned
agencies, besides acting, as appropriate on it themselves.
To take charge, as a police officer on duty, of all unclaimed property and take action
for their safe custody and disposal in accordance with the procedure prescribed.
To train, motivate and ensure welfare of police personnel
27
Preserve, promote and protect human rights and interests of weaker sections,
backward classes, poor, weak and the downtrodden.
28
2.10 SCREEN SHOTS
29
Fig 2.6 Registered Police Officers Page
30
Fig 2.8 Complaint form
31
REFERENCES
Introduction to Java Programming, eighth edition-Daniel Liang (Jan 13, 2010).
The Complete Reference-Java2-Patrick Naughton and Schildt (1 March, 1999).
My own daily dairy
Tutorial point
www.Google.com
www.Webopedia.com
www.Wikipedia.org
32