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

How can I make my C programming basics strong?
Practise more programs on each and every topic of C.
Mohit
0 0
5
Are C Programmers currently in demand?
Ofcourse, C is alwasy in demand. In the beginning a lot of the big project developed in C language. Now a days, there are a lot of language in market and speciallity is growing in IT field. For a big organization...
Harsha
what are type qualifiers in c language
The type qualifiers/modifiers in C language are used to alter the meaning of basic data types. These can be divided into 3 categories: 1. Size modifiers a. short (default) b. long 2. Sign modifiers a....
Mahesh
Is it necessary to learn data structures in C language only?
data structure helpful to improve your coding stability
Vikas
0 0
8
What are the types of linkages in C Programming?
EXTERNAL,INTERNAL,NONE are 3 types of linkage in C programming
Akash
0 0
9

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

Ask a Question

Related Lessons

Can we store different data types in a stack?
Yesterday, one of my Facebook friend asked me this question. My answer is "yes", and in this post I will discuss how could we do this.I am a great supporter of working with unions and I will be using union...

Basic Concepts of Web Designing
An introduction to domain names, web servers, and website hosting 1)What is the web? In a nutshell, the web is a whole bunch of interconnected computers talking to one another. The computers (on the...

Datatypes in C Language
Data types in C Language Data types specify how we enter data into our programs and what type of data we enter. C language has some predefined set of data types to handle various kinds of data that...

Operators in C
Operators in C Operator: An operator is a symbol that tells the compiler to perform certain mathematical or logical calculations. Operators are used in programs to manipulate data and variables. The...

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