Help with installing Java

noagname

Senior member
Jan 4, 2006
295
0
0
I have a book to learn Java, and need to download the SDK. When I go to their site, I have trouble finding what I need - I don't want 50 things bundled with it or 20 new programs they want to push. I just want the SDK so I can compile in command line and run in command line, nothing more than that. I'm a Windows XP user and don't care if it's an older version even. I just want to be able to use the javac and java command in command prompt. Can someone here help me get started? I'm just starting to learn and this seems to be more complicated than the programming language itself...
 

noagname

Senior member
Jan 4, 2006
295
0
0
I installed the JDK, I think it's the right one now, but how do I create a javac command to compile a program with?
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
If you open a command line, javac should already be available (I believe installing the Java SDK puts javac in your path).
 

aceO07

Diamond Member
Nov 6, 2000
4,491
0
76
I would recommend using an IDE (integrated development environment) to do coding in. That would help you by providing code completion. It will let you see what methods are available and pull up docs. Try Eclipse first, if that's too much try Netbeans.
 

GoatMonkey

Golden Member
Feb 25, 2005
1,253
0
0
Books always walk you through command line compiling first. That's a nice thing to know how to do, but once you've done it a couple of times you should probably move on. With any project that has more than a few files a nice IDE that handles the compiling will really help you out. If you go with Eclipse you're probably going to want to make a simple Ant script for compiling. After you have set it up once for a project you probably won't have to touch it again.
 

mundane

Diamond Member
Jun 7, 2002
5,603
8
81
Originally posted by: GoatMonkey
Books always walk you through command line compiling first. That's a nice thing to know how to do, but once you've done it a couple of times you should probably move on. With any project that has more than a few files a nice IDE that handles the compiling will really help you out. If you go with Eclipse you're probably going to want to make a simple Ant script for compiling. After you have set it up once for a project you probably won't have to touch it again.

Eclipse manages all of the ant stuff for you. I should know, I've used it as a crutch to avoid actually learning the tools for too long
 

txrandom

Diamond Member
Aug 15, 2004
3,773
0
71
Originally posted by: noagname
I installed the JDK, I think it's the right one now, but how do I create a javac command to compile a program with?

You should be able to just use javac and java straight from the command prompt. You probably don't have the path set up right. Try googling for how to do that.
 

aceO07

Diamond Member
Nov 6, 2000
4,491
0
76
Originally posted by: mundane
Originally posted by: GoatMonkey
Books always walk you through command line compiling first. That's a nice thing to know how to do, but once you've done it a couple of times you should probably move on. With any project that has more than a few files a nice IDE that handles the compiling will really help you out. If you go with Eclipse you're probably going to want to make a simple Ant script for compiling. After you have set it up once for a project you probably won't have to touch it again.

Eclipse manages all of the ant stuff for you. I should know, I've used it as a crutch to avoid actually learning the tools for too long

Just curious, but what aspects of the tools did you feel you needed to know? I've used it for a few very small compiles, and some of the other tools as well. Most of my work is done in some IDE.
 

stevf

Senior member
Jan 26, 2005
290
0
0
quote:

--------------------------------------------------------------------------------
Originally posted by: noagname
I installed the JDK, I think it's the right one now, but how do I create a javac command to compile a program with?
--------------------------------------------------------------------------------



You should be able to just use javac and java straight from the command prompt. You probably don't have the path set up right. Try googling for how to do that

Yes, assuming you installed JDK correctly it should have the path set right. to compile your program make sure you are in the directory with your .java file and type:

javac YourProgramName.java

the file name is case sensitive and you need the .java extension. Once you got it compiled to run it you use:

java YourProgramName

you dont need the .class extension when you type this name but as above you must get the case correct

hope that helps
 

aceO07

Diamond Member
Nov 6, 2000
4,491
0
76
The latest version of java is 1.6u2. However, for what you're doing. 1.4 is good enough. It might be good since some classes that you may use might have been deprecated in later versions.

It looks like you need add the installation folder into your PATH environment variable for Windows.. go to Control Panel -> System -> Advanced -> Environment Variables. Edit the line that says 'path' and add the java installation folder + the bin folder. like this path = C:\utils;C:\fobar;C:\Java\jdk1.5.0_06\bin;

If you don't do this, you'll need to reference the full path to the javac executable everytime you want to use it.

edit: I type slow.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |