You can double click on it to addĬomments about the project as a whole or write notes to yourself on things
Icon that looks like a piece of paper is just a simple text file that actsĪs the projects readme file. There aren't any classes, which are the basic building blocks of programs in Java, or code associated with the project yet. It canĪfter giving the new project and name and clicking Create The name of the project does not have to be the sameĪs the name of the java file you will later add to the project. Click on the Project menu and select New Project.įrom this window type in the name of the new project in the text field File name. To create a new program you first need to create a new project. When BlueJ is up and running you should see a window that looks something like this: The template is stored in the lib -> english -> templates -> newclass folder. You can also modifying the template that starts when creating new programs and classes. The file called fs with a text editor.This file is located in the lib directory in You can alter some of the defaults for BlueJ my modifying Navigating to the BlueJ directory and double clicking on the bluej.bat icon. The icon you created when you downloaded and installed BlueJ or by In this example I will assume they have been downloaded to the desktop. You don't have to put them in the BlueJįolder, just remember where you download them to on your computer. I suggest using the $HOME/.local/bin directory, if it exists, because that's generally in your path.Creating and Running programs in BlueJ Getting Started with BlueJĪnd installed BlueJ before completing the following steps.įrom the class web site. Once it launches, point it to the directory you want to use for installing. If you're using the generic installer, launch it with Java from a terminal: $ java -jar. It also offers a "generic" installer, delivered as a JAR file (the usual Java format). BlueJ also requires JavaFX (as a separate download), so follow the instructions on the BlueJ site. After you've installed Java and JavaFX, launch the BlueJ installer.īlueJ has downloadable installers for Ubuntu Linux, Windows, and macOS.
However, to use BlueJ, you must have the same version of Java used by BlueJ, so check the version you have against what BlueJ requires. You need Java to program in the language anyway, so you may already have Java installed. Installing BlueJīlueJ is written in Java, so to run it, you must install Java. It's meant to help you learn the language, not to type faster or more efficiently. It's very much a learning tool, and it's purposefully less helpful than a full IDE like Eclipse or NetBeans. You don't have to rely on indentation to see that a Java method falls within a specific class because you can see the blocks of code.īlueJ isn't an all-purpose IDE. By using colored backgrounds, BlueJ helps you visualize the structure of the code you're writing. It can be nearly impossible to tell a variable apart from a keyword that's a part of the language, and even with the assistance of indentation and braces and semicolons, it all starts to blur together.īlueJ is designed to clear away this confusion. It doesn't help that when you're learning to program, most of the code you type looks and feels basically the same: it's all vaguely meaningful, yet oddly similar, with words that seem to make as much sense whether you read them backward or forward. If you're new to programming-or just new to Java, it can be difficult to understand advanced concepts like variable scoping and loops and conditionals. It uses a subdued color scheme to keep different code elements separate from one another, so it's easy to tell a class from a method or a comment. When you create a new class, BlueJ generates a clean but robust template with hints toward what you need to do. As you build a project, you see a "mind map" or flowchart of how your Java files fit together. BlueJ templatesīlueJ's interface is clean and simple, with just four items in its main menu bar. The University of Kent is sensitive to this beginner-level struggle, so it develops and maintains BlueJ, an open source integrated development environment (IDE) for Java learners. For instance, a Java class often looks something like this: import java.io.Foo Other times, the introductory text is more complex. For example, a shell script opens with a simple "shebang": #!/bin/sh In practice, though, boilerplate text is too obscure in meaning to become an easy habit, but it's essential for a program to run. Before you can get comfortable starting a project, you have to remember the preambles that, in theory, ought to be easy to remember since they're usually relatively short and repetitive. Whenever you're learning a new programming language, it's easy to criticize all the boilerplate text you need to memorize.