Wednesday, 26 February 2014

How to Start Java Programming

Java is an Object oriented programming. you can easily start your java programming. I am going to provide some simple steps to create java program. without wasting your precious time on internet or books.

First Of All We are going to set up our computer to make and run java program.

so First of All download JDK (java development kit) from http://www.oracle.com/technetwork/java/javase/downloads/index.html

and Install it by double click on it.

After that

to be ensure java has installed successfully.
by default all java file goes into
C:\\program files\java\
There are two folder will be there
if(jdk 7) latest version of java technology

jdk1.7...
jre 7

then open jdk1.7 /bin then you will get all tools related to Java development.
we want access all /bin folder tools every where on my computer so I am going to set path
on my computer.

We will develop java program with notepad or any editor and cmd as a beginner.

After Installation
Set path

go to run and type -- sysdm.cpl
then click on Advance system security
then click on Advance Tab
then click on Environment variable
then you will get two variables

User Variable
System Variable

Go For User Variable and Click New
Variable Name -  path
Variable value - C:\Program Files\Java\jdk1.7.0_04\bin

and click ok

after that open a new cmd (if old cmd is open then close that)

and type javac

If Some switch open and Printing like this then you are now enable to compile and run ur program your computer


C:\Users\Pankaj>javac
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  -classpath <path>          Specify where to find user class files and annotation processors
  -cp <path>                 Specify where to find user class files and annotation processors
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -proc:{none,only}          Control whether annotation processing and/or compilation is done.
  -processor <class1>[,<class2>,<class3>...] Names of the annotation processors to run; bypasses
default discovery process
  -processorpath <path>      Specify where to find annotation processors
  -d <directory>             Specify where to place generated class files
  -s <directory>             Specify where to place generated source files
  -implicit:{none,class}     Specify whether or not to generate class files for implicitly refere
nced files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release
  -target <release>          Generate class files for specific VM version
  -version                   Version information
  -help                      Print a synopsis of standard options
  -Akey[=value]              Options to pass to annotation processors
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system
  -Werror                    Terminate compilation if warnings occur
  @<filename>                Read options and filenames from file


C:\Users\Pankaj>





1 comment: