Step 1: Download Java – Decompiler from
http://download.cnet.com/windows/3055-2213_4-10046809.html?tag=pdl-redir
Step 2: Install the Java – Decompiler in your PC.
Step 3: Go to All Programs –> DJ Java Decomplier –> DJ Java Decomplier.
Step 4: Select File –> Open then Choose the Class File in File Dialog box.

Step 5: Java File is created from class File.

Popularity: 5% [?]
Combination of java and JDBC is very useful to lets the programmer run his/her program on different platforms. Java programs are secure, robust, automatically downloaded from the network.JDBC API enables Java applications to interact with different types of databases.
Some of the advantages of using Java with JDBC are
• Easy and economical
• Continued usage of already installed databases
• Development time is short
• Installation and version control simplified
JDBC does the following three things
• Establish connection with a database
• Send SQL statements
• Process the results
Popularity: 1% [?]
Network is nothing but a set of computers which are physically connected together.internet is a network of networks.
Protocols:
Different networks requires certain set of rules called protocols.java networking is done using TCP/IP protocol
Different types of protocols are also available in this protocol they are:
*Http(Hyper Text Transfer Protocol)
*FTP(File Transfer Protocol)
*SMTP(Simple Mail Transfer Protocol)
*NNTP(Network News Transfer Protocol)
Sockets:
Sockets is used to plug in just like a electronic sockets.it is essential that they should follow a set of rules to communicate called protocols.
TCP/IP as protocol for communication and IP addresses are the address of the sockets.
Client/Server:
A computer request some service from another computer,is called a client.one that processes the request is called server.A server waits till one of its clients makes a request.it can accept multiple connections at a time.Multi-threading is used to serve multiple users at the same time.
Internet Addresses:
Every computer are connected to a network has a unique IP address.An IP address is a 32-bit number which has four numbers separate by periods.it is possible to connect to the Internet either directly or by using internet service provider.By connecting directly to the internet,the computer is assigned with a permanent IP address.
InetAddress:
InetAddress is one class,which is used to encapsulate th IP address and the DNS.to create a instance of InetAddress class,factory methods are used as there are no visible constructors available for this class.
Methods:
static InetAddress getLocalHost()
//Returns InetAddress object representing local host
static InetAddress getByName(String hostname)
//Returns InetAddress for the host passed to it.
Popularity: 2% [?]
Threads:
Thread is a line of execution.In a single-threaded system there is only one execution line (i.e) only one part of program is in the process of execution at any one time
To create a new thread:
Thread mythread = new thread(this);
this referes the current applet & mythread is a variable
Example:
import java.awt.*;
import java.applet.Applet;
public class MovingBall extends Applet implements runnable
{
Thread mythread=null;
int position=0;
public void start()
{
mythread=new Thread(this);
mythread.start();
}
public void run()
{
while(true)
{
for(position=0;position) {
repaint();
try
{mythread.sleep(100);
}
catch(InterruptedException e)
{
}
}
}
}
public void stop()
{
mythread.stop();
mythread = null;
}
public void paint(Graphics g)
{
g.setColor(Color.gray);
g.fillOval(position,50,30,30);
g.setColor(Color.black);
g.fillOval(position+6,58,5,5);
g.fillOval(position+20,58,5,5);
g.drawLine(position+15,58, position+15,68);
g.drawLine(position+12,68, position+15,68);
g.drawLine(position,45,30,30,-50,-70);
}
}
Popularity: 6% [?]
How to Include Applet Program in a JSP Page:
1.Create a Applet Java Program
sample.java
import javax.swing.JApplet;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class sample extends Applet {
sampleCanvas canvas; // The drawing area to display arcs
public static String s=null;
public void init() {
setLayout(new BorderLayout());
canvas = new sampleCanvas();
add("Center", canvas);
s=this.getParameter("data");
}
public void destroy() {
remove(canvas);
}
public void start() {
}
public void stop() {
}
public void processEvent(AWTEvent e) {
if (e.getID() == Event.WINDOW_DESTROY) {
System.exit(0);
}
}
}
class sampleCanvas extends Canvas {
font = new java.awt.Font("SansSerif", Font.PLAIN, 12);
public void paint(Graphics g) {
Rectangle r = getBounds();
if(sample.s==null)
sample.s="0";
int a = Integer.parseInt(sample.s);
a=(a*600)/1000;
g.fillRect(10, 200,a, 25);
}
public void redraw(int value) {
this.filled = filled;
this.startAngle = value;
repaint();
}
}
2.Complie the Applet Program
3.Import the applet Program in the JSP File
<%@page import="com.sample">
4.Include this Tag in the JSP File
<jsp:plugin type="applet" code="sample.class" width="620" height="450">
<jsp:params>
<jsp:param name="data" value="10"/>
</jsp:params>
</jsp:plugin>
Popularity: 2% [?]