Thursday, September 27, 2012

Setting the JAVA_HOME Environment Variable(Class Path) in Windows

Environment variables are global system variables accessible by all the processes running under the Operating System (OS). Environment variables are useful to store system-wide values such as the directories to search for the executable programs, the OS version, and the location of Windows binaries.After Installation of Java, you cannot compile programs until you have directory to your path environment variable if not already present, otherwise the tools won't be found when you try to compile and run programs. So you need to Set up Class path First. This tutorial explains how you can do that.If you want help on how to download or install Jdk, you can Read It Here

Setting Java Class Path

Classpath in Java is path to directory or list of directory which is used byClassLoaders to find and load class in Java program.
Here is Step by Step guide for setting Java Classpath in Windows
  • Go to Environment variable window in Windows by pressing "Windows + Pause" > Advanced > Environment variable " or you can go from right click on my computer than choosing properties and then Advanced and then Environment variable this will open Environment variable window.How to se Java Classpath in windows
  • Now specify your environment variable CLASSPATH and put the value of your JAVA_HOME\lib and also include current directory by including (dot or period sign).
  • Now to check the value of Java classpath in windows type "echo %CLASSPATH" in your DOS command prompt and it will show you the value of directory which are included in CLASSPATH.

    You can also set classpath in windows by using DOS command like :

    set CLASSPATH=%CLASSPATH%;JAVA_HOME\lib;
     
  • This way you can set classpath in Windows XP, windows 2000 or Windows 7 and 8, as they all come with command prompt.

Setting JAVA_HOME to JDK Installation Directory

JRE (Java Runtime) is needed for running Java programs. JDK (Java Development Kit) is needed for writing and running Java programs. JDK includes JRE plus development tools such as Java compiler.

Set JAVA_HOME to your JDK installation directory (e.g., "c:\Program Files\java\jdk1.6.0_xx"). JAVA_HOME is needed for running Tomcat and many other Java applications. JAVA_HOME is the directory you install your JDK.

For windows users (in Vista / Windows 7), you can set the JAVA_HOME permanently via "Control Panel" > "System" > "Advanced system settings". Switch to "Advanced" tab > "Environment variables" and choose "System Variables" (for all users) or "User Variables" (for this login user only). To create JAVA_HOME, choose "New". In variable "Name", enter " JAVA_HOME" and in variable "Value", provide the JDK installation directory.

You can optionally set JRE_HOME to the JRE base directory (e.g., "c:\Program Files\java\jre1.6.0_xx")

After setting all above environment variable you can compile and run your Java application freely.

First Step towards Java Programming - Downlaod and Install the JDK

Downloading & Installing the JDK

Before you can develop Java applications, you'll need to download the Java Development Kit (JDK). The JDK is a development environment for building applications, applets, and components using the Java programming language. The JDK includes tools useful for developing and testing programs written in the Java programming language and running on the Java platform.You may prefer at a later time to use a third party IDE, such as Visual J++ or Borland JBuilder, but it is important to become familiar with the basics of Java first.


Downlaoding the JDK

Specifications
Operating system:- Windows
Developed By:- sun Microsystems
Published By:- sun.com
File Size:- 138.77 MB(for x32), 133.49 MB(for x64)
File Version:- 6.20
Language:- Multi-language
Price:- Free


Sun offers many versions of its JDK, for different Java versions and platforms. You are advised to use the most recent JDK, to gain access to all of the functionality of the latest version of the Java platform. If you don't already have the JDK installed, then stop off at Sun's official Java site,
For an even quicker way to find the latest Java tools, visit the JDK Download . The most current version at time of writing is the Java 2 SDK v1.3, which contains all the tools you will need for this tutorial.

Installing the JDK

If you have previously installed older version of JDK/JRE, un-install them. Run "Control Panel" ⇒ "Program and Features". Un-install programs such as "Java SE Development Kit" and "Java SE Runtime". (If you are not sure whether you have older versions of JDK, check!)The installation process is fairly straightforward, but you should consult the documentation if you encounter problems. You'll need to make sure that the JDK is installed correctly, and that the JDK tools are within your operating system's path, before proceeding.



Thursday, September 13, 2012

Who is Who of Java

This Post tells you about Who's Who of Java. People related to java about whom you should be knowing. So here is the list of people who made java what it is Today.

James Gosling



James Gosling is generally regarded 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.
He created the original design of Java and implemented the language's original compiler and virtual machine. Gosling traces the origins of the approach to his early 1980s graduate student days, when he created a pseudo-code (p-code) virtual machine for the lab's DEC VAX computer so that his professor could run programs written in UCSD Pascal. Pascal compiled into p-code to foster precisely this kind of portability. In the work leading to Java at Sun, he saw that architecture-neutral execution for widely distributed programs could be achieved by implementing a similar philosophy: always program for the same 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.” Right now he is working with  a startup called Liquid Robotics.

  Gavin 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.

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.

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.

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.

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. 

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.