SlideShare a Scribd company logo
1 of 10
How to develop
and run programs
In JAVA
-M Vishnuvardhan,
Dept. of Computer Science,
SSBN Degree College, ATP
SSBN Degree College, ATP M Vishnuvardhan
Introduction
In order to develop java programs Java development kit (JDK) is
needed.
JDK is an open source and can be downloaded from oracle website.
JDK come in various versions the latest version of JDK is JDK 1.10.1
JDK contains some tools which are useful for development of the java
programs
SSBN Degree College, ATP M Vishnuvardhan
Tools in JDK
Basic tools available in the JDK are
javac :- Java Compiler .
java :- java Interpreter
Javah :- C header and stub generator. Used to write
native methods.
javap :- Class file disassembler
 javadoc :- documentation generator
jdb :- java debugger
jar :- creates java archive files (jar)
SSBN Degree College, ATP M Vishnuvardhan
Compilation Process
Java program can be written on notepad and should be saved with
.java extension. The programs can be compiled on command
prompt using the following command
>javac FileName.java
If the program is free of errors then java compiler compiles the java
program and generates .class file
The class file contains byte code which is highly encrypted format of
the java program which can be understandable by java interpreter
only
Sample.java javac Sample.class
SSBN Degree College, ATP M Vishnuvardhan
Interpretation Process
After the generation of the class file we can run the java programs
easily on command prompt with the following command
>java FileName
Even the output of the java program can be routed to a file with the
following command
>java FileName >OutputFileName
Sample.class java Sample.exe
SSBN Degree College, ATP M Vishnuvardhan
Other ways of developing Java programs
Java programs can also be developed using some tools like
Editors like – Edit plus, notepad++, jEdit, kawapro….
IDE like : -Ecllipse, Nebeans, BlueJ, jGrasp, IntelliJ….
IDE provides some additional features like
error checking
smart typing
Powerful GUI developer
Support for various versions of JDK
Debugging tools
Non-Java code Support
The most popular IDEs are Eclipse and Net beans both are open
source can e downloaded from internet.
SSBN Degree College, ATP M Vishnuvardhan
Net beans
Net beans is an IDE fro developing java software. Oracle provides the
net beans with JDK as bundled software can be download from
oracle web site.
Steps for creating java programs in Net beans
Open net beans and make sure the projects window appear on the
left pane other wise goto window menu and choose projects
Close all the existing projects on the projects window by selecting
them and choosing close from file menu
 Now select New Project from File menu and select Java in
categories and Java Class Library in Projects and press next
Provide the name of the project and also the location where the
project has to save and press finish
Now select new file from File men and select Java in categories and
Java Main Class file in file types and press next
Provide the name of the class and press finish
SSBN Degree College, ATP M Vishnuvardhan
Net beans
Steps for creating java programs in Net beans cont.…
Now write the program and make sure it is free of all errors
The program can be compiled by choosing Compile from Run menu
or simply press F9
The program can be executed by choosing Run Project from Run
menu or simple press F6
Alternatively program can be executed by choosing Run File from
Run menu or simply press Shift+F6
After completion of the program close the project in the projects
window
SSBN Degree College, ATP M Vishnuvardhan
Questions
SSBN Degree College, ATP M Vishnuvardhan
Questions

More Related Content

What's hot

01. Introduction to programming with java
01. Introduction to programming with java01. Introduction to programming with java
01. Introduction to programming with javaIntro C# Book
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaShravan Sanidhya
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1sotlsoc
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?NexSoftsys
 
01. introduction to-programming
01. introduction to-programming01. introduction to-programming
01. introduction to-programmingStoian Kirov
 
Java Presentation
Java PresentationJava Presentation
Java Presentationaitrichtech
 
Core java environment setup and details
Core java environment setup and detailsCore java environment setup and details
Core java environment setup and detailse-visionlabs
 
Java Programming (M&M)
Java Programming (M&M)Java Programming (M&M)
Java Programming (M&M)mafffffe19
 
Industrial Training Report on Java Technology.
Industrial Training Report on Java Technology.Industrial Training Report on Java Technology.
Industrial Training Report on Java Technology.Ritesh Kumar Bhanu
 

What's hot (20)

01. Introduction to programming with java
01. Introduction to programming with java01. Introduction to programming with java
01. Introduction to programming with java
 
JAVA Program Examples
JAVA Program ExamplesJAVA Program Examples
JAVA Program Examples
 
Java features
Java featuresJava features
Java features
 
A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net  A comprehensive software infrastructure of .Net
A comprehensive software infrastructure of .Net
 
Microsoft C# programming basics
Microsoft C# programming basics  Microsoft C# programming basics
Microsoft C# programming basics
 
JAVA First Day
JAVA First DayJAVA First Day
JAVA First Day
 
Programming
ProgrammingProgramming
Programming
 
Training on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan SanidhyaTraining on Core java | PPT Presentation | Shravan Sanidhya
Training on Core java | PPT Presentation | Shravan Sanidhya
 
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
 
Core java
Core javaCore java
Core java
 
Learn hadoop and big data technologies
Learn hadoop and big data technologiesLearn hadoop and big data technologies
Learn hadoop and big data technologies
 
Why java is important in programming language?
Why java is important in programming language?Why java is important in programming language?
Why java is important in programming language?
 
01. introduction to-programming
01. introduction to-programming01. introduction to-programming
01. introduction to-programming
 
J introtojava1-pdf
J introtojava1-pdfJ introtojava1-pdf
J introtojava1-pdf
 
Features of java
Features of javaFeatures of java
Features of java
 
Java vs python
Java vs pythonJava vs python
Java vs python
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Core java environment setup and details
Core java environment setup and detailsCore java environment setup and details
Core java environment setup and details
 
Java Programming (M&M)
Java Programming (M&M)Java Programming (M&M)
Java Programming (M&M)
 
Industrial Training Report on Java Technology.
Industrial Training Report on Java Technology.Industrial Training Report on Java Technology.
Industrial Training Report on Java Technology.
 

Similar to Java intro

Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manualnahalomar
 
How to write a simple java program in 10 steps
How to write a simple java program in 10 stepsHow to write a simple java program in 10 steps
How to write a simple java program in 10 stepsIshara Amarasekera
 
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Pratima Parida
 
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Pratima Parida
 
Java Standard edition(Java ) programming Basics for beginner's
Java Standard edition(Java ) programming Basics  for beginner'sJava Standard edition(Java ) programming Basics  for beginner's
Java Standard edition(Java ) programming Basics for beginner'smomin6
 
Java interview question
Java interview questionJava interview question
Java interview questionsimplidigital
 
Installation of java and program execution
Installation of java and program executionInstallation of java and program execution
Installation of java and program executionRakhee Chhibber
 
22412_1_1_1_P_603c5bf161f61_File.pdf
22412_1_1_1_P_603c5bf161f61_File.pdf22412_1_1_1_P_603c5bf161f61_File.pdf
22412_1_1_1_P_603c5bf161f61_File.pdfNileshWadhave1
 
OOPM Introduction.ppt
OOPM Introduction.pptOOPM Introduction.ppt
OOPM Introduction.pptvijay251387
 
(Ebook pdf) java programming language basics
(Ebook pdf)   java programming language basics(Ebook pdf)   java programming language basics
(Ebook pdf) java programming language basicsRaffaella D'angelo
 
simple Java Hello
simple Java Hellosimple Java Hello
simple Java Hellokingpin_vny
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docxvikasbagra9887
 
INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONAjit Yadav
 
Unit of competency
Unit of competencyUnit of competency
Unit of competencyloidasacueza
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxDrPreethiD1
 

Similar to Java intro (20)

Java lab1 manual
Java lab1 manualJava lab1 manual
Java lab1 manual
 
Core java introduction
Core java introduction Core java introduction
Core java introduction
 
How to write a simple java program in 10 steps
How to write a simple java program in 10 stepsHow to write a simple java program in 10 steps
How to write a simple java program in 10 steps
 
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)
 
Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)Java Semimar Slide (Cetpa)
Java Semimar Slide (Cetpa)
 
Java Standard edition(Java ) programming Basics for beginner's
Java Standard edition(Java ) programming Basics  for beginner'sJava Standard edition(Java ) programming Basics  for beginner's
Java Standard edition(Java ) programming Basics for beginner's
 
Java part 1
Java part 1Java part 1
Java part 1
 
Java interview question
Java interview questionJava interview question
Java interview question
 
Javalecture 1
Javalecture 1Javalecture 1
Javalecture 1
 
Installation of java and program execution
Installation of java and program executionInstallation of java and program execution
Installation of java and program execution
 
22412_1_1_1_P_603c5bf161f61_File.pdf
22412_1_1_1_P_603c5bf161f61_File.pdf22412_1_1_1_P_603c5bf161f61_File.pdf
22412_1_1_1_P_603c5bf161f61_File.pdf
 
OOPM Introduction.ppt
OOPM Introduction.pptOOPM Introduction.ppt
OOPM Introduction.ppt
 
(Ebook pdf) java programming language basics
(Ebook pdf)   java programming language basics(Ebook pdf)   java programming language basics
(Ebook pdf) java programming language basics
 
simple Java Hello
simple Java Hellosimple Java Hello
simple Java Hello
 
java introduction.docx
java introduction.docxjava introduction.docx
java introduction.docx
 
Java programming language basics
Java programming language basicsJava programming language basics
Java programming language basics
 
INTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATIONINTRODUCTION TO JAVA APPLICATION
INTRODUCTION TO JAVA APPLICATION
 
Unit of competency
Unit of competencyUnit of competency
Unit of competency
 
1.introduction to java
1.introduction to java1.introduction to java
1.introduction to java
 
JAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptxJAVA ALL 5 MODULE NOTES.pptx
JAVA ALL 5 MODULE NOTES.pptx
 

More from M Vishnuvardhan Reddy (20)

Python Sets_Dictionary.pptx
Python Sets_Dictionary.pptxPython Sets_Dictionary.pptx
Python Sets_Dictionary.pptx
 
Lists_tuples.pptx
Lists_tuples.pptxLists_tuples.pptx
Lists_tuples.pptx
 
Python Control Structures.pptx
Python Control Structures.pptxPython Control Structures.pptx
Python Control Structures.pptx
 
Python Strings.pptx
Python Strings.pptxPython Strings.pptx
Python Strings.pptx
 
Python Basics.pptx
Python Basics.pptxPython Basics.pptx
Python Basics.pptx
 
Python Operators.pptx
Python Operators.pptxPython Operators.pptx
Python Operators.pptx
 
Python Datatypes.pptx
Python Datatypes.pptxPython Datatypes.pptx
Python Datatypes.pptx
 
DataScience.pptx
DataScience.pptxDataScience.pptx
DataScience.pptx
 
Html forms
Html formsHtml forms
Html forms
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
Java Threads
Java ThreadsJava Threads
Java Threads
 
Java Streams
Java StreamsJava Streams
Java Streams
 
Scanner class
Scanner classScanner class
Scanner class
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Java applets
Java appletsJava applets
Java applets
 
Exception handling
Exception handling Exception handling
Exception handling
 
Control structures
Control structuresControl structures
Control structures
 
Constructors
ConstructorsConstructors
Constructors
 
Classes&objects
Classes&objectsClasses&objects
Classes&objects
 
Shell sort
Shell sortShell sort
Shell sort
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Java intro

  • 1. How to develop and run programs In JAVA -M Vishnuvardhan, Dept. of Computer Science, SSBN Degree College, ATP
  • 2. SSBN Degree College, ATP M Vishnuvardhan Introduction In order to develop java programs Java development kit (JDK) is needed. JDK is an open source and can be downloaded from oracle website. JDK come in various versions the latest version of JDK is JDK 1.10.1 JDK contains some tools which are useful for development of the java programs
  • 3. SSBN Degree College, ATP M Vishnuvardhan Tools in JDK Basic tools available in the JDK are javac :- Java Compiler . java :- java Interpreter Javah :- C header and stub generator. Used to write native methods. javap :- Class file disassembler  javadoc :- documentation generator jdb :- java debugger jar :- creates java archive files (jar)
  • 4. SSBN Degree College, ATP M Vishnuvardhan Compilation Process Java program can be written on notepad and should be saved with .java extension. The programs can be compiled on command prompt using the following command >javac FileName.java If the program is free of errors then java compiler compiles the java program and generates .class file The class file contains byte code which is highly encrypted format of the java program which can be understandable by java interpreter only Sample.java javac Sample.class
  • 5. SSBN Degree College, ATP M Vishnuvardhan Interpretation Process After the generation of the class file we can run the java programs easily on command prompt with the following command >java FileName Even the output of the java program can be routed to a file with the following command >java FileName >OutputFileName Sample.class java Sample.exe
  • 6. SSBN Degree College, ATP M Vishnuvardhan Other ways of developing Java programs Java programs can also be developed using some tools like Editors like – Edit plus, notepad++, jEdit, kawapro…. IDE like : -Ecllipse, Nebeans, BlueJ, jGrasp, IntelliJ…. IDE provides some additional features like error checking smart typing Powerful GUI developer Support for various versions of JDK Debugging tools Non-Java code Support The most popular IDEs are Eclipse and Net beans both are open source can e downloaded from internet.
  • 7. SSBN Degree College, ATP M Vishnuvardhan Net beans Net beans is an IDE fro developing java software. Oracle provides the net beans with JDK as bundled software can be download from oracle web site. Steps for creating java programs in Net beans Open net beans and make sure the projects window appear on the left pane other wise goto window menu and choose projects Close all the existing projects on the projects window by selecting them and choosing close from file menu  Now select New Project from File menu and select Java in categories and Java Class Library in Projects and press next Provide the name of the project and also the location where the project has to save and press finish Now select new file from File men and select Java in categories and Java Main Class file in file types and press next Provide the name of the class and press finish
  • 8. SSBN Degree College, ATP M Vishnuvardhan Net beans Steps for creating java programs in Net beans cont.… Now write the program and make sure it is free of all errors The program can be compiled by choosing Compile from Run menu or simply press F9 The program can be executed by choosing Run Project from Run menu or simple press F6 Alternatively program can be executed by choosing Run File from Run menu or simply press Shift+F6 After completion of the program close the project in the projects window
  • 9. SSBN Degree College, ATP M Vishnuvardhan Questions
  • 10. SSBN Degree College, ATP M Vishnuvardhan Questions