Eclipse is a Java development environment, free, open-source and extensible. The Java development is a set of plugins. However, other Eclipse plugins can make use of any development tools, whatever the language (C ...) and file formats supported. Attention, however, Eclipse does not run JRE (Java Runtime Environment) or Java Development Kit, which is why you will have a Java virtual machine JRE installed prior to installation.
The purpose of this tutorial does not teach you the Java language but you learn how to use Eclipse to test your code in Java. Note that we will see how to create a java project, compile, run a Java program ... but this is quite feasible for other languages and the process differs a little. You must install a plug-in if you want to add other programming languages to Eclipse.
Here is the official site:
http://www.eclipse.org/
1 - Installing Eclipse
Once you've visited the official website, after downloading the software you get a zip file you just have to unpack it to the place you want.
You can create a shortcut "eclipse.exe" on your desktop, which will be much more convenient for you.
2 - Launch Eclipse
Run the EXE file.
This is your working directory, it is where all your projects will be saved. You can leave it at default or change it by clicking "Browse" is like you. Then click "OK".
3 - Create a Java project
We will now see how to create a Java project under Eclipse. To do this, first click on the File menu and select "New" and "Project".
Select "Java Project" and click "Next". (Note that if you want to code a Java applet you must pull down the menu "Java" lower then select "Java Applet").
Enter a name for your project, the one you want and click "Next" without touching the default options.
Click "Finish" and your Java project is created.
4 - Creating a Java application
Your project is located in the "Package Explorer" and must include JRE by default. To add a file right-click your mouse on your project (or go through the File menu) and then choose "New" and "File".
Here enter the name of your file with the extension .Java and then click "Finish". You have to code your Java application.
5 - Compilation and execution
First know that Eclipse compiles your program automatically when you save. To check if the default option is enabled click on the "Project" tab and check the option "Build Automatically" is checked.
If this is enabled then save your file after your application code. This is done by "Ctrl S" or through "File" then "Save".
Then run your program. To do this in the menu click "Run".
Double click on "Java Application". You have nothing else to except click on "Run" to complete the task.
This corresponds to my little program and operates smoothly. Note that if you have any errors in your compilation you need to solve before them before moving on.
Finally note that you will not need to always pass through "Run ..." to run your program. Just click on the execute button, it will relaunch the last program.
This is a very good IDE (Integrated Development Environment) to develop open source applications in many languages. In terms of features, I would say it has everything that one can dream. Auto compilation, auto-generation code, a debugger, etc. The only drawback is that it requires a fairly recent PC to run Eclipse well.
Published by ssb
- Your First Java ProgramContains the code, and analysis to create your first Java program.
- Best Practices to Be Followed in JAVAIf you want to be a good programmer in Java, then you need to follow certain conventions and you should be aware of some of the common things if you are a beginner. Following such conventions are a good sign of a Java...
Java Lesson 1: Creating and Running Your First ProgramEver wonder how to program in Java? This is the first installment of my Java guide.- Java Applications and the Nokia Mobile Phone What is the inner story on the the OTA (Over The Air) installation for the Nokia Mobile Phone? Read on to learn what's behind the simple point-and-click feature of your Nokia phone
A Guide to Start Programming in JavaThere are many IDEs (Integrated Development Environment) out there for Java. The one I use is JCreator because it has a very nice interface, uses very little memory and is extre...
- Understanding Java
- How to Add JARs to Java Project Build Paths
- Bridging the Gap Between Java and XML
- JAVA - What You Need to Know About It
- How to Declare Integer Variables in Java
- Java Programming Tutorials: The Online Give and Take
- How to Create a Simple PDF Document from Java Using iText
