The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > General Programming > Java


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Tags: , , , ,

Reply
 
LinkBack (19) Thread Tools    Display Modes   
  19 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 06-14-2007, 11:12 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
Programming Expert
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,111
iTrader: (0)
HelloWorld will become famous soon enoughHelloWorld will become famous soon enoughHelloWorld will become famous soon enough
Icon13 Tutorial: How to start Java programming?

Haha! at the beginning I was about to write tutorial about inheritance and polymorphism, but I guess it's going to be too long and boring. So, instead I'm just going to create the tutorial for Java newbie (including me )

JAVA JDK 1.6

Can be downloaded at: https://sdlc5a.sun.com/ECom/EComActi...0 B1077E6CDE3

Before we're going further. Once the installation finished, go to command line, and type java and see if there's anything comes up. It's a good thing if there's something that comes up. If there's nothing happen, there are various reasons.

Once you're done installing, probably the best way is to setup your path, so that you can compile java easily

HOW TO SETUP JAVA PATH

1. Go to your control panel (I'm sure that you know how to go there)
2. Right click on System, then choose Properties
3. Find Advanced Tab (I'm now using Vista, but I remembered that there's advanced tab on Windows XP)
4. Environment Variables...
5. On the System Variables section, select CLASSPATH, and then click EDIT. Add a "." (period, without " ") before whatever is there, or after whatever is there. Make sure you seperate them with ";" (colon, without " ")
6. also on System Variables section, select Path, and then click EDIT. Add "C:\Program Files\Java\jdk1.6.0\bin;" or "C:\Program Files\Java\jdk<version>\bin;" (you substitute <version> with your JDK version, and of course without " ", and ";" is to seperate whatever is there with the new one that you just added.
7. Click Ok to everything to close them.

Now, let's find out whether your setup is working

1. Open notepad
2. Write below codes:

PHP Code:
public class ProgrammersTalk {
         
public static void main(String args[]) {
                
System.out.println("PT is the BEST!");
         }

3. Save the file As .. ProgrammersTalk.java to wherever folder you want
4. Go to command line, then go to folder that you want

Code:
REMINDER:
cd - to change directory
cd .. - to go down one directory
5. Once you're in the folder where the ProgrammersTalk.java is at go type:

Code:
javac ProgrammersTalk.java
6. It's suppose to compile if you wrote the code correctly. And then once it's done compiling, type DIR to see what's inside your directory. and there suppose to be .class file in there as the result of the compiled .java file.
7. Type java ProgrammersTalk


__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!

Last edited by HelloWorld : 06-14-2007 at 11:18 PM.
Reply With Quote
Reply


Thread Tools
Display Modes

   Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.programmerstalk.net/thread723.html
Posted By For Type Date
best tutorial - Java This thread Refback 07-05-2007 09:13 PM
best tutorial - Java This thread Refback 06-17-2007 11:04 PM
Digg / Programming / Upcoming This thread Refback 06-15-2007 10:49 PM
Digg / News / Upcoming This thread Refback 06-15-2007 10:35 PM
Digg / Programming / Upcoming This thread Refback 06-15-2007 07:38 PM
Digg / News / Upcoming This thread Refback 06-15-2007 06:04 PM
Free Stumbles for all This thread Refback 06-15-2007 04:58 PM
Digg / Technology / Upcoming This thread Refback 06-15-2007 03:08 PM
Digg / Technology / Upcoming This thread Refback 06-15-2007 12:02 PM
Digg / News / Upcoming This thread Refback 06-15-2007 11:03 AM
Digg / Programming / Upcoming This thread Refback 06-15-2007 10:10 AM
Digg / Programming / Upcoming This thread Refback 06-15-2007 08:19 AM
Digg / News / Upcoming This thread Refback 06-15-2007 07:14 AM
Digg / Programming / Upcoming This thread Refback 06-15-2007 06:32 AM
Digg / Programming / Upcoming This thread Refback 06-15-2007 01:15 AM
Digg / Technology / Upcoming This thread Refback 06-15-2007 12:52 AM
Digg / News / Upcoming This thread Refback 06-14-2007 11:42 PM
Digg - Java Starter Kit This thread Refback 06-14-2007 11:19 PM
Digg / News / Upcoming This thread Refback 06-14-2007 11:19 PM


All times are GMT -7. The time now is 07:59 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50