?
Solved

Running Java.

Posted on 2002-05-24
4
Medium Priority
?
180 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
[X]
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
  • 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 150 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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 third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month12 days, 2 hours left to enroll

752 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