Solved

Running Java.

Posted on 2002-05-24
4
178 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet filter example 37 85
java imports not found 4 52
spring maven example issues 3 44
maven not picking latest jar instead picking old jar from .m2 12 50
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

726 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