Home Tutorialhelp Comment Running And compiling a java program

 
 

Comment

daawar khan
Running And compiling a java program,
November 7, 2008 at 12:49 AM

The bin directory is inside the jdk which you had just installed and which is required for compiling and running java programs.
'javac' and 'java' commands will only execute when you are inside the bin directory.So do one thing search for your jdk folder where it is installed , cut it and paste it under "C:\" directory(You can choose any other location as well but it is for simplicity). Now goto run, type cmd press enter.
The dos-prompt console appears. Now type the command
'cd C:\jdk\bin' (inverted commas are not included in the command ). Now there you are inside the bin directory of jdk and now you can easily compile your program as: javac filename.java
And to run the program afet succesfull compilation
type: java filename.

I believe this post was useful for the beginners who were not able to compile their programs.
For further doubts or queries you can mail me at
daawar@gmail.com

View All Comments | View Tutorial
Advertisement
Related Tutorial and Articles
Java Beginners

process of compiling and running java program
process of compiling and running java program  Explain the process of compiling and running java program. Also Explain type casting 

General

Compiling and Running Java program from command line
Compiling and Running Java program from command line - Video tutorial... of compiling and running java program from command line. We have also video... the process of compiling and running the Java program from command prompt 

Java Beginners

error while compiling - Java Beginners
error while compiling  i am facing problem with compiling and running a simple java program, can any one help me, the error i am getting is javac is not recognised as internal or external command  Check if you JAVA_HOME 

Java-Tutorials

Compiling and Interpreting Applications in Java
following topics: Compiling Java Program Interpreting Java Program Compiling Java Program For compiling Java program, first your code must write... files, which are Java byte code. Interpreting and running Java Program 

Java Beginners

Running core java program
Running core java program  I am jayesh raval. I am going to make simplae program and at the time of runnint that program I found class not found exception. I have clear source of that program and that is right in the syntax. so 

Java Beginners

Compiling package in command line
how to compile it. Thanks & Regards, Sham   Compiling Java...Compiling package in command line  Hi friends, i am totally new to java programming, i am basic learner in java. My query is, How to compile java 

Java Beginners

Error While Compiling - Java Beginners
Error While Compiling  Hi All I Am a beginner and i face the following problem while compiling can anyone help me. C:\javatutorial\example>... command, operable program or batch file. C:\javatutorial\example>   

Java Beginners

Compiling Error - Java Beginners
Compiling Error  cant able to compile java servlet file in the command prompt? WHY? but i can compile normal java file give me answer to fix my problem 

Java Beginners

Waiting for ur quick response
Waiting for ur quick response  Hi, I have two different java... to run it java A The output is: Hai This part is completed. Now i ll go to the next program File name:moon.java Then the code is here: Class 

Java Beginners

Compiling Error - Java Beginners
Compiling Error  cant able to compile java servlet file in the command prompt? WHY? but i can compile normal java file give me answer to fix my problem.  Hi Friend, Do you have servlet-api.jar in the lib folder 

Java Tips and Examples

Quick Sort In Java
Quick Sort in Java      ...;java QuickSort RoseIndia Quick Sort... to sort integer values of an array using quick sort. Quick sort algorithm 

WebSevices Questions

program is not running in Eclipse.... - WebSevices
program is not running in Eclipse....  Hi i following the tutorial for eclips in roseindia. I am able to creat the simple java application but when i am clicking windows->show view->console then i am getting the console 

Java Beginners

Java Not running - Java Beginners
Java Not running  Hi, I tried to create a grade(type array) and final_grade (type of String) program using getter/setter but not want a public setter method for final_grade; Here is my program that calcuate the average of all 

JSP Servlet Questions

compiling a uploaed java file - JSP-Servlet
compiling a uploaed java file  How a uploaded java source file is automatically compiled(i.e converted to .class file) in server using jsp/servlet 

Java Beginners

Building and Running Java 8 Support
Building and Running Java 8 Support  As you know Java 8 is already released and available for download. Now I am developer of Java based projects. So... 8 for compiling and running your applications. Check the tutorial for complete 

General

Tomcat Quick Start Guide
Tomcat Quick Start Guide       This tutorial is a quick reference of starting development application using JSP, Servlets and JDBC technologies. In this quick and very 

Java Beginners

Running Batch files in java - Java Beginners
are sending you some sample program code for running batch (.bat) file in Java. We have...Running Batch files in java  Hi, I am writing a program which reads a windows batch file and executes it. The program should read each 

RMI Questions

Java Compilation and running error - RMI
Java Compilation and running error   The following set of programs runs with the lower versions of Java 6 update 13, but not with JAVA 6 update 13... showing problem. Please tell me why I am unable to run this program with Java 

Java Tips and Examples

Quick Sort in Java
Quick sort in Java is used to sort integer values of an array... into a sorted array. Example of Quick Sort in Java: public class QuickSort... QuickSort.java C:\array\sorting>java QuickSort RoseIndia Quick Sort 

Java-Tutorials

Quick Sort in Java
Quick Sort in Java Quick Sort in Java is used to sort elements of an array. Quick sort works on divide and conquer strategy and comparison sort... in Java works? Quick Sort algorithm works on comparison sort that means 

Java Beginners

Running Java Applications as software
Running Java Applications as software   Please tell me what to do if you want your java application to run like a real software,eg a java GUI application that connects to the database(Mysql)running on the computer like any other 

Java Beginners

running java with classpath in cygwin
running java with classpath in cygwin  The following command works in cmd.exe but failts in cygwin shell. java -cp .;oracle.jar;mysql.jar Executecmd query value; how should i alter the command to run in the bash shell?thanks 

Java Beginners

How to compile and run Java program
, For compiling and running the Java program from command prompt you should must have JDK... tutorial Compiling and Running Java program from command line. If Java...How to compile and run Java program  How to compile and Java program 

EJB Tools

J2EE Tutorial - Running RMI Example
;/html>   How to compile and run the RMI-IIOP program? 1) We require jndi package for running this program.  ... J2EE Tutorial - Running RMI Example     

Blog

Struts Quick Start
Struts Quick Start Struts Quick Start to Struts technology In this post I will show you how you can quick start the development of you struts based project... applications in Java technology. Struts is one of the most used framework 

JUNIT Questions

Running JUnit
Running JUnit  Hi sir How can we run JUnit or Run test case Using JUnit using command prompt or CMD? Is there any alternate way of running test cases?   ou can run JUnit test case by running following command on CMD 

JUNIT Questions

Running JUnit
Running JUnit  Hi sir How can we run JUnit or Run test case Using JUnit using command prompt or CMD? Is there any alternate way of running test cases?   Hi friend You can run JUnit test case by running following 

Java Beginners

Trouble in running Dos Command from Java Servlet
Trouble in running Dos Command from Java Servlet  Hello All, I have to run following command from Java. The command is : vscanwin32 /S C:\Test > C:Scan_Result.txt vscanwin32 is resided at location: C:\Program Files\Trend 

Development process Questions

Running Java Applications as a Windows Service
Running Java Applications as a Windows Service  sample code for "Run a Java application as a Windows Service 

Java Beginners

About running the Tomcat Server
About running the Tomcat Server   HI I want to run a simple program on servlet and the application is a simple program Hello world... and lib and web.xml folders. Now i compiled Helloworld program in myapps 

Java Beginners

Running and deploying Tomcat Server
Running and deploying Tomcat Server  HI Somebody has given... described below I want to run a simple program on servlet and the application is a simple program Hello world to print on Internet browser. And the directory 

Java Beginners

error while running the applet - Java Beginners
is correct but u have problem in running the program. You follow the following steps...error while running the applet  import java.applet.Applet; import...); ++num; } } } } i have problem while running the code , error 

Java Beginners

i need a quick response about array and string...
i need a quick response about array and string...  how can i make a dictionary type using array code in java where i will type the word then the meaning will appear..please help me..urgent 

Java Beginners

program not compiling
program not compiling  Hello can you help me with this program,I am trying to add a loop at the end of the program but it is not compiling,thank you. import java.util.*; import java.text.*; class HardwareItems { String code 

Java Beginners

About running the Applet Program
About running the Applet Program  Hi I have composed an Applet Program and compiled the program, until that it is fine but how to run the Applet program(compiling i typed as javac AppletDemo.java)? Is compiling 

Java Beginners

About running the Applet Program
About running the Applet Program  Hi I have composed an Applet Program and compiled the program, until that it is fine but how to run the Applet program(compiling i typed as javac AppletDemo.java)? Is compiling 

Java Server Faces

The quick overview of JSF Technology
;    The quick Overview of JSF Technology This section gives you an overview of Java Server Faces technology, which simplifies the development of Java Based web applications. In this JSF 

Java Beginners

Server running Button - Java Beginners
Server running Button  Hi there, I have a created a GUI using NetBeans IDE 6.1. The aim of this interface is to display the messages that have been recived by the server , when the client is connected , in the textArea 

Free Magazine

Quick introduction to web services
Quick introduction to web services      ... program. Web Services allows different applications to talk to each other... talk to java web services and vice versa. So, Web services are used 

Java Beginners

how to run a java program using run.exec()?
how to run a java program using run.exec()?  Hi..i want to compile and run a java file using run.exec().i.e., without compiling and running from.... can i expect a sample java program using run.exec(). Thanking you 

Java-Tutorials

First Java Program
your first Java program. In Java, all source code is written in plain text file... Machine. You can write a Hello World program as your first Java program. To write... sure the JDK is already installed on your machine for compiling and running 

General

First Java Program
First Java Program       In this section you will learn how to develop your first Java program... Machine.  You can write a Hello World program as your first Java 

Java-Tutorials

Sample Java program for beginners
installed in your machine for compiling and running the program. The first program...Here beginners in Java can learn to create there first Hello World program..., a programmer is ready to create their own Java program. Here we have also described 

JSP Servlet Questions

problem running a servlet on tomcat.
problem running a servlet on tomcat.  i have followed the steps given... suppose that should mean that my tomcat server is up and running. but whn i try..., the browser responds "HTTP Status 404 - /java_mail/hello" wht could 

Java Beginners

java program for
java program for   java program for printing documents,images and cards 

JSP Servlet Questions

java web application without running tomcat
java web application without running tomcat  I did a project by using jsp,html,javascript,css,tomcat,editplus and MSAccess as backend..i created set... is there any way to run the web application(only in single system)without running 

Swing AWT

Java Program
Java Program  A Java Program that print the data on the printer but buttons not to be printed 

Applet Questions

applet running but no display - Applet
applet running but no display  Hai, Thanks for the post. I have applied the codebase url in the page and executed. Now, when accessed the page... strDefault = "Hello! Java Applet."; public void paint(Graphics g) { String 

Java Beginners

a Java program
a Java program    Write a Java program to print even numbers from 2 to 1024? Write a Java program to print ? My Name is Mirza? 100 times? Write a Java program to print Fibonacci Series? Write a Java program to reverse a number 

Java Tips and Examples

Hello world (First java program)
Compiling and Running the program Now open the command prompt to compile... Hello world (First java program)   ... to develop the robust application. Java application program is platform independent 

Applet Questions

java program
java program  Write a program to create an applet and display The message "welcome to java 

Java Beginners

java program
java program  java program to implement the reflection of a particular class details like constructor,methods and fields with its modifiers 

Java Beginners

Java Program
Java Program  java program to insert row in excel sheet after identifying an object 

Java Beginners

java program
java program  write java program for constructor,overriding,overriding,exception handling 

Java Interview Questions

java program
java program  how to write an addition program in java without using arithematic operator 

Java Beginners

java program
java program  Write a java program to do matrix addition operation On two given matrices 

Java Beginners

java program
java program  Write a java program to find the number of Positive numbers in m* n matrix 

Java Beginners

java program
java program  write a java program to display array list and calculate the average of given array 

Java Beginners

java program
java program  write a java program to display array list and calculate the average of given array 

Java Interview Questions

java program
java program  write a program to print 1234 567 89 10 

Java Beginners

java program
java program  Write a program to demonstrate the concept of various possible exceptions arising in a Java Program and the ways to handle them.  ... in Java 

JSP Interview Questions

java thread program
java thread program  write a java program to find out the current running thread in a java program   public class RunningThreads{ public static void main(String[] args) { ThreadGroup group 

Java Interview Questions

java thread program
java thread program  write a java program to find out all the current running thread in a java program   public class RunningThreads{ public static void main(String[] args) { ThreadGroup group 

Java Beginners

Java program
Java program  How to write for drawing a face in java 

Java Beginners

Java program
Java program  How to write code in order to draw a face in java 

Java Beginners

Java program
Java program  How to write code in order to draw a face in java 

JavaScript Questions

java program
java program  wap to show concept of class in java 

Java Beginners

java program
java program  write a java program to compute area of a circle.square,rectangle.triangle,volume of a sphere ,cylinder and perimeter of cube using method over riding 

Java Beginners

java program
java program  write a java program to compute area of a circle.square,rectangle.triangle,volume of a sphere ,cylinder and perimeter of cube using method over riding 

Java-Tutorials

How to Write a Calculator Program in Java?
How to Write a Calculator Program in Java? In this Java Tutorial you will learn how to write a Calculator program in Java in easy steps. Calculator program..., subtraction, multiplication or division. In this example of writing program in Java 

Java Beginners

java program
java program  write a program to create text area and display the various mouse handling events 

Java Beginners

java program
java program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers 

Java Beginners

Java GUI Program - Java Beginners
Java GUI Program  How is the following program supposed to be coded... by Day 7 under a thread in your Team Forum called Week Three Program for 10 points... created by the application.   Hi friend, I am sending running code 

Java Beginners

Apache Server Running But project not deploying on server?
;C:\Program Files (x86)\PC Connectivity Solution\;C:\Program Files (x86)\Java...Apache Server Running But project not deploying on server?  May 27... in production environments was no t found on the java.library.path: C:\Program Files (x86 

Java Beginners

java program
java program  voter or non voter display 

Applet Questions

java program
java program  i want a applet program that accepts two input strings using tag and concatenate the strings and display it in status window. please give mi he code for this in core java 

Applet Questions

java program
java program  i want a applet program that accepts two input strings using tag and concatenate the strings and display it in status window. please give mi he code for this in core java 

Applet Questions

java program
java program  i want a applet program that accepts two input strings using tag and concatenate the strings and display it in status window. please give mi he code for this in core java 

Java Beginners

Java Program
Java Program  I want to Write a program in JAVA to display to create a class called MATRIX using a two-dimensional array of integers. Perform the addition and subtraction of two matrices. Help me 

Regex Questions

java program
java program  write a java program to create an array of size 10 by taking input from bufferreader and find out the average of array elements from that array 

Regex Questions

java program
java program  write a java program to create an array of size 10 by taking input from bufferreader and find out the average of array elements from that array 

Java Beginners

java program
java program  write a java program to create an array of size 10 by taking input from bufferreader and find out the average of array elements from that array 

Java Beginners

java program
java program  write a java program to read a file which hold email address validate email address tohave formate @.* and replace all .com email address 

Java Beginners

i want to copy files from one machine to other using java and the code will be running on third machine
i want to copy files from one machine to other using java and the code will be running on third machine  i want to copy some files from one machine say 'A' to some other machine say 'B' by using the java program running on third 

Core Java

Java Heap
Java Heap       The JVM's heap stores all the objects generating by a running Java program. Java uses... by the program. This keeps the programmer free from having to keep track of when to free 

Java Beginners

java program
java program  how to print in java following pattern 5 54 543 5432 54321 

Java Beginners

java program
java program   A B C D E F F E D C B A A B C D E E D C B A A B C D D C B A A B C C B A A B B A A A java program to display above triangle 

Java Interview Questions

java program
java program  write a program to read 10 numbers from user and store it in a array. display the maximum n minimum number in the array 

Java Beginners

java program
java program  write a program to create server and client such that server receives data from client using BuuferedReader and sends reply to client using PrintStream 

Java Interview Questions

program in java
program in java  write a reverse program in java using string buffer.the input and out put as follows. input- hi good mornig out put-ih doog ginrom 

Java Beginners

Java program
Java program  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results 

Java Beginners

java program
java program  Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall 

Java Beginners

java program
java program  . Develop the program calculatePipeArea. It computes the surface area of a pipe, which is an open cylinder. The program accpets three values: the pipes inner radius, its length, and the thickness of its wall 

Java Beginners

java program
java program  . Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any type of numeric values and returns the results 

Java Beginners

java
java  how to prepare the java   Hi Friend, If you want to learn how to install java, creating and running a java program then go through the following links: http://www.roseindia.net/java/beginners/index.shtml http 

Java Tips and Examples

Hello world (First java program)
and running. Hello world program is the first step of java programming  language... Hello world (First java program)   ... to develop the robust application. Java application program is platform 

JavaScript Questions

a java program
a java program  Write a java program that accepts positive numbers... through the link may, this will be helpful for you http://www.roseindia.net/java/thread/java-multithreading-example.shtml Thanks 

Java Beginners

java program
java program  accept two numbers and print their hcf 

Java Beginners

A java Program
A java Program  Write a java program, which provides a text area with horizontal and vertical scrollbar.Type some lines in the text area and use scrollbars to move the text within the text area.Read a word in a text field 

Java Beginners

java program
java program  write a java program to read a file content into a string object using available and read methods of java bufferedinputstream.   Please visit the following link: http://www.roseindia.net/java/example/java 

Advertisements Advertisements
 

 

 

DMCA.com