File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 1
1
# Packages
2
2
3
3
#### What / Why?
4
- > A package is a group of class files.
4
+ > A package is a group of class files.
5
+
5
6
6
7
> Packages help organize your code.
7
8
9
+
8
10
> Packages help keep your code unique from other people so you can resolve conflicts in your code if you have two or more classes with the same name.
9
11
12
+
10
13
#### Naming conventions
11
14
``` java
12
15
// after your website
@@ -21,26 +24,30 @@ package jre.companyname.packagename;
21
24
22
25
#### Compiling packages
23
26
24
- > Generic.
27
+ > Generic.
28
+
25
29
```
26
30
javac -d c:/path/to/compile/to c:/path/of/source/file.java
27
31
```
28
32
29
- > Generic, compile all java files in a directory.
33
+ > Generic, compile all java files in a directory.
34
+
30
35
```
31
36
javac -d c:/path/to/compile/to c:/path/of/source/*.java
32
37
```
33
38
34
- > Current directory = './' or simply just '.' so all these are the same.
39
+ > Current directory = './' or simply just '.' so all these are the same.
40
+
35
41
```
36
42
javac -d ./ ./*.java
37
43
38
44
javac -d . ./*.java
39
45
40
46
javac -d . *.java
41
- ```
47
+ ```
48
+
49
+ > Compiling from two sources.
42
50
43
- > Compiling from two sources.
44
51
```
45
52
javac -d ./ ./source1/*.java ./source2/*.java
46
53
```
You can’t perform that action at this time.
0 commit comments