Java Programs in Eclipse IDE

Introduction

Eclipse has an extremely user-friendly interface that offers users a wide range of possibilities in JAVA programming or coding in any other language as relevant. Creating new programs or entering saved programs is quite easy here. The steps for the Java Programs in Eclipse IDE are mentioned below in this article.

Creating a WorkPlace

This is one of the primary tasks after you open Eclipse IDE for the first time is to set up a workplace on your desktop. This is a directory where all your future programs and projects will be saved. By default, Eclipse will create a folder in the C drive. You can browse to any other directory. Once done, save the directory by clicking the ‘OK’ button.

Creating a New Project

If you are creating a new project, you will see a New Java Project window pop-up on your screen. Each project will be created inside its unique package such that clashes do not occur. You will notice that the location of the new project being created will match that of your workplace directory. From ‘Contents’, select the ‘Create a new project in Workspace’ option. Once you click ‘OK’, you will see the project under the Package Explorer section of the interface. You can now start coding in the white space known as the editor by making a new class.

Creating Projects using existing JAVA Files

The first step to this to make sure that the files are saved in the workplace directory. From ‘Contents’, select the ‘Create Project from existing source’ open and browse to the project files that you want to enter. Name the project as named in the existing files in the New Java Project window. Finally, click on ‘Finish’. If the existing code does not have any syntax errors, run the program by clicking on Run > Run from the Toolbar.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.