Senin, 05 Januari 2015

If you want it simple, BlueJ is the answer

Good morning, it's a nice day, isn't it? :D

Have you ever heard of BlueJ before?


BlueJ is a development environment that allows you to develop Java programs quickly and easily. I repeat. Quickly and Easily. Its main features are that it is:




  • Simple. BlueJ has a deliberately smaller and simpler interface than professional environments like NetBeans or Eclipse. This allows beginners to get started more quickly, and without being overwhelmed.
  • Designed for teaching. BlueJ is deliberately designed with good pedagogy in mind. There is a popular textbook designed for teaching introductory university/college courses with BlueJ, and a site full of teaching resources.
  • Interactive. BlueJ allows you to interact with objects. You can inspect their value, call methods on them, pass them as parameters and more. You can also directly invoke Java expressions without compiling. Thus BlueJ is a powerful graphical shell/REPL for Java.
  • Portable. BlueJ runs on Windows, Mac OS X, Linux and other platforms which run Java. It can also run without installation from a USB stick.
  • Mature. BlueJ is over fifteen years old, but continues to be updated and supported by a full-time team. We aim to respond to all technical support requests within one working day.
  • Innovative. BlueJ has several features not seen before in other IDEs. Its object bench, code pad, and scope colouring were all original BlueJ features.
It's awesome, right?Next i'm going to show you how simple working with BlueJ.Oh right, first you have to install Java Development Kit before you can run BlueJ. You can read my previous article in here to get the download link. After you installed it, you have to download BlueJ Application. You can get it from here. Once you finished, run the setup and this window will show up.














Just click "Next".















In this window, you can choose what user can use BlueJ on your computer. Is it only you? or all of the users. If you want just yourself using it, choose "Install just for you" and click "Next".














If you want to add BlueJ's file associations, shortcut in your window and start menu, check all of the box and click "Next"














And if you want to change destination folder to install BlueJ, click "Change" and choose your folder. If not, just click "Next"













And we're good to go, just click "Install" and the installation will begin.

















Wait for a couple of minutes and this window will show up. Click "Finish" and congratulations, you have installed BlueJ.


Next, i'm going to compile a simple source code using BlueJ. The first thing you need to do is run it, of course.


Double click BlueJ shortcut that you have made on the desktop and this window will show up.
















This is the first view of BlueJ working ground.















Click "Project" -> "New Project" to start a new project. And this window will show up.
















Just like another IDE Editor for Java, you have to save the file first. In this case, i will name it "HelloWorld" Project and save it on "MyJavaProject" folder and click save.















After that, you have to make a new "class" , just click on "New Class" and give a name same by the project name and click "OK".















And if succeed, there will be an icon named "HelloWorld" with a brown box with diagonal shape. This diagonal shape means that class haven't compiled yet. If you want to compile it, just click on the diagonal and choose compile on the left. But no hurry, we have to edit the source code before that. To do it, right-click on the "HelloWorld" and choose "Open Editor".















And new window will show up.















On the right side, there is a source code brought by BlueJ default. Just delete it and replace with this code.


public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello, world!");
    }

}














And now you can compile it, just click compile on the left corner. And if nothing wrong, you will have a notification that tell you "there is no syntax error" and the diagonal shape on the box will dissapear.















Next, close the source code editor, and right click on the "HelloWorld" box, and choose "void main (String[] args)" , and a window will pop-up, just click "OK" and it will runs the source code and see the result. 




























This is the result.













Voila, simple, right?
You have any question? Don't bother to ask in the comment section.

Okay, this is the end of the post. See you soon...


0 komentar:

Posting Komentar