Difference between revisions of "Java/C2/Getting-started-Eclipse/English-timed"
From Script | Spoken-Tutorial
PoojaMoolya (Talk | contribs) |
PoojaMoolya (Talk | contribs) |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 8: | Line 8: | ||
|- | |- | ||
| 00:06 | | 00:06 | ||
| − | | In this tutorial we are going to learn | + | | In this tutorial, we are going to learn: |
|- | |- | ||
| 00:08 | | 00:08 | ||
| − | |How to | + | |How to create a project and add a '''class''' in '''Eclipse''' |
|- | |- | ||
| 00:12 | | 00:12 | ||
| − | | How to write java program and | + | |How to write a java program and |
|- | |- | ||
| 00:14 | | 00:14 | ||
| − | | How to run a java program in Eclipse | + | |How to run a java program in Eclipse. |
|- | |- | ||
| − | | | + | | 00:18 |
| − | | | + | | For this tutorial, we are using: Ubuntu 11.10, Eclipse 3.7 |
| − | + | ||
| − | + | ||
| − | + | ||
|- | |- | ||
| − | | | + | | 00:25 |
| − | | To follow this tutorial you must have | + | | To follow this tutorial, you must have |
|- | |- | ||
| 00:28 | | 00:28 | ||
| − | |Eclipse installed on your system. | + | |'''Eclipse''' installed on your system. |
| + | |||
|- | |- | ||
| 00:30 | | 00:30 | ||
| Line 40: | Line 38: | ||
|- | |- | ||
| 00:39 | | 00:39 | ||
| − | | '''Eclipse''' is an '''Integrated Development Environment ''' | + | | '''Eclipse''' is an '''Integrated Development Environment'''. |
|- | |- | ||
| Line 48: | Line 46: | ||
|- | |- | ||
| 00:50 | | 00:50 | ||
| − | | Now let us open Eclipse. | + | | Now let us open '''Eclipse'''. |
|- | |- | ||
| Line 60: | Line 58: | ||
|- | |- | ||
| 01:11 | | 01:11 | ||
| − | |A workspace is a location where all your project | + | |A '''workspace''' is a location where all your project related data and your '''eclipse''' related files are stored. |
|- | |- | ||
| Line 68: | Line 66: | ||
|- | |- | ||
| 01:24 | | 01:24 | ||
| − | |Using the | + | |Using the '''Browse''' feature, a different directory can also be selected. |
|- | |- | ||
| 01:27 | | 01:27 | ||
| − | |For now let us proceed with the default directory. | + | |For now, let us proceed with the default directory. |
|- | |- | ||
| Line 88: | Line 86: | ||
|- | |- | ||
| 01:52 | | 01:52 | ||
| − | |And here | + | |And here we have Eclipse IDE. Now let us add a project. |
|- | |- | ||
| 01:57 | | 01:57 | ||
| − | | | + | | Go to '''File ''', '''New''', select '''Project'''. |
|- | |- | ||
| − | | | + | | 02:05 |
| − | | | + | | In the list of projects, select '''Java Project'''. |
|- | |- | ||
| − | | | + | | 02:10 |
| − | | | + | | Also note that, for most of our tutorials, we will be using '''Java Project'''. Click '''Next'''. |
|- | |- | ||
| 02:19 | | 02:19 | ||
| − | | | + | | In the project name, type '''EclipseDemo'''. |
|- | |- | ||
| − | | | + | | 02:30 |
| − | | | + | | Notice an option that says '''Use default location'''. |
|- | |- | ||
| 02:34 | | 02:34 | ||
| − | | | + | | If this option is selected, all the 'EclipseDemo' project data is stored in the default '''workspace'''. |
|- | |- | ||
| − | | | + | | 02:41 |
| − | | | + | | If it is unselected, using the '''Browse''' feature, a different location can also be selected. |
|- | |- | ||
| 02:47 | | 02:47 | ||
| − | |For now we’ll use the default location. | + | |For now, we’ll use the default location. |
|- | |- | ||
| 02:52 | | 02:52 | ||
| − | | | + | | click '''Finish''', located at the bottom right corner of the Wizard. |
|- | |- | ||
| − | | | + | | 03:00 |
| We get the '''Open Associated Perspective''' dialog box. | | We get the '''Open Associated Perspective''' dialog box. | ||
|- | |- | ||
| − | | | + | |03:04 |
|A perspective refers to the way items are arranged in Eclipse. | |A perspective refers to the way items are arranged in Eclipse. | ||
|- | |- | ||
| − | | | + | |03:09 |
|The dialog box is suggesting a perspective that is suited for '''Java''' development. | |The dialog box is suggesting a perspective that is suited for '''Java''' development. | ||
|- | |- | ||
| 03:20 | | 03:20 | ||
| − | |Select ''' | + | |Select '''Remember my decision ''' and click '''Yes.''' |
|- | |- | ||
| − | | | + | | 03:27 |
| − | | Here we have '''EclipseIDE''' with the project. Now let us add a class to the project. | + | | Here we have '''EclipseIDE''' with the project. Now let us add a '''class''' to the '''project'''. |
|- | |- | ||
| − | | | + | | 03:37 |
| − | | | + | | Right click on the project, '''New '''and select '''Class'''. |
|- | |- | ||
| − | | | + | | 03:46 |
| − | | | + | | In the class name, give '''DemoClass'''. |
|- | |- | ||
| 03:55 | | 03:55 | ||
| − | | Notice that in | + | | Notice that in '''Modifiers''', we have two options, '''public''' and '''default'''. |
|- | |- | ||
| 03:59 | | 03:59 | ||
| − | | For now leave it as public. | + | | For now, leave it as '''public'''. |
|- | |- | ||
| Line 168: | Line 166: | ||
|- | |- | ||
| 04:06 | | 04:06 | ||
| − | | And in the list of method stubs | + | | And in the list of '''method stubs''', select the option that says, '''public static void main'''. |
|- | |- | ||
| Line 176: | Line 174: | ||
|- | |- | ||
| 04:19 | | 04:19 | ||
| − | | | + | | Click '''Finish''', located at the bottom right corner of the wizard. |
|- | |- | ||
|04:30 | |04:30 | ||
| − | |And | + | |And here we have the '''class''' file. |
|- | |- | ||
| 04:35 | | 04:35 | ||
| − | | Notice that there are a lot of partitions. These are called portlets. | + | | Notice that there are a lot of partitions. These are called '''portlets'''. |
|- | |- | ||
| 04:41 | | 04:41 | ||
| − | | We have the '''Package Explorer''' portlet that behaves like a '''File Browser''' | + | | We have the '''Package Explorer''' portlet that behaves like a '''File Browser'''. |
|- | |- | ||
| 04:46 | | 04:46 | ||
| − | | We have the '''Editor '''portlet in which we write the code. | + | | We have the '''Editor''' portlet in which we write the code. |
|- | |- | ||
| 04:50 | | 04:50 | ||
| − | |And the Outline portlet which gives us hierarchy of the project. | + | |And the '''Outline''' portlet which gives us hierarchy of the project. |
|- | |- | ||
| 04:56 | | 04:56 | ||
| − | | Each portlet can also be resized | + | | Each portlet can also be resized. |
|- | |- | ||
| 05:10 | | 05:10 | ||
| − | | They can also be minimized by using the | + | | They can also be minimized by using the '''Minimize''' button. |
|- | |- | ||
| 05:26 | | 05:26 | ||
| − | | They can | + | | They can be restored by using the '''Restore''' button. |
|- | |- | ||
| Line 220: | Line 218: | ||
|- | |- | ||
| 05:54 | | 05:54 | ||
| − | | The code generated here depends on the options we select | + | | The code generated here depends on the options we select while creating the class. |
|- | |- | ||
| 06:00 | | 06:00 | ||
| − | | Now let us add a | + | | Now, let us add a '''print''' statement here. |
|- | |- | ||
| 06:08 | | 06:08 | ||
| − | | Type '''System.out.println in parenthesis | + | | Type: '''System.out.println''' in parenthesis in quotes ''' “Hello Eclipse”''' |
|- | |- | ||
| Line 236: | Line 234: | ||
|- | |- | ||
| 06:31 | | 06:31 | ||
| − | | Save the file by clicking '''File '''and select '''Save''' | + | | Save the file by clicking '''File''' and select '''Save'''. |
|- | |- | ||
| Line 244: | Line 242: | ||
|- | |- | ||
| 06:42 | | 06:42 | ||
| − | | To run this program, right click on the '''editor''', go to ''' | + | | To run this program, right click on the '''editor''', go to '''Run as''' and select '''Java Application'''. |
|- | |- | ||
| 06:56 | | 06:56 | ||
| − | | We see that if | + | | We see that if something is printed, the '''Output''' console shows the output. |
|- | |- | ||
| 07:04 | | 07:04 | ||
| − | | If our code had problems, | + | | If our code had problems, the problems would have been shown on the '''Problems''' portlet. |
|- | |- | ||
| Line 259: | Line 257: | ||
|- | |- | ||
| − | | | + | | 07:18 |
| − | | | + | | This brings us to the end of this tutorial. |
|- | |- | ||
| − | | | + | | 07:20 |
| − | | In this tutorial, we have learnt how to create project in eclipse and a class to it | + | | In this tutorial, we have learnt: how to create a project in eclipse and add a '''class''' to it, how to write java source code and how to run a java program in '''Eclipse'''. |
|- | |- | ||
| 07:33 | | 07:33 | ||
| − | | As an assignment | + | | As an assignment for this tutorial, create a '''project''' by the name '''Display''' |
| + | |||
|- | |- | ||
| − | | 07:38 | + | |07:38 |
| − | | | + | | and add a '''class''' to the 'Display' project by the name 'Welcome'. |
|- | |- | ||
| − | | | + | | 07:44 |
| − | | For more information on the Spoken Tutorial Project, watch the video available at the following link | + | | For more information on the Spoken Tutorial Project, watch the video available at the following link. |
|- | |- | ||
| 07:50 | | 07:50 | ||
| − | | | + | | It summarizes the Spoken Tutorial project. |
|- | |- | ||
| 07:53 | | 07:53 | ||
| − | | | + | | If you do not have good bandwidth, you can download and watch it. |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|- | |- | ||
| − | | 07: | + | | 07:58 |
| − | | | + | | The Spoken Tutorial Project Team:Conducts workshops using '''spoken tutorials'''. |
|- | |- | ||
| 08:02 | | 08:02 | ||
| − | | Gives certificates for those who pass an online test | + | | Gives certificates for those who pass an online test. |
|- | |- | ||
| 08:05 | | 08:05 | ||
| − | | For more details, please write to '''contact at spoken hyphen tutorial dot org''' | + | | For more details, please write to '''contact at spoken hyphen tutorial dot org'''. |
|- | |- | ||
| 08:12 | | 08:12 | ||
| − | | Spoken Tutorial Project is a part of the Talk to a Teacher project | + | | Spoken Tutorial Project is a part of the Talk to a Teacher project. |
|- | |- | ||
| 08:17 | | 08:17 | ||
| − | | It is supported by the National Mission on Education through ICT, MHRD, Government of India | + | | It is supported by the National Mission on Education through ICT, MHRD, Government of India. |
|- | |- | ||
| 08:23 | | 08:23 | ||
| − | | More information on this | + | | More information on this mission is available at the following link. |
|- | |- | ||
| 08:27 | | 08:27 | ||
| − | | This tutorial has been contributed by '''TalentSprint''' .Thanks for joining. | + | | This tutorial has been contributed by '''TalentSprint'''. Thanks for joining. |
|} | |} | ||
Latest revision as of 14:52, 9 March 2017
| Time | Narration |
| 00:01 | Welcome to the spoken tutorial on Getting started with Eclipse. |
| 00:06 | In this tutorial, we are going to learn: |
| 00:08 | How to create a project and add a class in Eclipse |
| 00:12 | How to write a java program and |
| 00:14 | How to run a java program in Eclipse. |
| 00:18 | For this tutorial, we are using: Ubuntu 11.10, Eclipse 3.7 |
| 00:25 | To follow this tutorial, you must have |
| 00:28 | Eclipse installed on your system. |
| 00:30 | If not, for relevant tutorial please visit our website as shown. |
| 00:39 | Eclipse is an Integrated Development Environment. |
| 00:42 | It is a tool on which one can write, debug and run java programs easily. |
| 00:50 | Now let us open Eclipse. |
| 00:55 | Press Alt F2 and in the dialog box, type eclipse and hit Enter. |
| 01:08 | We have the Workspace Launcher dialog box. |
| 01:11 | A workspace is a location where all your project related data and your eclipse related files are stored. |
| 01:19 | There is already a location which is the default location. |
| 01:24 | Using the Browse feature, a different directory can also be selected. |
| 01:27 | For now, let us proceed with the default directory. |
| 01:30 | Click OK to proceed. |
| 01:39 | And we have the Welcome to Eclipse page. |
| 01:46 | Click Workbench which is at the top-right corner of the page. |
| 01:52 | And here we have Eclipse IDE. Now let us add a project. |
| 01:57 | Go to File , New, select Project. |
| 02:05 | In the list of projects, select Java Project. |
| 02:10 | Also note that, for most of our tutorials, we will be using Java Project. Click Next. |
| 02:19 | In the project name, type EclipseDemo. |
| 02:30 | Notice an option that says Use default location. |
| 02:34 | If this option is selected, all the 'EclipseDemo' project data is stored in the default workspace. |
| 02:41 | If it is unselected, using the Browse feature, a different location can also be selected. |
| 02:47 | For now, we’ll use the default location. |
| 02:52 | click Finish, located at the bottom right corner of the Wizard. |
| 03:00 | We get the Open Associated Perspective dialog box. |
| 03:04 | A perspective refers to the way items are arranged in Eclipse. |
| 03:09 | The dialog box is suggesting a perspective that is suited for Java development. |
| 03:20 | Select Remember my decision and click Yes. |
| 03:27 | Here we have EclipseIDE with the project. Now let us add a class to the project. |
| 03:37 | Right click on the project, New and select Class. |
| 03:46 | In the class name, give DemoClass. |
| 03:55 | Notice that in Modifiers, we have two options, public and default. |
| 03:59 | For now, leave it as public. |
| 04:01 | The other options will be discussed in subsequent tutorials. |
| 04:06 | And in the list of method stubs, select the option that says, public static void main. |
| 04:14 | The other options will be discussed in subsequent tutorials. |
| 04:19 | Click Finish, located at the bottom right corner of the wizard. |
| 04:30 | And here we have the class file. |
| 04:35 | Notice that there are a lot of partitions. These are called portlets. |
| 04:41 | We have the Package Explorer portlet that behaves like a File Browser. |
| 04:46 | We have the Editor portlet in which we write the code. |
| 04:50 | And the Outline portlet which gives us hierarchy of the project. |
| 04:56 | Each portlet can also be resized. |
| 05:10 | They can also be minimized by using the Minimize button. |
| 05:26 | They can be restored by using the Restore button. |
| 05:37 | Now let us minimize other portlets and focus on the Editor. |
| 05:49 | As we can see, there is already some code, Eclipse has generated for us. |
| 05:54 | The code generated here depends on the options we select while creating the class. |
| 06:00 | Now, let us add a print statement here. |
| 06:08 | Type: System.out.println in parenthesis in quotes “Hello Eclipse” |
| 06:26 | Add a semicolon at the end of the statement. |
| 06:31 | Save the file by clicking File and select Save. |
| 06:37 | Alternatively, you can use the shortcut Control S also. |
| 06:42 | To run this program, right click on the editor, go to Run as and select Java Application. |
| 06:56 | We see that if something is printed, the Output console shows the output. |
| 07:04 | If our code had problems, the problems would have been shown on the Problems portlet. |
| 07:10 | Here is how you write and run a Java program in Eclipse. |
| 07:18 | This brings us to the end of this tutorial. |
| 07:20 | In this tutorial, we have learnt: how to create a project in eclipse and add a class to it, how to write java source code and how to run a java program in Eclipse. |
| 07:33 | As an assignment for this tutorial, create a project by the name Display |
| 07:38 | and add a class to the 'Display' project by the name 'Welcome'. |
| 07:44 | For more information on the Spoken Tutorial Project, watch the video available at the following link. |
| 07:50 | It summarizes the Spoken Tutorial project. |
| 07:53 | If you do not have good bandwidth, you can download and watch it. |
| 07:58 | The Spoken Tutorial Project Team:Conducts workshops using spoken tutorials. |
| 08:02 | Gives certificates for those who pass an online test. |
| 08:05 | For more details, please write to contact at spoken hyphen tutorial dot org. |
| 08:12 | Spoken Tutorial Project is a part of the Talk to a Teacher project. |
| 08:17 | It is supported by the National Mission on Education through ICT, MHRD, Government of India. |
| 08:23 | More information on this mission is available at the following link. |
| 08:27 | This tutorial has been contributed by TalentSprint. Thanks for joining. |
Contributors and Content Editors
Arya Ratish, Gaurav, Jyotisolanki, Kavita salve, PoojaMoolya, Sandhya.np14, Sneha