|
Well I'd recommend Eclipse. Messing around with classpaths and all that junk can come later when it's important and you have a reason to. If you want to jump into coding and learning OOP then get an IDE and go mad. I included a quick tutorial that should get you started:
I first learned java on Eclipse and still use Eclipse for work today. It is very easy for a beginner to work with because you can ignore all the advanced functions and just use what you need.
Okay first you obviously want to install eclipse and the JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Download JDK) http://www.eclipse.org/downloads/ (Eclipse IDE for Java Developers)
When you first start it up you'll see something like this and possibly something asking about a workspace location: + Show Spoiler +
Now I remember when I first started out I just said to myself what is this shit. The trick is just to close it and get to the workbench. If you are asked to specify a workspace just pick a sensible location. The default it suggests is probably fine. A workspace is a bunch of folders that contain things like: - Eclipse settings/preferences - Your projects
For example if you were doing work at school and at home I'd have my workspace on a USB drive and point eclipse to that workspace.
Onto the next screen.
Your workbench should look somewhat like this. Your package explorer on the left, editor in the center and console down the bottom.
If you want to write some code the first thing is making a new project. Right click on some blank space in your package explorer and go to new > java project. + Show Spoiler +
Fill out the project name and hit finish. You can ignore the rest of the advanced options. + Show Spoiler +
Now we want to make a class. It's important to always make sure your classes start with a CapitalLetterLikeThis and that the class name share the name of the CapitalLetterLikeThis.java file.
Right click on the src folder > new > class. + Show Spoiler +
Name the class HelloWorld and hit finish. You could also optionally tick the auto main method generation but that's just lazy ![](/mirror/smilies/smile.gif) + Show Spoiler +
Here you can type your code into the editor. I just did a simple "hello world". Once you are done and providing there are no syntax errors you can hit the "play" button to run your application. The output will appear in the lower part of your screen in the "console" tab.
If you manage to create a program that goes into an infinite loop you can hit the stop button to terminate it. + Show Spoiler +
That's pretty much it for my simple Eclipse tutorial ![](/mirror/smilies/smile.gif)
I'll give you one last tip though. Since you'll be writing a lot of console based applications in the beginning you'll have to write System.out.println a lot and as you can guess this is pretty annoying. Luckily Eclipse is awesome. You can just write the shorthand version "sysout", hit CTRL+Space and Eclipse will do the rest.
![[image loading]](http://i.imgur.com/UTG2R.png)
Hope this helps. I know other people suggest Netbeans but I've never liked it. I found Eclipse is easier to get started with and more flexible in the long run.
Edit: spoilered big images cause my post ended up way bigger than I expected D:
|
wow thanks for the step by step vek i will download eclipse and see if its any more user friendly.
so far i have made a calculator in netbeans using a guide.
|
On January 30 2011 13:49 Coagulation wrote: wow thanks for the step by step vek i will download eclipse and see if its any more user friendly.
so far i have made a calculator innetbeans using a guide. Hah like a full blown calculator with a gui? That's pretty advanced for having just started coding
|
On January 30 2011 13:49 Coagulation wrote: wow thanks for the step by step vek i will download eclipse and see if its any more user friendly.
so far i have made a calculator in netbeans using a guide.
Awesome, if I wouldve written something like that for practice... Probably be a million lines of code, still trying to find my "style". Pretty much still lack experience in efficiently optimizing code and maybe I should just focus on one language instead of trying to learn multiple like some wannabe brainiac.
Though its fun once you get into it but sometimes I go on a brief hiatus, I havent practiced the past 2 weeks after going on a 1 month winter break.
|
If you have never done any sort of programming before I'd recommend following this free Python book/tutorial rather than using Java:
http://learnpythonthehardway.org/index
edit: Sounds like you're off to an ok start though, if you can make a calculator already (and understand what you're doing) then the above book may be too simple .
|
|
On January 30 2011 17:28 gravity wrote:If you have never done any sort of programming before I'd recommend following this free Python book/tutorial rather than using Java: http://learnpythonthehardway.org/indexedit: Sounds like you're off to an ok start though, if you can make a calculator already (and understand what you're doing) then the above book may be too simple ![](/mirror/smilies/puh2.gif) .
Thanks for the link, was looking for some nice tutorials for total (like last place bronze league) noobs in programming like me.
|
On January 30 2011 19:16 Inori wrote:Show nested quote +On January 30 2011 08:12 Coagulation wrote: I have been wanting to get into learning coding (simple stuff )and from what i understand java is a good start point.
??????? Out of all the languages out there for "simple stuff", you choose Java? What, Ruby, Python, PHP and etc were too hard for you? On a serious note, after Oracle bought Sun, I wouldn't recommend anyone learning Java, simple stuff or not. It will be going downhill, just like MySQL is already. Trust me.
Im finding more and more people telling me this, too bad my uni decided to do Java instead of the usual C++ or Python this year... I have to continue and complete this last course before I move on. Though Im trying to teach myself C++.
|
Dont chose Java. Please. You will thank me later. Go C++/C# or Python. I'd rather have learned even Bash than fucking Java. If you must, go for Eclipse for coding.
|
Java is not so bad, makes transition to other languages also quite easy.
C# is probably better though
|
Yeah I'm no expert or anything, but like fanta said, I learned Java first and it was pretty easy learning other languages after wards.
I'm curious (as someone who wants to learn more about the field) why Java gets so much hate?
|
Because Oracle bought Sun.
Once you learn the OO paradigm, no matter the language you learnt first, its going to be an easy transition to any other OO language.
Also, Java isn't going downhill so fast. The Android platform is growing strong, Java is still a good language to have in your curriculum.
|
On January 31 2011 00:01 fabiano wrote: Because Oracle bought Sun.
Once you learn the OO paradigm, no matter the language you learnt first, its going to be an easy transition to any other OO language.
Also, Java isn't going downhill so fast. The Android platform is growing strong, Java is still a good language to have in your curriculum.
Even though oracle is trying to screw us all there are still open source alternatives like open JDK. As long as oracle's tactics don't divide java into a bunch of different flavors everything will be okay.
And I totally agree -- java isn't going anywhere - but I might be biased because my future depends on it . . .
|
I think you should learn Python or Scheme instead. Python is easy to learn and very powerful, more so than Java, also object-oriented if that's what you're aiming for. Scheme completely lacks syntax and so you can focus on actually learning about programming instead of bothering yourself with learning syntax rules and is very powerful as well. Java is way too verbose and its power comes from the huge number of libraries and tools like Eclipse or Netbeans and that in a way teaches you bad habits if it's your first language.
The best book for Scheme I think is The little schemer, SICP is probably better for depth but a little too difficult and heavy to start in my opinion (it's a weedout introductory course by MIT). It's easier to find a python book, surf the web or go to your local library and look for o'reilly introductory Python books.
Here's an article that may be of interest to you: http://www.catb.org/~esr/faqs/hacker-howto.html
You should stay away from c/c++ at the moment, they're just not powerful enough and they only serve specific purposes. Python and scheme(lisp) are much more general purpose.
|
|
|
|
|
|