Help on the necessary tools to start programming in Java

J

JavaScriptJon

Hello all,

I am very keen to start learning a new programming language and have
chosen Java as it is more productive than the previous language i have
learnt.

I have chosen a book to start learning from but the CD Rom is missing
which contains the necessary tools and libraries etc to install for me
to begin.

I have already installed the following from the main java website:

Java(TM) 2 Platform Standard Edition
Runtime Environment
Version 5.0

I have installed this program and then tried to compile a program in
Command Prompt after saving a file as myProgram.java.

I used the following line to start....

vi myProgram.java

I found this didnt do a thing.

The question i am asking is, do i have all the necessary tools to start
and how do i actually compile a program.

Thanks for the time taken in reading this article.

Jonathan
 
F

Francesco Devittori

JavaScriptJon said:
Hello all,

I am very keen to start learning a new programming language and have
chosen Java as it is more productive than the previous language i have
learnt.

I have chosen a book to start learning from but the CD Rom is missing
which contains the necessary tools and libraries etc to install for me
to begin.

I have already installed the following from the main java website:

Java(TM) 2 Platform Standard Edition
Runtime Environment
Version 5.0

I have installed this program and then tried to compile a program in
Command Prompt after saving a file as myProgram.java.

I used the following line to start....

vi myProgram.java

I found this didnt do a thing.

The question i am asking is, do i have all the necessary tools to start
and how do i actually compile a program.

Thanks for the time taken in reading this article.

Jonathan

'vi myProgram.java' launches the vi editor. You can use any editor you
like. If you are on windows notepad, on linux use emacs or wathever (vi
is maybe not the easiest one).
to compile your program: javac myProgram.java
to run your program: java myProgram
 
V

Viator

In addition to what others have said you can install Eclipse IDE which
is free. Although, it will take some time to learn it fully it is
better to start early.

Amit :)
 
R

ricky.clarkson

Newbies shouldn't use IDEs. [1]

In a course I taught, the students quickly demonstrated their lack of
ability to use command lines, so we used BlueJ.

BlueJ quickly demonstrated its lack of ability to work, so the next
course used JCreator.

JCreator worked pretty well, but I'd still suggest using the command
line at the start.

Unfortunately, our systems are poorly set up, so every time they start
cmd.exe they need to do set PATH=%PATH%;c:\java\whatever

This added complication puts students off using cmd.exe. Plus, none of
them already know the nice stuff that it offers, such as history and
tab-completion.

Cygwin would be even better, but again it might require too much
instruction before getting started.

[1] http://jqa.tmorris.net/GetQAndA.action?qids=52&showAnswers=true
 
Z

zero

Hello all,

I am very keen to start learning a new programming language and have
chosen Java as it is more productive than the previous language i have
learnt.

I have chosen a book to start learning from but the CD Rom is missing
which contains the necessary tools and libraries etc to install for me
to begin.

I have already installed the following from the main java website:

Java(TM) 2 Platform Standard Edition
Runtime Environment
Version 5.0

I have installed this program and then tried to compile a program in
Command Prompt after saving a file as myProgram.java.

I used the following line to start....

vi myProgram.java

I found this didnt do a thing.

The question i am asking is, do i have all the necessary tools to start
and how do i actually compile a program.

Thanks for the time taken in reading this article.

Jonathan

You seem to be using Windows XP, so vi won't work - it's a linux tool.

In addition to the runtime environment that you already installed, you'll
need:

1. The JDK (look for JDK 5.0 at sun's downloads page). This is the one
that actually compiles the programs you write.
2. A text editor. Notepad will do, but there are better options. I
suggest textpad, www.textpad.com - but there are others of course.
3. remember that your filename must be *exactly* the same as the class
name - including capitalization. And, by convention, class names should
start with a capital letter, so use MyProgram.java instead of
myProgram.java.
4. a bookmark to http://java.sun.com/j2se/1.5.0/docs/api/ That's where
you'll find the details of the java libraries.
5. dedication

Good luck :)
 
Z

zero

Newbies shouldn't use IDEs. [1]

In a course I taught, the students quickly demonstrated their lack of
ability to use command lines, so we used BlueJ.

BlueJ quickly demonstrated its lack of ability to work, so the next
course used JCreator.

JCreator worked pretty well, but I'd still suggest using the command
line at the start.

Unfortunately, our systems are poorly set up, so every time they start
cmd.exe they need to do set PATH=%PATH%;c:\java\whatever

This added complication puts students off using cmd.exe. Plus, none of
them already know the nice stuff that it offers, such as history and
tab-completion.

Cygwin would be even better, but again it might require too much
instruction before getting started.

[1] http://jqa.tmorris.net/GetQAndA.action?qids=52&showAnswers=true

May I suggest TextPad (people who read this group regularly must be getting
pretty tired of me saying that). If textpad is installed after the JDK, it
will automatically add items in the menu to compile & run java applets &
applications. This works well for the the type of projects new java
students get: they can type the code, compile and run all in one place,
without having the downsides of a complete IDE. I have encountered
problems when using multiple packages, but I'm sure these can be resolved
if you check out textpad's configuration. And you normally wouldn't cover
custom packages too early in the course anyway.
 
J

JavaJon

I would like to thank everyone on their rather suprisingly quick
replies on this subject.
I will go through the steps stated by 'zero' and hopefully be up and
programming in no time.

Thanks for your time and support.
Jonathan
 
H

hilz

May I suggest TextPad (people who read this group regularly must be getting
pretty tired of me saying that). If textpad is installed after the JDK, it
will automatically add items in the menu to compile & run java applets &
applications. This works well for the the type of projects new java
students get: they can type the code, compile and run all in one place,
without having the downsides of a complete IDE. I have encountered
problems when using multiple packages, but I'm sure these can be resolved
if you check out textpad's configuration. And you normally wouldn't cover
custom packages too early in the course anyway.

TextPad is not free. Why should anyone pay a penny to learn java?


the best way to start (in my opinion ofcourse) is the command line, and
the tutorials at java.sun.com
On windows, notepad should be enough, or maybe notepad2
(http://www.flos-freeware.ch/notepad2.html) which is free and has syntax
hilighting.

once one is comfortable with the command line, it will be time to try
one of the free IDE's (such as Netbeans or Eclipse) that will make life
easier and has more features such as easier compiling, debugging, code
completion, on-the-fly javadoc, etc. etc.

thanks
 
I

IchBin

hilz said:
TextPad is not free. Why should anyone pay a penny to learn java?


the best way to start (in my opinion ofcourse) is the command line, and
the tutorials at java.sun.com
On windows, notepad should be enough, or maybe notepad2
(http://www.flos-freeware.ch/notepad2.html) which is free and has syntax
hilighting.

once one is comfortable with the command line, it will be time to try
one of the free IDE's (such as Netbeans or Eclipse) that will make life
easier and has more features such as easier compiling, debugging, code
completion, on-the-fly javadoc, etc. etc.

thanks
I agree with hilz, but for an IDE I would start out with either JGRASP
or BlueJ before Netbeans or Eclipse. Both where developed and being used
at university. BlueJ to learn the OOD\OOP side of Java.

http://www.bluej.org/
http://www.eng.auburn.edu/department/cse/research/grasp/

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top