How to develop java ....


Java is one of the most popular programming languages in the world. It is widely-used to develop IOT appliances, Android apps, web, and enterprise applications. This article will provide a quick guide to install and configure your workstation using .

Installing the compiler and tools:

Installing the compiler, or Java Development Kit (JDK), is easy to do in Fedora. At the time of this article, versions 8 and 9 are available. Simply open a terminal and enter:
sudo dnf install java-1.8.0-openjdk-delve
This will install the JDK for version 8. For version 9, enter:
sudo dnf install java-9-openjdk-delve
For the developer who requires additional tools and libraries such as Ant and Maven, the Java Development group is available. To install the suite, enter:
sudo dnf group install "Java Development"
To verify the compiler is installed, run:
java c -version
The output shows the compiler version and looks like this:
javac 1.8.0_162

Image result for java programer images

Compiling applications:

You can use any basic text editor such as nanovim, or gedit to write applications. This example provides a simple “Hello Fedora” program.
Open your favorite text editor and enter the following:
public class HelloFedora {


      public static void main (String[] args) {
              System.out.println("Hello Fedora!");
      }
}
Save the file as HelloFedora.java. In the terminal change to the directory containing the file and do:
java c HelloFedora.java
The compiler will complain if it runs into any syntax errors. Otherwise it will simply display the shell prompt beneath.
You should now have a file called HelloFedora, which is the compiled program. Run it with the following command:
java HelloFedora
And the output will display:
Hello Fedora!

Installing an Integrated Development Environment (IDE):

Some programs may be more complex and an IDE can make things flow smoothly. There are quite a few IDEs available for Java programmers including:
However, one of the most popular open-source IDE’s, mainly written in Java, is Eclipse. Eclipse is available in the official repositories. To install it, run this command:
sudo dnf install eclipse-jdt
When the installation is complete, a shortcut for Eclipse appears in the desktop menu.
For more information on how to use Eclipse, consult the User Guide available on their website.

Browser plugin :

If you’re developing web applets and need a plugin for your browser, IcedTea-Webis available. Like Open JDK, it is open source and easy to install in Fedora. Run this command:
sudo dnf install iced tea-web

Comments

Popular Posts