UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

How do I execute the Java program?

Asked by Last Modified  

Follow 4
Answer

Please enter your answer

Computer Programming Trainer & Instructor

if using command prompt - run that command java program file name ( make sure java class name and file name should be same) if using text-pad press ctrl+1 if using netbeans press run button etc.
Comments

Sr. Software Engineer at Bureau Veritas, former Sr. Software Consultant at Aptech Malviynagar

Write following command Ex: class Test { public static void main(String args) { System.out.println("Hello UrbanPro!!"); } } Save as ---------- Test.java To Compile: open command prompt where you have saved the above code D:\>javac Test.java To Run/Execute ------------------ D:\>java...
read more

Write following command 

Ex:

class Test

{

        public static void main(String[] args)

        {

                   System.out.println("Hello UrbanPro!!");

        }

}

Save as

----------

Test.java

To Compile:

open command prompt where you have saved the above code

D:\>javac Test.java

To Run/Execute

------------------

D:\>java Test

Good Luck!!

 

 

read less
Comments

Tutor | Python | Data Science | Machine Learning Trainer | Pandas | R | C | C++ | Computer Classes

javac nameofprogram.java java nameofprogram note***:Name of program should be same as that of your class name having main method *** above steps are used to execute programs on command line
Comments

Sr. Software Engineer at Bureau Veritas, former Sr. Software Consultant at Aptech Malviynagar

Suppose Following is the Code class Test { public static void main(String args) { System.out.println("Hello Java!"); } } Save this Program as: Test.java Open the Command Prompt where you have saved the program Now Type Following javac Test.java...
read more
Suppose Following is the Code class Test { public static void main(String[] args) { System.out.println("Hello Java!"); } } Save this Program as: Test.java Open the Command Prompt where you have saved the program Now Type Following javac Test.java //To Compile java Test //To Run Good Luck!! read less
Comments

Advance Excel And VBA Training

Let's say your file is in C:\mywork\ Run Command Prompt C:> cd \mywork This makes C:\mywork the current directory. C:\mywork> dir This displays the directory contents. You should see filenamehere.java among the files. C:\mywork> set path=%path%;C:\Program Files\Java\jdk1.5.0_09\bin This...
read more
Let's say your file is in C:\mywork\ Run Command Prompt C:> cd \mywork This makes C:\mywork the current directory. C:\mywork> dir This displays the directory contents. You should see filenamehere.java among the files. C:\mywork> set path=%path%;C:\Program Files\Java\jdk1.5.0_09\bin This tells the system where to find JDK programs. C:\mywork> javac filenamehere.java This runs javac.exe, the compiler. You should see nothing but the next system prompt... C:\mywork> dir javac has created the filenamehere.class file. You should see filenamehere.java and filenamehere.class among the files. C:\mywork> java filenamehere This runs the Java interpreter. You should then see your program output. If the system cannot find javac, check the set path command. If javac runs but you get errors, check your Java text. If the program compiles but you get an exception, check the spelling and capitalization in the file name and the class name and the java HelloWorld command. Java is case-sensitive! read less
Comments

Computer Teacher

In net beans or Eclipse or writing program in notepad and exhecuting in command prompt using particular commands for compile run etc
Comments

View 4 more Answers

Related Questions

Is the C language required to learn Java?
No, learning C is not a strict requirement for learning Java. Java and C are distinct programming languages with different syntax, features, and purposes. While having a background in C can provide a solid...
Akhilesh
0 0
7
How do I learn C programming by videos or books?
BOOKS AND PRACTICE by far remain the best way for learning any language ....
Fgrefg
0 0
5
How can I make my C programming basics strong?
Practise more programs on each and every topic of C.
Mohit
0 0
5
What is the difference between #include< > and #include" "
first one is used for predefined header files.. and second is used for user defined header files
Priya
1 0
6
How can I improve my C language skills so that if anyone asks me any questions about C, I can have the answer to those particular questions?
There are types of questions asked in this sector. 1.Related to Syntax and theoretical. For this you have to have a sound knowledge of the language. 2.Related to programming and output's. For this...
Furqankhan
0 0
5

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Basics Of C And C++
C++ is powerful, highly flexible, and adaptable programming language that allows software engineers to organise and process information quickly and effectively. But this high-level language is relatively...

Everything about printf in C language
What is printf and from where it comes from in C code.? You must have used printf so many times in your Car programs but do you really know everything about printf? Let's see. What is the full form...

PRACTISE makes you PERFECT ; ; ; There is no SUBSTITUTE for HARD WORK ;;;;Breathe SUCCESS like OXYGEN
Proper Planning ( reg what portions to be covered today) revising today's class portions & clarifying doubts solving Maths problems regularly ,noting down formulae separately trying to understand...

All About Programming And A Good Programmer.
Hi, This is my first lesson for you guys. Hope you enjoy reading it. In recent community questions, I found many people wanted to be good programmers, or wanted to have good hands on certain language,...

What Are IT Industries Performance Metrics?
1. Outstanding Expectation: Eligible to get Promotion easily and good salary hike. Always preferrable to go abroad. 2. Exceed Expectation: Can get Promotion as per schedule of company with good salary...

Recommended Articles

Brilliant Academy is one of the reputed institutes for B.Tech tuition classes. This institute is specialised in delivering quality tuition classes for B.E, Engineering - all streams and Engineering diploma courses. Incorporated in 2012, Brillant Academy is a brainchild of Mr Jagadeesh. The main motto of the academy is to...

Read full article >

Lasya Infotech is a Hyderabad based IT training institute founded in 2016 by O Venkat. Believing in his innovation, passion and persistence and with a diverse blend of experience, he started his brainchild to deliver exemplary professional courses to aspiring candidates by honing their skills. Ever since the institute envisions...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more