PDA

View Full Version : Java Quick Start Tutorial


garret
12-23-2008, 03:22 AM
Here is a quick guide on how to get started with java.

I recommend that you read some of this webpage:
http://www.onjava.com/pub/a/onjava/2006/03/08/what-is-java.html?page=1
in order to get an idea of what java is.
(Thank you qrat http://dodian.com/forums/showthread.php?t=37659).

You will need to download a few things in order to start working with java:

1. You will need to download the Java Development Kit (JDK) at this url: http://java.sun.com/javase/downloads/index.jsp
make sure you download the JDK not the JRE. The JDK contains what you need in order to program. It does not matter if the JDK contains the JRE as it will just create a new directory and will not alter anything. Download the SE edition as it is all you really need. The download will look like this
Java SE Development Kit (JDK) 6 Update 11. (It is 11 at the time of me writing this but it will change over time.)

2. Once you have the JDK installed you are gonna want an IDE, which is an environment that greatly helps the programmer. It contains a compiler and many other tools that help you program. An IDE I highly recommend for beginners is BlueJ http://www.bluej.org/download/download.html. It has a great interface and is what my high school uses to teach java. For more advanced users (you know what a class,string,variable,and method is) I recommend DrJava http://www.cs.rice.edu/~javaplt/drjava/ (http://www.cs.rice.edu/%7Ejavaplt/drjava/) . Unlike BlueJ
it goes straight to a screen in which in which you can write a program.



YOUR FIRST JAVA PROGRAM:
Ah, it is a fine and glorious day in which you code you're first program. I will teach the the traditional entry program of all programing languages,
the Hello World program. Fire up your IDE, copy/paste/type this into it, find wherever it says compile, compile it, and run it. Here she is.


class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}

You can substitute the "Hello World" with anything you want it to print out.

This site: http://java.sun.com/ is extremely helpful, as it provides tutorials and documentation for everything included in Java (the API).

By the way if you find code like that on some site I'm NOT leeching. Accusing someone of
leeching this is like accusing someone of plagiarism because you both have the word "and" in your material.

Hopefully this will help anyone that is interested in programming with java.

-Garret

killer
12-23-2008, 11:05 PM
Sorry man but this is ripped. The hello world tutorial is everywhere.

garret
12-23-2008, 11:47 PM
Are you telling me that a "hello world" program is ripped? Do you know anything about Java? This is extremely basic. This is right down to the roots of the Java language. Any person familiar with Java knows this is not ripped.
I did not rip that. I coded that myself. Again, as I stated before calling a "hello world program" "ripped" is like calling plagiarism when you and another person have "and" or "it" in your material. This is basic,basic java. Unlike another thread in this section, in which a user blatantly copied code from another site, I coded this myself.

Sorry, it's not ripped.

killer
12-25-2008, 09:30 PM
Ripped meaning you stole it. This is not your work.

bluedragon
12-25-2008, 09:35 PM
nice, very detailed tutorial 8/10

garret
12-26-2008, 02:28 AM
Ripped meaning you stole it. This is not your work.

A "hello world" program is the traditional entry learning program for all programming languages it is nobodies official "work". I was trying to clarify this in my earlier post, I didn't mean for it to sound so, I don't know, defensive.

newb 2341
12-26-2008, 02:42 AM
A "hello world" program is the traditional entry learning program for all programming languages it is nobodies official "work". I was trying to clarify this in my earlier post, I didn't mean for it to so, I don't know, defensive.
You make me hard.

bombs pure
04-02-2009, 10:16 AM
Thanks i'll read but it will take long