Практическая работа в ECLIPSE 3.2. Степанцов В.А. - 55 стр.

UptoLike

Составители: 

ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2
55
ɋɨɞɟɪɠɚɧɢɟ
ȼɜɟɞɟɧɢɟ ɜ Eclipse ....................................................................................................... 3
1. ɍɫɬɚɧɨɜɤɚ ɢ ɡɚɩɭɫɤ Eclipse..................................................................................... 4
1.1. ɉɪɨɜɟɪɤɚ ɢɧɫɬɚɥɥɹɰɢɢ JRE ɢ ɩɟɪɟɦɟɧɧɵɯ CLASSPATH ............................ 7
2. ɋɨɡɞɚɧɢɟ ɩɟɪɜɨɝɨ ɩɪɨɟɤɬɚ Java.............................................................................. 9
2.1. ɉɨɥɭɱɟɧɢɟ ɤɨɞɚ ɩɪɢɦɟɪɚ (JUnit) ..................................................................... 9
2.2. ɋɨɡɞɚɧɢɟ ɩɪɨɟɤɬɚ.............................................................................................. 9
2.3. ɉɪɨɫɦɨɬɪ ɷɥɟɦɟɧɬɨɜ Java ɩɪɢ ɩɨɦɨɳɢ Package Explorer ........................... 12
3. Ɋɟɞɚɤɬɢɪɨɜɚɧɢɟ ɷɥɟɦɟɧɬɨɜ Java........................................................................... 13
3.1. Ɉɬɤɪɵɬɢɟ ɪɟɞɚɤɬɨɪɚ Java ............................................................................... 13
3.2. Ⱦɨɛɚɜɥɟɧɢɟ ɧɨɜɵɯ ɦɟɬɨɞɨɜ ........................................................................... 15
3.3. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɤɨɧɬɟɧɬɧɨɣ ɩɨɦɨɳɢ............................................................. 17
3.4. ȼɵɹɜɥɟɧɢɟ ɨɲɢɛɨɤ ɜ ɤɨɞɟ.............................................................................. 18
3.5. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɲɚɛɥɨɧɨɜ ɢɫɯɨɞɧɨɝɨ ɤɨɞɚ................................................... 20
3.6. Ɉɪɝɚɧɢɡɚɰɢɹ ɨɩɟɪɚɬɨɪɨɜ ɢɦɩɨɪɬɚ................................................................. 22
3.7. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɥɨɤɚɥɶɧɨɣ ɢɫɬɨɪɢɢ............................................................... 23
3.8. ȼɵɞɟɥɟɧɢɟ ɧɨɜɨɝɨ ɦɟɬɨɞɚ.............................................................................. 25
3.9. ɋɨɡɞɚɧɢɟ ɤɥɚɫɫɚ Java ...................................................................................... 26
3.10. ɉɟɪɟɢɦɟɧɨɜɚɧɢɟ ɷɥɟɦɟɧɬɨɜ Java................................................................. 30
3.11. ɉɟɪɟɦɟɳɟɧɢɟ ɢ ɤɨɩɢɪɨɜɚɧɢɟ ɷɥɟɦɟɧɬɨɜ Java............................................ 31
3.12. ɇɚɜɢɝɚɰɢɹ ɩɨ ɨɛɴɹɜɥɟɧɢɹɦ ɷɥɟɦɟɧɬɨɜ Java ............................................... 32
3.13. ɉɪɨɫɦɨɬɪ ɢɟɪɚɪɯɢɢ ɬɢɩɨɜ............................................................................ 34
4. ɉɨɢɫɤ ɜ ɪɚɛɨɱɟɦ ɦɟɫɬɟ ......................................................................................... 37
4.1. ȼɵɩɨɥɧɟɧɢɟ ɩɨɢɫɤɚ Java ɢɡ ɪɚɛɨɱɟɝɨ ɦɟɫɬɚ ................................................ 37
4.2. ɉɨɢɫɤ ɢɡ ɩɪɟɞɫɬɚɜɥɟɧɢɹ Java......................................................................... 38
4.3. ɉɨɢɫɤ ɢɡ ɪɟɞɚɤɬɨɪɚ......................................................................................... 39
4.4. ɉɪɨɞɨɥɠɟɧɢɟ ɩɨɢɫɤɚ ɢɡ ɩɪɟɞɫɬɚɜɥɟɧɢɹ ɩɨɢɫɤɚ .......................................... 39
4.5. ȼɵɩɨɥɧɟɧɢɟ ɩɨɢɫɤɚ ɮɚɣɥɨɜ........................................................................... 40
4.6. ɉɪɨɫɦɨɬɪ ɩɪɟɞɵɞɭɳɢɯ ɪɟɡɭɥɶɬɚɬɨɜ ɩɨɢɫɤɚ ................................................ 40
5. Ɂɚɩɭɫɤ ɩɪɨɝɪɚɦɦ.................................................................................................... 41
6. Ɉɬɥɚɞɤɚ ɩɪɨɝɪɚɦɦ ................................................................................................. 43
6.1. ȼɵɱɢɫɥɟɧɢɟ ɜɵɪɚɠɟɧɢɣ................................................................................. 46
6.2. ȼɵɱɢɫɥɟɧɢɟ ɮɪɚɝɦɟɧɬɨɜ
................................................................................ 47
7. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɩɟɪɫɩɟɤɬɢɜɵ Java Browsing ....................................................... 48
8. ɇɚɩɢɫɚɧɢɟ ɢ ɜɵɩɨɥɧɟɧɢɟ ɬɟɫɬɨɜ JUnit................................................................ 50
8.1. ȼɵɩɨɥɧɟɧɢɟ ɬɟɫɬɨɜ......................................................................................... 51
8.2. ɇɚɫɬɪɨɣɤɚ ɤɨɧɮɢɝɭɪɚɰɢɢ ɬɟɫɬɚ..................................................................... 53
8.3. Ɉɬɥɚɞɤɚ ɨɲɢɛɨɤ ɬɟɫɬɚ .................................................................................... 53
8.4. ɋɨɡɞɚɧɢɟ ɤɨɦɩɥɟɤɬɚ ɬɟɫɬɚ.............................................................................. 54
                                                                ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2




                                        ɋɨɞɟɪɠɚɧɢɟ
ȼɜɟɞɟɧɢɟ ɜ Eclipse ....................................................................................................... 3
1. ɍɫɬɚɧɨɜɤɚ ɢ ɡɚɩɭɫɤ Eclipse..................................................................................... 4
  1.1. ɉɪɨɜɟɪɤɚ ɢɧɫɬɚɥɥɹɰɢɢ JRE ɢ ɩɟɪɟɦɟɧɧɵɯ CLASSPATH ............................ 7
2. ɋɨɡɞɚɧɢɟ ɩɟɪɜɨɝɨ ɩɪɨɟɤɬɚ Java.............................................................................. 9
  2.1. ɉɨɥɭɱɟɧɢɟ ɤɨɞɚ ɩɪɢɦɟɪɚ (JUnit) ..................................................................... 9
  2.2. ɋɨɡɞɚɧɢɟ ɩɪɨɟɤɬɚ .............................................................................................. 9
  2.3. ɉɪɨɫɦɨɬɪ ɷɥɟɦɟɧɬɨɜ Java ɩɪɢ ɩɨɦɨɳɢ Package Explorer ........................... 12
3. Ɋɟɞɚɤɬɢɪɨɜɚɧɢɟ ɷɥɟɦɟɧɬɨɜ Java........................................................................... 13
  3.1. Ɉɬɤɪɵɬɢɟ ɪɟɞɚɤɬɨɪɚ Java ............................................................................... 13
  3.2. Ⱦɨɛɚɜɥɟɧɢɟ ɧɨɜɵɯ ɦɟɬɨɞɨɜ ........................................................................... 15
  3.3. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɤɨɧɬɟɧɬɧɨɣ ɩɨɦɨɳɢ............................................................. 17
  3.4. ȼɵɹɜɥɟɧɢɟ ɨɲɢɛɨɤ ɜ ɤɨɞɟ.............................................................................. 18
  3.5. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɲɚɛɥɨɧɨɜ ɢɫɯɨɞɧɨɝɨ ɤɨɞɚ................................................... 20
  3.6. Ɉɪɝɚɧɢɡɚɰɢɹ ɨɩɟɪɚɬɨɪɨɜ ɢɦɩɨɪɬɚ................................................................. 22
  3.7. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɥɨɤɚɥɶɧɨɣ ɢɫɬɨɪɢɢ............................................................... 23
  3.8. ȼɵɞɟɥɟɧɢɟ ɧɨɜɨɝɨ ɦɟɬɨɞɚ.............................................................................. 25
  3.9. ɋɨɡɞɚɧɢɟ ɤɥɚɫɫɚ Java ...................................................................................... 26
  3.10. ɉɟɪɟɢɦɟɧɨɜɚɧɢɟ ɷɥɟɦɟɧɬɨɜ Java................................................................. 30
  3.11. ɉɟɪɟɦɟɳɟɧɢɟ ɢ ɤɨɩɢɪɨɜɚɧɢɟ ɷɥɟɦɟɧɬɨɜ Java............................................ 31
  3.12. ɇɚɜɢɝɚɰɢɹ ɩɨ ɨɛɴɹɜɥɟɧɢɹɦ ɷɥɟɦɟɧɬɨɜ Java............................................... 32
  3.13. ɉɪɨɫɦɨɬɪ ɢɟɪɚɪɯɢɢ ɬɢɩɨɜ............................................................................ 34
4. ɉɨɢɫɤ ɜ ɪɚɛɨɱɟɦ ɦɟɫɬɟ ......................................................................................... 37
  4.1. ȼɵɩɨɥɧɟɧɢɟ ɩɨɢɫɤɚ Java ɢɡ ɪɚɛɨɱɟɝɨ ɦɟɫɬɚ ................................................ 37
  4.2. ɉɨɢɫɤ ɢɡ ɩɪɟɞɫɬɚɜɥɟɧɢɹ Java......................................................................... 38
  4.3. ɉɨɢɫɤ ɢɡ ɪɟɞɚɤɬɨɪɚ ......................................................................................... 39
  4.4. ɉɪɨɞɨɥɠɟɧɢɟ ɩɨɢɫɤɚ ɢɡ ɩɪɟɞɫɬɚɜɥɟɧɢɹ ɩɨɢɫɤɚ .......................................... 39
  4.5. ȼɵɩɨɥɧɟɧɢɟ ɩɨɢɫɤɚ ɮɚɣɥɨɜ........................................................................... 40
  4.6. ɉɪɨɫɦɨɬɪ ɩɪɟɞɵɞɭɳɢɯ ɪɟɡɭɥɶɬɚɬɨɜ ɩɨɢɫɤɚ ................................................ 40
5. Ɂɚɩɭɫɤ ɩɪɨɝɪɚɦɦ.................................................................................................... 41
6. Ɉɬɥɚɞɤɚ ɩɪɨɝɪɚɦɦ ................................................................................................. 43
  6.1. ȼɵɱɢɫɥɟɧɢɟ ɜɵɪɚɠɟɧɢɣ ................................................................................. 46
  6.2. ȼɵɱɢɫɥɟɧɢɟ ɮɪɚɝɦɟɧɬɨɜ ................................................................................ 47
7. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɩɟɪɫɩɟɤɬɢɜɵ Java Browsing ....................................................... 48
8. ɇɚɩɢɫɚɧɢɟ ɢ ɜɵɩɨɥɧɟɧɢɟ ɬɟɫɬɨɜ JUnit................................................................ 50
  8.1. ȼɵɩɨɥɧɟɧɢɟ ɬɟɫɬɨɜ ......................................................................................... 51
  8.2. ɇɚɫɬɪɨɣɤɚ ɤɨɧɮɢɝɭɪɚɰɢɢ ɬɟɫɬɚ..................................................................... 53
  8.3. Ɉɬɥɚɞɤɚ ɨɲɢɛɨɤ ɬɟɫɬɚ .................................................................................... 53
  8.4. ɋɨɡɞɚɧɢɟ ɤɨɦɩɥɟɤɬɚ ɬɟɫɬɚ.............................................................................. 54




                                                        55