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
Amit :-)
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
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 :-)
--
Beware the False Authority Syndrome
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.
Thanks for your time and support.
Jonathan
>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.
see http://mindprod.com/jgloss/gettingstarted.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
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
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-)