By now, you should have created your workspace folder, or have been told where the folder will be located.
For this first task with Eclipse, you will be downloading a pre-written .java program, creating a project to hold this program, and then running the program.
• Right click on the file below and save it to your Eclipse workspace folder, or anywhere else you want. Save it under the name "Multiply.java".
• Now, let's make a new "project" to hold this file. Remember: It will be
necessary to create a "project" for a .java program when working in Eclipse.
• Access your Eclipse software and have it open on the screen.
• Click on File on the menu bar, click on New, and then on Java Project.
The "New Java Project" wizard (drop down window) will open.
Enter your project "name". Remember: The project name cannot be the same as the .java name. You cannot name this project "Multiply".
Notice that "Use default location" will be checked and automatically filled with the location of your designated Eclipse workspace.
Leave the default items under JRE and Project layout checked.
Click Finish.
• In the Package Explorer (left hand panel) of Eclipse, expand your named project (ours is named PreLoadDemo) and select the src (source) folder.
Right click and choose File - Import. Expand General, select File System file, Next. |
|
Click the Browse and find your workspace folder (this is just the folder, not the .java file). Check the box in front of your Multiply.java. The Into folder will be automatically filled with your new project name. Click Finish.
• You are all set to start using the Multiply.java program in Eclipse.
• Open your project. Open the src file. Open default package. Open Multiply.java.
• To RUN the program, choose on the top menu bar. Answer the questions as they appear. |
|