/* Copyright (c) SEMM NL All rights reserved.
Author : Paul Hamaker. Part of JavaLessons.com
This code is for educational purposes only. Use at own risk.*/

1. package subdir.insubdir; 

2.  

3. import java.awt.* ; 

4. import java.applet.* ; 

5.  

6. public class Packit 

7. extends Applet 

8.

9.   public void paint ( Graphics gr ) 

10.   { 

11.     for ( int i = 0 ; i < 256; i++ ) 

12.     { 

13.       gr.setColor ( new Color ( 255, 0, i ) ); 

14.       gr.drawLine ( 0, 0, i, 255 ) ; 

15.     } 

16.   } 

17.

18.  

19. =========  Packit.html  =============== 

20.  

21. <HTML

22. <HEAD

23. <title>Packaging</title

24. </HEAD

25. <BODY

26. <h2>Order, order ! </h2

27.  

28. This applet shows how to package

29. <APPLET 

30.  

31. CODEBASE="." 

32. CODE="subdir.insubdir.Packit.class" 

33.  

34.  WIDTH="450" 

35.  HEIGHT="300"

36.  

37. </APPLET

38.  

39. <HR

40. This applet can't be found. 

41. <APPLET 

42.  

43. CODE="Packit.class" 

44.  

45.  WIDTH="450" 

46.  HEIGHT="300"

47.  

48. </APPLET

49.  

50. <HR

51. This applet won't run. 

52. <APPLET 

53.  

54. CODEBASE="./subdir/insubdir/" 

55. CODE="Packit.class" 

56.  

57.  WIDTH="450" 

58.  HEIGHT="300"

59.  

60. </APPLET

61. </BODY

62. </HTML

63. =========== (miscellaneous) ============= 

64. <APPLET 

65. ARCHIVE="pekapp.jar" 

66. CODEBASE="." 

67. CODE="subdir.insubdir.Packit.class" 

68. .... 

69. ========== 

70. D:\jdk1.3\bin\java.exe   nl.semm.Klaz 

71.  

72. ....java.exe  -cp=C:\jwork\entrancedir  nl.semm.Klaz 

73. ========== 

74. SET CLASSPATH=C:\jwork\entrancedir;D:\ourjars\pekapp.jar 

75. ========== 

76. httpdir (=CODEBASE

77. |  Packit.html 

78.

79. |---subdir 

80.     | 

81.     | 

82.     |---insubdir 

83.           Packit.class 

84. ========== 

85. httpdir (=CODEBASE

86. |   Packit.html 

87. |   pekapp.jar 

88.       ( subdir/insubdir/Packit.class

89.