
-----------------------------------
kishan25
Sun May 31, 2009 3:22 pm

help please
-----------------------------------
can anyone tell me which program to download for java.
well I' am new t java, so can anybody tll me that from where can i download java for programming.

thank you

-----------------------------------
DtY
Sun May 31, 2009 3:50 pm

RE:help please
-----------------------------------
Wikibooks has an  article on compiling from the command line: https://secure.wikimedia.org/wikibooks/en/wiki/Java_Programming/Getting_Started

-----------------------------------
chili5
Sun May 31, 2009 7:34 pm

RE:help please
-----------------------------------
If you download Netbeans, it would come with the JDK and all the stuff you need to begin programming.

:)

-----------------------------------
WOIKeller
Sun May 31, 2009 10:30 pm

Re: help please
-----------------------------------
Honestly, call me archaic but I am strongly opposed to using NetBeans and other visual GUI IDEs. I much prefer the old fashioned notepad and command line compiler. But then this is probably due to the fact that my first computer ran DOS 5.0 :lol:

-----------------------------------
zspamz
Mon Jun 01, 2009 7:49 am

RE:help please
-----------------------------------
Try the java development tool

-----------------------------------
chili5
Mon Jun 01, 2009 2:53 pm

RE:help please
-----------------------------------
What Java development tool? ::confused:

-----------------------------------
Insectoid
Mon Jun 01, 2009 3:39 pm

RE:help please
-----------------------------------
It really depends on how much functionality you need. Some tools will run the compiler, have a built-in output window, will auto-complete method names, etc. Others, on the other hand, will just do syntax highlighting.

-----------------------------------
DemonWasp
Mon Jun 01, 2009 3:59 pm

RE:help please
-----------------------------------
To write Java code, you really only need a couple of things.

First, you need a text editor to read and write your Java files. You can use Notepad, but I would really recommend that you use something half-way competent. If you're on Windows (and you don't know vim) you should probably use 
public class HelloWorld {
    public static void main ( String

Copy-paste that into your text editor and save it as HelloWorld.java .

Open a command prompt (on Windows, use Start->Run, then enter "cmd.exe"). Use the cd command to navigate to the directory where you saved the file (and you can use the help command to learn more at any time).

Once you're in the same directory (you can check using the dir command). You can compile and run your program with the following (replacing HelloWorld.java with your own files; ignore the arrow, that's just the prompt):

[code]
> javac HelloWorld.java
> java HelloWorld
[/code]

The first line (javac...) runs the Java compiler on HelloWorld.java to produce HelloWorld.class. You can then use the Java runtime (java) on the second line to run it. You should see the output (Hello World) on the next line, followed by a new prompt.

There, you've just gotten yourself set up to start working in Java.
