Solved

Running Java.

Posted on 2002-05-24
4
175 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Why B man?
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now