I suggest using the $HOME/.local/bin directory, if it exists, because that's generally in your path. 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.
How to save a bluej program as .java install#
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.
How to save a bluej program as .java full#
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. Step 3) Save the file for Java Hello World program as FirstProgram.java make sure to select file type as all files while saving the file in our working folder C:workspace.
![how to save a bluej program as .java how to save a bluej program as .java](https://docs.oracle.com/javase/tutorial/figures/getStarted/saveas.png)
By using colored backgrounds, BlueJ helps you visualize the structure of the code you're writing. Now Type the (Hello World) which will print Hello World in Java. 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.
![how to save a bluej program as .java how to save a bluej program as .java](https://i.ytimg.com/vi/32kOiB7MTZs/maxresdefault.jpg)
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.
![how to save a bluej program as .java how to save a bluej program as .java](http://java.meritcampus.com/core-java-topics/images/compilation-right-click-menu-for-new-text-document.png)
When you create a new class, BlueJ generates a clean but robust template with hints toward what you need to do.