Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Running Java.

Posted on 2002-05-24
4
177 Views
Last Modified: 2010-07-27
I am new in Java, I am stil learning its constructs.
I will like to know how to run a program in Java.
I only know a bit of pascal, and I will like to know Java, hope you will provide me with steps followed as well as a short program to practice on.
0
Comment
Question by:Moagi
  • 3
4 Comments
 
LVL 1

Expert Comment

by:raid999
ID: 7031830
you need to have a JDK or SDK download them from http://www.java.sun.com/

for an introduction to java have a look at this
http://www.ibiblio.org/javafaq/course/index.html

and for some short programs and goog tutorials go to
http://java.sun.com/docs/books/tutorial/

if you download a JDK i think the latest is 1.4.0
to compile from command prompt write
javac filename.java

and to run the program
java filename

in java your filename has to be the same as the class name

like if you have
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); //Display the string.
    }
}

your filename has to be HelloWorldApp.java
when you compile it you will see another file with the same name but .class that is the bytecode when you run it you dont put the .class just the file name after "java".
0
 
LVL 1

Accepted Solution

by:
raid999 earned 50 total points
ID: 7031836
to edit java code you can use notpad or you can use some editors like jcreator
http://download.com.com/3000-2212-7956957.html?tag=lst-0-6
0
 

Author Comment

by:Moagi
ID: 7056414
Well the emphasis on the filename, the name of the class
steps on how to run and deburg are well illucidated. But I would like to undersand what does the word class result or basically mean.ie does it mean an entity or is just a name choosen by the programmer?
0
 
LVL 1

Expert Comment

by:raid999
ID: 7056704
Why B man?
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question