we are starting java with mysql…… first of all we should know basic thing about java..
java – java is object oriented programming language…
java platform = java virtual machine + java API’s;
jdk – is a tool
developed java program
JRE to run the program
tool include compiler
compiler converted java code to byte code
jre – load the class
invoke the main method
download demo…click here ->>>>> FirstSessionJavaWithMysqlConnectivity
JRE = jvm + java packages classes
BASICS OF JAVA
What is JRE?
Together, the Java virtual machine and Java API form a “platform” for which all Java programs are compiled. In addition to being called the Java runtime system, the combination of the Java virtual machine and Java API is called the Java Platform (or, starting with version 1.2, the Java 2 Platform). Java programs can run on many different kinds of computers because the Java Platform can itself be implemented in software.
JDK (Java Development Kit)
Java Developer Kit contains tools needed to develop the Java programs, and JRE to run the programs. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc…
Compiler converts java code into byte code. Java application launcher opens a JRE, loads the class, and invokes its main method.
You need JDK, if at all you want to write your own programs, and to compile them. For running java programs, JRE is sufficient.
JRE is targeted for execution of Java files
i.e. JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries.
JDK is mainly targeted for java development. I.e. You can create a Java file (with the help of Java packages), compile a Java file and run a java file
JRE (Java Runtime Environment)
Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE. If you want to run any java program, you need to have JRE installed in the system
The Java Virtual Machine provides a platform-independent way of executing code; programmers can concentrate on writing software, without having to be concerned with how or where it will run.
If u just want to run applets (ex: Online Yahoo games or puzzles), JRE needs to be installed on the machine.
JVM (Java Virtual Machine)
As we all aware when we compile a Java file, output is not an ‘exe’ but it’s a ‘.class’ file. ‘.class’ file consists of Java byte codes which are understandable by JVM. Java Virtual Machine interprets the byte code into the machine code depending upon the underlying operating system and hardware combination. It is responsible for all the things like garbage collection, array bounds checking, etc… JVM is platform dependent.
The JVM is called “virtual” because it provides a machine interface that does not depend on the underlying operating system and machine hardware architecture. This independence from hardware and operating system is a cornerstone of the write-once run-anywhere value ofJava programs.
There are different JVM implementations are there. These may differ in things like performance, reliability, speed, etc. These implementations will differ in those areas where Java specification doesn’t mention how to implement the features, like how the garbage collection process works is JVM dependent, Java spec doesn’t define any specific way to do this.
steps to do program in java
step 1 – download jdk 1.7 or above
step 2 – download mysql
step 3 – dowload editor of java (netbeans,eclipse)
open javaWithJdbc program in netbeans 7.1 or above
1) create new project
3)untick main class option
5)design user interface of java as per your choice
6)run it in java…
username is : rahul
password is : pass
if problem occurs comment here……………….
Latest posts by Md Saddam Hussain (see all)
- How to Open Camera,Browser,Mail,Media in Android Example - December 24, 2016
- About Android !!!! - September 27, 2015
- File Editor In java with beautiful GUI - September 27, 2015