Wednesday 31 October 2012

EMBED APPLETS IN HTML


When you put an applet on your page you will need to save the applet on your server as well as the HTML page the applet is embedded in. When the page is loaded by a visitor the applet will be loaded and inserted on the page where you embedded it.

Applets have the file extension "class". An example would be "myapplet.class". Some applets consist of more than just one class file, and often other files need to be present for the applet to run (such as JPG or GIF images used by the applet). Make sure to check the documentation for the applet to see if you have all files for it to run.
Before embedding an applet on your page you need to upload the required files to your server.

Below is a short example showing how simple it is to embed an applet on a page.

<Html>
<Head>
<Title>Java Example</Title>
</Head>

<Body>
This is my page<br>
Below you see an applet<br>
<br>
<Applet Code="MyApplet.class" width=200 Height=100>
</Applet>
</Body>
</Html> 


Two HTML tags are relevant according to applets: <Applet> and <Param>.

The <Applet> tag embeds the applet in your HTML page.
The <Param> tag is used to enter parameters for the applet.

The following attributes can be set for the <Applet> tag:

AttributeExplanationExample 
CodeName of class fileCode="myapplet.class"
Width=nn=Width of appletWidth=200 
Height=nn=Height of appletHeight=100 
CodebaseLibrary where the applet is stored.
If the applet is in same directory as
your page this can be omitted.
Codebase="applets/" 
Alt="Text"Text that will be shown in browsers where the ability to show applets has been turned off.alt="Menu Applet" 
Name=NameAssigning a name to an applet can
be used when applets should
communicate with each other.
Name="starter" 
Align=
Left
Right
Top
Texttop
Middle
Absmiddle
Baseline
Bottom
Absbottom
Justifies the applet according to the
text and images surrounding it.
Align=Right 
Vspace=nSpace over and under the applet.Vspace=20 
Hspace=nSpace to the left and right of applet.Hspace=40 


The <Param> tag has the general syntax:
<Param Name=NameOfParameter Value="ValueOfParameter"


Each applet has different parameters that should be set.
Typical parameters for an applet would be:
  • color used by the applet

  • font and font size to be used on text in the applet

  • name of an image file to be inserted in the applet

Tuesday 16 October 2012

Top 8 Java People You Should Know


8. Tomcat & Ant Founder

James-Duncan-Davidson
James Duncan Davidson, while he was software engineer at Sun Microsystems (1997–2001), created Tomcat Java-based web server, still widely use in most of the Java web projects, and also Ant build tool, which uses XML to describe the build process and its dependencies, which is still the de facto standard for building Java-based Web applications.
Related Links
  1. James Duncan Davidson Twitter
  2. James Duncan Davidson Wiki
  3. James Duncan Davidson personal blog
  4. Apache Ant
  5. Apache Tomcat

7. Test Driven Development & JUnit Founder

Kent-Beck
Kent Beck, creator of the Extreme Programming and Test Driven Development software development methodologies. Furthermore, he and Erich Gamma created JUnit, a simple testing framework, which turn into the de facto standard for testing Java-based Web applications. The combine of JUnit and Test Driven Development makes a big changed on the way of coding Java, which causes many Java developers are not willing to follow it.
Related Links
  1. Kent Beck Twitter
  2. Kent Beck Wiki
  3. Kent Beck Blog
  4. JUnit Testing Framework
  5. Extreme Programming Wiki
  6. Test Driven Development Wiki
News & Interviews
  1. Kent Beck: “We thought we were just programming on an airplane”
  2. Interview with Kent Beck and Martin Fowler
  3. eXtreme Programming An interview with Kent Beck
Kent Beck Books
  1. Extreme Programming Explained: Embrace Change (2nd Edition)
  2. Refactoring: Improving the Design of Existing Code
  3. JUnit Pocket Guide

6. Java Collections Framework

Joshua-Bloch
Joshua Bloch, led the design and implementation of numerous Java platform features, including JDK 5.0 language enhancements and the award-winning Java Collections Framework. In June 2004 he left Sun and became Chief Java Architect at Google. Furthermore, he won the prestigious Jolt Award from Software Development Magazine for his book, “Effective Java”, which is arguably a must read Java’s book.
Related Links
  1. Joshua Bloch Twitter
  2. Joshua Bloch Wiki
News & Interviews
  1. Effective Java: An Interview with Joshua Bloch
  2. Rock Star Josh Bloch
Joshua Bloch Books
  1. Effective Java (2nd Edition)
  2. Java Concurrency in Practice

5. JBoss Founder

Marc-Fleury
Marc Fleury, who founded JBoss in 2001, an open-source Java application server, arguably the de facto standard for deploying Java-based Web applications. Later he sold the JBoss to RedHat, and joined RedHat to continue support on the JBoss development. On 9 February 2007, he decided to leave Red Hat to pursue other personal interests, such as teaching, research in biology, music and his family.
Related Links
  1. Marc Fleury Wiki
  2. Marc Fleury Blog
  3. JBoss Application Server
News & Interviews
  1. Could Red Hat lose JBoss founder?
  2. JBoss founder Marc Fleury leaves Red Hat, now what?
  3. JBoss’s Marc Fleury on SOA, ESB and OSS
  4. Resurrecting Marc Fleury

4. Struts Founder

Craig-McClanahan
Craig Mcclanahan, creator of Struts, a popular open source MVC framework for building Java-based web applications, which is arguably that every Java developer know how to code Struts. With the huge success of Struts in early day, it’s widely implemented in every single of the old Java web application project.
Related Links
  1. Craig Mcclanahan Wiki
  2. Craig Mcclanahan Blog
  3. Apache Struts
News & Interviews
  1. Interview with Craig McClanahan
  2. Struts Or JSF?

3. Spring Founder

Rod-Johnson
Rod Johnson, is the founder of the Spring Framework, an open source application framework for Java, Creator of Spring, CEO at SpringSource. Furthermore, Rod’s best-selling Expert One-on-One J2EE Design and Development (2002) was one of the most influential books ever published on J2EE.
Related Links
  1. Rod Johnson Twitter
  2. Rod Johnson Blog
  3. SpringSource
  4. Spring Framework Wiki
News & Interviews
  1. VMware.com : VMware to acquire SpringSource
  2. Rod Johnson : VMware to acquire SpringSource
  3. Interview with Rod Johnson – CEO – Interface21
  4. Q&A with Rod Johnson over Spring’s maintenance policy changes
  5. Expert One-on-One J2EE Design and Development: Interview with Rod Johnson
Rod Johnson Books
  1. Expert One-on-One J2EE Design and Development (Programmer to Programmer)
  2. Expert One-on-One J2EE Development without EJB

2. Hibernate Founder

gravin-king
Gavin King, is the founder of the Hibernate project, a popular object/relational persistence solution for Java, and the creator of Seam, an application framework for Java EE 5. Furthermore, he contributed heavily to the design of EJB 3.0 and JPA.
Related Links
  1. Gavin King Blog
  2. Hibernate Wiki
  3. Hibernate Framework
  4. JBoss seam
News & Interviews
  1. Tech Chat: Gavin King on Contexts and Dependency Injection, Weld, Java EE 6
  2. JPT : The Interview: Gavin King, Hibernate
  3. JavaFree : Interview with Gavin King, founder of Hibernate
  4. Seam in Depth with Gavin King
Gavin King Books
  1. Java Persistence with Hibernate
  2. Hibernate in Action (In Action series)

1. Father of the Java programming language

James-Gosling
James Gosling, generally credited as the inventor of the Java programming language in 1994. He created the original design of Java and implemented its original compiler and virtual machine. For this achievement he was elected to the United States National Academy of Engineering. On April 2, 2010, he left Sun Microsystems which had recently been acquired by the Oracle Corporation. Regarding why he left, Gosling wrote on his blog that “Just about anything I could say that would be accurate and honest would do more harm than good.”
Related Links
  1. James Gosling Blog
  2. James Gosling Wiki
News & Interviews
  1. Interview with Dennis Ritchie, Bjarne Stroustrup, and James Gosling
  2. Interview: James Gosling, ‘the Father of Java’
  3. Developer Interview: James Gosling
Note

Tuesday 2 October 2012

Oracle 11g Release 2 Installation Steps



  1. The Oracle Database 11g Release 2 files are broken down into two zip files on the Oracle site. That means you need to download both files, and then expand them into an installation directory. I called my installation directory C:\OracleInstall, but you can call it whatever works for you. Here’s a screen shot of the directory after expanding both compressed files (done with WinZip 15).
You should notice that the two expanded compressed files put everything into a database directory (or folder). Within the installation folder (C:\OracleInstall\database), you double click on the oui icon to launch (start) the Oracle Universal Installer. It’ll open a command prompt that may dwell on the screen for a few seconds up to maybe fifteen seconds.
  1. It’s a good idea to provide an email address for security updates no matter what. You can uncheck the box if you don’t want updates via Oracle Support Services. Click the Next button to continue.
  1. Most developers want to Create and configure a database. If that’s your desire, leave the default radio button checked. Click the Next button to continue.
  1. Most developers install their test instance on a desktop or laptop. If that’s your desire, leave the defaultDesktop Class radio button checked. Click the Next button to continue.
  1. These are default settings and generally the easiest to use. I’d suggest you change the Character Set drop down to Unicode. Then, enter a password twice. Oracle requires that you use at least one capital letter and one number in a 6 character or more long password. Click the Next button to continue.
  1. The next screen is a progress bar that checks for prerequisites. You shouldn’t have to do anything here because it automatically advances you to the next dialog screen. This generally takes less than a minute to run but can take two or so. If you’re much beyond 3 minutes there may be a resource problem with your Windows PC or virtual machine.
  1. This shows you all the selected values for the installation. Unless you want to abort the installation, click the Finish button to proceed.
  1. This screen is the main progress bar, and you’ll be here somewhere between 5 and 10 minutes. The downside is that there are some dialogs that will popup during this phase and you need to authorize them, so it’s a bad time to take a break.
  1. The first popup screen requires you to authorize the Java runtime to call home. You should click the Allow Access button to proceed.
  1. When the progress bar starts configuring the instance, failures can occur. The first may occur during the network configuration, which typically happens if you didn’t preconfigure the hosts file. You don’t need to do anything but watch here unless the installer triggers an error.
  1. The following progress bar is launched by the Oracle Database Configuration Assistant. It typically runs without a problem. You don’t need to do anything but watch here unless the installer triggers an error. This takes a few minutes, and unfortunately requires you to stick aroung to again authorize Java.
  1. The second popup screen requires you to authorize the Java runtime to call home. You should click theAllow Access button to proceed.
  1. The third and last popup screen asks you to whether you want to open other scheme. Generally, you should click the OK button to proceed.
  1. The next dialog shows you that the network and database instances are configured. It’s also running the OEM (Oracle Enterprise Manager) installation. You can wait here but it won’t be a long wait.
  1. This is the last dialog and says you’ve installed Oracle Database 11g Release 2 successfully. You can theClose button to complete the installation.