Difference between revisions of "Basics : Develop Simple Apps Fedora"

From CDOT Wiki
Jump to: navigation, search
(Your First Java Program in Eclipse)
(Your First Java Program in Eclipse)
Line 63: Line 63:
  
 
'''Congratulations!''' You've just run your first C program using Eclipse.
 
'''Congratulations!''' You've just run your first C program using Eclipse.
 +
 
== Your First Java Program in Eclipse ==
 
== Your First Java Program in Eclipse ==
 
First, start by selecting the Java perspective.[[Image:j1.png|thumb]]
 
First, start by selecting the Java perspective.[[Image:j1.png|thumb]]

Revision as of 20:09, 18 January 2011

Your First C Program in Eclipse

The first thing you have to do is to select the C/C++ perspective. You can do this by clicking the icon pointed to by the red arrow and selecting C/C++.
Screenshot-3.png




Your workbench is now configured for C/C++ development.
Screenshot-4.png





Next select File, New, C Project from the main menu.
Screenshot-5.png





Enter the name of your project, FirstCProject, and for the executable type select Hello World ANSI C Project, and then click on the Finish button.
Screenshot-7.png





Notice that you now have a simple Hello World program in the editor window. If you like you may make a small change to the program and save it or you can just leave it as is.
Screenshot-8.png





To execute the program select Run As from the Run menu. Then select Local C/C++ Application.
Screenshot-9.png





The output of your program is displayed in the Console window at the bottom of the workbench.
Screenshot-10.png



Congratulations! You've just run your first C program using Eclipse.

Your First Java Program in Eclipse

First, start by selecting the Java perspective.
J1.png





In the Java perspective select File, New, Java Project.
J3.png