tags:

views:

454

answers:

8

I stumbled across this:

http://en.literateprograms.org/Vending_Machine_%28java%29

It is a java vending machine, I want to read it and also follow along, write the same code.

What's the fastest way to get java setup such that I can just start coding the java vending machine as I read along?

I was in the process of downloading the Java SE Development Kit 6u17 for Windows, Multi-language, when I looked to the right hand side of the same page and just realized that I can also download Netbeans.

Again, the question is what's the best java IDE or compiler that a newb like me can use to do the java vending machine linked to above.

Or

What are the java programmers using to code java with?

I am new to java, C++ is easy to install and start coding, likewise so is PHP, but java just seems like an interesting new beast to me, thank you for not flaming.

+1  A: 

Two obvious suggestions are NetBeans and Eclipse.

Both are free and great for Java Development.

Which you use is a matter of choice. For Java Development I personally probably prefer NetBeans. As NetBeans is produced is usually very up to date with latest developments in Java. I also like how the project build is all done via Ant but again this is down to personal taste.

Although I'm currently using Eclipse as the Google Plug-in for Android development is only for Eclipse. I would say this usually the case with a lot of Plug-ins.

Dave Webb
IntelliJ IDEA is now also free-as-in-beer (there's a Community Edition). Eclipse has its own incremental compiler built-in, and this means your program can be compiled the moment it's saved - I really enjoy this, and I get annoyed by any ant or maven processes that take more than 0 time. But all this is just for info, I agree with other that Newb may be best served with an editor and the JDK tools.
Carl Smotricz
NetBeans has Compile On Save now too http://wiki.netbeans.org/FaqCompileOnSave
Dave Webb
+5  A: 

There's the 3 big ones:
Eclipse
NetBeans and
IntelliJ

All are nice. I'm a big Java noob, but I like NetBeans the best. Can't really tell you why, though :) It's all personal preference.

NetBeans is probably the most RAM-hungry of the three..

cwap
+1 for "personal preference". I really suggest to try at least two of them because they behave so different.
Aaron Digulla
Supports a lot of stuff:http://netbeans.org/downloads/index.html
Newb
Java SE (Standard Edition) is for desktop applications.
cwap
I used netbeans and eclipse since four years. My personnel preference is Netbeans, especially since 6.5. It is cleaner, better and most important homogeneous with all the plugins. Eclipse is the hell for this last point. Furthermore, netbeans has really better integration for maven and things like svn or mercurial.
Kartoch
I just want to code the java vending machine above, I don't think that qualifies as a desktop application.
Newb
@Kartoch I really don't want to start an IDE war but what you are saying is bullshit (at least partially). Eclipse has the best Maven integration of all IDEs with the m2eclipse plugin and Netbeans SVN support may have been improved but it was really awful during a long time. Having that said, you are right on the plugins part and I'd add that NetBeans has a lower learning curve, especially for a newbie. For these reason, I'd recommend it. But the other claims are not true.
Pascal Thivent
+3  A: 

I think the simplest and fastest way for a newbe to really learn java is to use only the tools contained in the SDK and a simple text editor. This way you can concentrate on the language and its ecosystem. You are not distracted by IDE issues like project management or launch configurations etc.

With this approach you are forced to learn also what is normally hidden by the IDE. Priceless knowledge when something goes really bad.

ftl
And then you could (just for the beginig and for art only) learn all java packages which you should include on top, learn all basic classes, learn how to type fast accessors to class fields and so on. All without syntax highlight, code completion, project verview, navigation on class hierarchies. It fu*** fun for newbie I guess
MBO
Agree, I hate IDE's but I got to code this, so I am in essence stuck, until I find a write up I once had on running java from the command prompt...do people still do that?
Newb
People absolutely still do that. Here's the absolute minimum you need to know: Edit your file (`vim Test.java`) (your choice of editor, naturally), compile it (`javac Test.java`), and run it (`java Test`).
Greg Hewgill
+3  A: 

Though for learning Java, I'm tempted to suggest that you start with the SDK and no IDE but a decent programming editor and compile and run by hand for the first program. There are also some very light-weight IDE/editor hybrids for Java - though I can't produce a name right now.

I think the big Java IDE have too many features and stuff going on for a newbie. On the other hand they correct many errors on their own. Can't make up my mind if this is a good or a bad thing for a newb.

ziggystar
I totally agree, I really hate IDE's-on one side you are trying to learn the language on the other you are forced to learn the IDE and how it works, and in some cases are forced to try different numerous IDE's until one finds an IDE they like, with other stuff, you just fire up Notepad++ or Console and are done.
Newb
+4  A: 

Eclipse also has great support for C++ and PHP development, so given your experience with these languages, you may find Eclipse attractive.

Laurence Vanhelsuwe
+5  A: 

Just for the record. If all you want to do is actually just do some minor editing, compile and run, you can do nicely with your favorite editor along with javac from the Java Development Kit (as opposed to the Java Runtime).

Have a look at the Java Tutorial which tells you all you need to know. http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

Thorbjørn Ravn Andersen
Thanks, I love simplicity.
Newb
+2  A: 

You should also take a look at BlueJ. This is a small but powerful Java IDE, designed with a strong focus on education. BlueJ is part of an approach to learn OO programming in general and java in particular. BluJ fills the gap between bare bones JDK tools and advanced professional IDE's like Eclipse and NetBeans. It may be exactly what you want and and need for your purpose.

Huub
+1 for suggesting this interesting program, though it may not be what Newb is looking for.
Carl Smotricz
A: 

When I first learnt Java back in 2001, I used TextPad for java programming, for me it was very good, I had write code to develop GUI, no drag and drop option, simple pure code. Then I used JBuilder, Now I am using Netbeans. My suggestion is start with something which will concentrate on pure coding rather than depending on IDE's drag on drop features. When you will comfortable with coding then you can move on to more sophisticated IDE which I mentioned above. Good luck!

Zakir Sajib