简体   繁体   中英

How to start out hand coding Java

I've just started with Java and I have been using Netbeans. I have tried Eclipse but it kept crashing on me and I gave up. Since then I have produced a small application, but I find that I feel very restricted within the development environment, and I see lots of generated code that I really don't understand, and which seems to bear little resemblance to any code I may find while researching a problem.

With this in mind, and having seen many suggestions, I would rather begin to code by hand so that I understand exactly what is going where, and why.

My question(s):

I have seen and read through a great many tutorials but most of them assume a certain level of competency. I've built a small desktop editor in Netbeans, but I've never coded Java by hand. With that in mind could you suggest a good "getting starting" tutorial for me?

I would also like some advice on a coding environment. I will be creating desktop applications and am already familiar with Geany through coding in Python , but I've seen very little information about Geany and Java .

I'd appreciate any suggestions about this, because there seem to be a great many editors available, but please note that I am using Ubuntu on my development machine. Open source is not a requirement, but being free is.

BTW, I have no problems with trying Eclipse again if that seems to be the general consensus, I am currently just a little jaded on it since I have never successfully even tested anything without a cataclysmic crash.

Many thanks for any advice that you can give.

MVK

A Little Update

Many thanks to those of you who have taken the time to give an answer. I am currently playing about with the Sublime editor, suggested by user1432824, having had another try at Eclipse. Unfortunately though, Eclipse has a habit of crashing when saving files which is rather inconvenient. I plan to chase this up and see if there is a fixable reason, but it still feels a little heavyweight and integrated and I really want to move away from that if possible.

Thanks for the tutorial links, I've seen most of them already in my travels, but I'm happy to get more.

Finally

Many thanks for your input, I think that I have come to a comfortable result, with a few loose ends that Ill check on later. Here are my findings so far:

The Sublime Editor: This was a tricky one. The Sublime editor is actually an excellent little app (despite how it looks out of the box!) and I have little doubt that I will use it at some point, but for now it lacks something for me, although I would be hard pressed to explain exactly what. Thanks for the suggestion though, its always good to find new editors.

Eclipse: So I took the plunge and tried Eclipse again, and, just like the first time I used it I've been rather impressed with the overall look and feel of it, however, just like the last time it crashes at the most inopportune moments and despite much searching I have yet to discover the reason or the cure, which leaves Eclipse out of the running. Besides, although I like the feel of Eclipse it is still a bit on the heavyweight side for what I want to do.

BlueJ: I admit that I did not try this program, although thanks for the suggestion. It seems to me like just another IDE and I really want to move away from the whole IDE thing for a while, at least until I understand a little more about how Java actually works.

Many thanks for your suggestions, but I think for now that I will go with Geany for a few reasons: As a very lightweight editor it can compile and run Java from the menu or keyboard, which just saves some time, and I have become addicted to the Snippets function which comes in handy once you have learned the basic syntax of whatever commands you add to it.

The only other choice now is between ANT and Maven and I think that the only way to decide between the two is to use both and see which one 'feels' better to me.

Many thanks to all who responded and my final question must be: Since you have all helped me reach my final decision, how to I go about accepting this question? Any advice on that front would also be helpful!

regards,

MVK

In my opinion, if you are new to Java, don't start with GUI. Start with simple text application. The best resource for beginners in my opinion is the official Java tutorial.

http://docs.oracle.com/javase/tutorial/

Good luck!

Have you looked at BlueJ ? From the website:

BlueJ is an integrated Java environment specifically designed for introductory teaching.

BlueJ was developed at a University specifically for the purpose of teaching object orientation with Java.

BlueJ is free!

I would strongly recommend using some form of IDE. It'll provide interactive debugging, hints, completion, code colourisation and useful error highlighting.

have you tried the Java online trainings?

http://java.sun.com/developer/onlineTraining/awt/contents.html

As for editors, I started out with a simple plain text editor like those that come on Mac and Windows. I also use Eclipse for Java Developers, and Sublime Text. Sublime has a free, unlimited trial, but will bug you every few saves to buy the premium version.

I would recommend that you get familiar with a build tool, like Ant or Maven. Once you have a project with more than 1 class in it, using a variety of libraries, it's good to have some help managing dependencies, running tests, building jars, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM