- Advantages Of Learning Java: Why Is JAVA Easier To Learn Than Other Programming Languages?
- Advantages Of Learning Java: What To Gain From JAVA Programming?
- Getting Your System Ready For JAVA: Installing The JAVA Development Kit (JDK)
- A Great Help For Creating JAVA Code: Advantages Of Using The Eclipse IDE For JAVA Development
- Download & Install Eclipse IDE For JAVA Development
In the last part of this Hello World of Java! Series I showed you where you can download the Java Developement Kit (JDK) and explained that you either need a JDK or JRE to be able to execute JAVA on your system.
To follow the things I’m going to show and explain further in the future parts of this series you need to have JAVA installed. So if you haven’t done this so far, please get back to the previous part of this series and install the JDK first.
Alright, now it’s time to introduce you to the best help I think is out there for creating JAVA code. It’s the Eclipse IDE which as a JAVA developer can make your life easier in many ways!
What is Eclipse and what is it good for regarding JAVA development?
It’s like when you are going to develop a website. You can do this only with notepad. If you’re really good you may actually want and even need to edit the website code with a pure editor, like notepad, from time to time. But you probably don’t want to rewrite every little line of code for, let’s say to include a picture, every single time you need it. That’s why there’s stuff like for example Dreamweaver or WYSIWYG editors. They help you to produce what you’re intending to, so that you can focus on the more important stuff. You can save time on things that can be solved automatically or maybe through templates, frameworks and similar help.
Highlighting of your syntax errors
Much like when writing a text, like here for TRYBE or similar, you want to avoid misspelling. It’s not that hard for a human to read over most misspelling, but not for a computer! It’s crucial to be very exact at programming JAVA code.
Have a look at the following syntax errors, which will be probable able to spot for you – even without any prior knowledge to programming:
Can you see the mistakes? Well even if not, that’s not that bad. Eclipse will always check the syntax for you and will give you a message when you try to execute code which is bound to create an error because of avoidable mistakes like above. For people who already know a little bit about programming or if you know where to look for this is probably some easy example I created. But as programming code gets more complex, you can easily get lost in some closing/opening brackets or similar stuff.
So, from all the other great aspects about Eclipse, or to be fair from probably any other IDE, I think this is one of the most important aspects why an IDE helps you to create code efficiently. I haven’t mentioned the difference between syntax and semantic errors – we will get to that later in deeper detail. But you can already take notice of that Eclipse will reduce your syntax errors to zero! This means you can totally focus on what your code is meant to do – the semantic. If you compare your JAVA code creation to the creation of a text, you could say that you can choose to create your text simply in an editor and not check it for misspelling. Or you can use Word and some other similar tool to check your grammar spelling – the syntax. That way you can make sure that you can focus on what your content is meant to say – the semantic! So in other words Eclipse supports checking the spelling of your JAVA language. I will probably get to that example later again and use a good example when coding. But think this comparison may already help understanding a bit more.
Automatic imports (when you use stuff that requires imports)
If you don’t have some IDE like Eclipse you will have to google which imports you would need and add them manually … this will save you a lot of time when using Eclipse to create JAVA code. Don’t worry if you – for now – have no clue what this about. It will all make more sense and you will see what it means for your help when we will start writing some real JAVA code in Eclipse.
Automatic code style correction for better human readability
Better visualized code, to make it better readable for humans. You don’t have to put it in any spaces anymore yourselve anywhere to make any code “good looking”! Anything is automatically arranged for you on every save action you perform – if you want to and configure it that way.
Suggestions for possible methods/code/actions to use
Depending on your different used variables and objects in your individual code (I’ll explain to you later in detail what this exactly is!) there are always suggestions aviable. For example you can look which methods you can perform by implementing a class or don’t have to recheck manually if you forget the name of a method from that class you just implemented. This can be enormous helper when getting into some more complicated code or many different kind of objects. Without having to research stuff manually in the end this will save you time as well as it educates you about JAVA and the possibilities of your code by simply having a look “here and there” what’s possible.
Debugging your code
You can set break points and debug your code by executing it step by step to have a look how the variables are changing. This is great to check for some errors in detail if you need to or to clarify something “in slow motion” for a better understanding of some special code parts you’re interested in.
Lots of plugins aviable
Because Eclipse is used very often by JAVA developers you can find lots of useful plugins which you can additionally install to even get “some help for the helper” 😉
Ever growing learning curve
You constantly get to know new things about Eclipse, or also JAVA, because Eclipse maybe tells you about it or has a way of automatically create code for you – the way you want or need it. You just always need to know where and what you have to set up or click on to get the result you’re looking for. Asking the right questions and looking if solutions exist is the key for a successful and efficient life of a programmer. It helps to have built a wheel once, but you don’t have to invent it every time again..!
Free to use and open source
Eclipse is one of the best examples of having a great and free open source model. You don’t have to pay to use it and it will be probably pretty sure that it will be hopefully there for a while. Concerning the longer term importance of the Eclipse project(s) based on their current value and widespread usage for different kinds of developers (not only JAVA, like mentioned above).
Alternative JAVA IDE’s
Back when I got introduced to JAVA I had no clue of anything and got introduced to JAVA with BlueJ. In hindsight, I can understand the thinking of our teacher back then. He thought this was a good way to start for beginners. But from my experience over the years it became pretty clear that to really do serious stuff in JAVA, you better use Eclipse or a similar IDE. And even for the start I personally would suggest to rather start with Eclipse to gain from its help and get your understanding from getting your stuff done faster and more efficient.
I only had a short look into NetBeans a while ago. I liked their IDE for some other GUI related reasons back then. But I have always preferred Eclipse since I got to know about it. On Intellij IDEA I can’t tell you very much. I just used Eclipse and a little bit NetBeans so far. In the end it’s like choosing an OS: Windows, MacOS or Linux? All have their different pros and cons. You have to find the one that suits your tastes the best and supports what you want to do with it.
Because I would like to demand some more detailed coverage to the installation process of Eclipse, I will show you the installation in the next part of this series. So this part was just about explaining to you why it makes sense to use an IDE, in this case Eclipse, when you start thinking about coding in JAVA. In the next part I will show you in detail
- which Eclipse version you should choose
- how to install and configure it for the start
- & how to finally create your first JAVA code
After that we will have some look into the World that JAVA can offer with the basics, like different variables, classes and some important methods.
If you’re new to programming or are sometimes a little bit lost concerning some words I’m using: Don’t worry! This series is meant to give you a quick round a bout everything concerning JAVA development. I’ll try to give you some insights where I think it’s helpful right now but will also try to reduce some complex stuff to the most important. So when I think you need to know about certain things for your understanding of JAVA I’ll try to explain them. However, if you still have questions, don’t understand me explaining something or can’t follow at some points, please feel free to drop a comment below. I’ll try to help you if I can!
My last article of this series was already ago a while. Unfortunately just couldn’t find time much earlier. Looking forward to publishing at least once, maybe two articles for this series per week from now on.
That’s it for today, hope you could learn already some useful stuff and enjoyed it so far. Hope to see you again next time!
SOME OTHER ARTICLES OUT OF INFOSION’S WORLD: