浏览代码

Revamp installation and test instructions (#136)

- Ensure only installation instructions are in INSTALLATION.md and only
  instructions for running tests are in TESTS.md.
- Remove install instructions for IDEs:
  - IDEs start to pay dividends when your codebase gets large enough that the refactoring and code navigation features start to seriously increase your efficiency; Exercism programs are, by design, toy-sized;
  - There are far fewer instructions to getting started when doing it from the command-line (and therefore less likely to get wrong).
- Focus on using package managers:
  - these tools provide the right kind of "magic" — you really don't need to know the installation details to start programming;
  - they automatically perform steps that can be hard to describe and do right (less likely to get wrong).
John Ryan 10 年前
父节点
当前提交
37721c40bf
共有 3 个文件被更改,包括 240 次插入203 次删除
  1. 164
    146
      docs/INSTALLATION.md
  2. 76
    57
      docs/TESTS.md
  3. 二进制
      docs/img/mac-osx--idea-ce-gradle-import-dialog.png

+ 164
- 146
docs/INSTALLATION.md 查看文件

@@ -1,228 +1,246 @@
1
-## Windows
1
+# Installing Java
2 2
 
3
-If you are new-ish to programming in Java, these instructions are for you. This is a step-by-step opinionated guide to getting from zero to submitting your first exercise.
3
+In addition to the exercism CLI and your favorite text editor, practicing with Exercism exercises in Java requires:
4 4
 
5
+* the **Java Development Kit** (JDK) — which includes both a Java Runtime *and* development tools (most notably, the Java compiler); and
6
+* **Gradle** — a build tool specifically for Java projects.
5 7
 
6
-### Install Java Development Kit 1.8
8
+Choose your operating system:
7 9
 
10
+* [Windows](#windows)
11
+* [Mac OS X](#mac-os-x)
12
+* [Linux](#linux)
8 13
 
9
-First determine if you have Java installed already.
14
+... or ...
15
+* if you prefer to not use a package maanger, you can [install manually](#install-manually).
10 16
 
11
-In a Command Prompt window (Start -> Command Prompt)...
17
+Optionally, you can also use a [Java IDE](#java-ides).
12 18
 
13
-```
14
-C:\Users\johndoe> java -version
15
-```
19
+----
16 20
 
17
-if you see:
21
+# Windows
18 22
 
19
-```
20
-'java' is not recognized as an internal or external command,
21
-operable program or batch file.
22
-```
23
+Open an administrative command prompt.  (If you need assistance opening an administrative prompt, see [open an elevated prompt in Windows 8+](http://www.howtogeek.com/194041/how-to-open-the-command-prompt-as-administrator-in-windows-8.1/) (or [Windows 7](http://www.howtogeek.com/howto/windows-vista/run-a-command-as-administrator-from-the-windows-vista-run-box/)).
23 24
 
24
-You'll need to install the JDK — it contains both a Java Runtime and development tools.
25
+1. If you have not installed Chocolatey, do so now:
25 26
 
26
-1. Go to [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and download the latest version of the JDK (at the time of writing, [JDK 8u45](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html))
27
-2. Run the installer, using all the defaults.
27
+   ```batchfile
28
+   C:\Windows\system32> @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
29
+   ```
30
+-  Install the JDK:
28 31
 
29
-Verify that the install worked.
32
+   ```batchfile
33
+   C:\Windows\system32> choco install jdk8
34
+   ...
35
+   C:\Windows\system32> refreshenv
36
+   ...
37
+   ```
38
+-  Install Gradle:
30 39
 
31
-Close any open Command Prompt windows and in a *new* Command Prompt window...
40
+   ```batchfile
41
+   C:\Windows\system32>choco install gradle
42
+   ...
43
+   ```
32 44
 
33
-```
34
-C:\Users\johndoe> java -version
35
-```
45
+We recommend closing the administrative command prompt and opening a new command prompt -- you do not require administrator priviledges to practice Exercism exercises.
36 46
 
37
-You should see something like this:
47
+You now are ready to get started with the Java track of Exercism!
38 48
 
39
-```
40
-java version "1.8.0_45"
41
-Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
42
-Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
43
-```
49
+To get started, see "[Running the Tests](http://exercism.io/languages/java/tests)".
44 50
 
45
-The exact version number is not important, just that version 1.8 or better is installed. Circa 2004, Sun Microsystem, in their inifinite wisdom, decided that it would be "better" to have dual numbering conventions.  Java 1.8 == Java 8.0.
51
+----
46 52
 
47
-### Install IntelliJ IDEA Community Edition
53
+# Mac OS X
48 54
 
49
-Download, install and configure IntelliJ with the JDK you have installed:
55
+Below are instructions for install using the most common method - using Homebrew.  If you'd rather, you can also [install on OS X without Homebrew](#installing-on-mac-os-x-without-homebrew).
50 56
 
51
-1. Download [IntelliJ IDEA Community Edition](https://www.jetbrains.com/idea/download/) and run the installer; accept all the defaults.
57
+## Installing
52 58
 
53
-2. Run IntelliJ (Start -> All Programs -> JetBrains -> IntelliJ IDEA Community Edition).
54
-    * The first time you do, IntelliJ walks you through some initial setup.  We recommend selecting a UI Theme and then just clicking "Skip All and Set Defaults".
59
+1. If you haven't installed [Homebrew](http://brew.sh), yet, do so now:
55 60
 
56
-3. In the "Welcome to IntelliJ IDEA" window, open the "Configure" pull-down and select "Project Defaults", then "Project Structure".
61
+   ```sh
62
+   $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
63
+   ```
64
+- Tap the [Homebrew Cask](https://caskroom.github.io/) — this allows us to install pre-built binaries like the JDK.
57 65
 
58
-3. In the "Default Project Structure" dialog, find the "Project SDK:" section in the right panel.  Click the "New..." button and select "JDK".
66
+   ```
67
+   $ brew tap caskroom/cask
68
+   ```
69
+-  Install the JDK:
59 70
 
60
-4. In the "Select Home Directory for JDK" file open dialog, navigate to "`C:\Program Files\Java\jdk1.8...`".  Be sure to select the JDK, not the JRE.  Click "OK".
71
+   ```
72
+   $ brew cask install java
73
+   ```
74
+-  Install Gradle:
61 75
 
62
-5. Back in the "Default Project Structure" dialog, in the "Project language level:" section, select "8 - Lambdas, type annotations etc.".  Click "OK".
76
+   ```
77
+   $ brew install gradle
78
+   ```
63 79
 
64
-## Mac OS X
80
+You now are ready to get started with the Java track of Exercism!
65 81
 
66
-If you are new-ish to programming in Java on Mac OS X, these instructions are for you.
67
-This is a step-by-step opinionated guide to getting from zero to submitting your first exercise.
82
+To get started, see "[Running the Tests](http://exercism.io/languages/java/tests)".
68 83
 
69
-### Step 1 — Install Java Development Kit 1.8
84
+----
70 85
 
71
-First, determine if the JDK 1.8 is installed:
86
+# Linux
72 87
 
73
-```bash
74
-$ java -version
75
-```
88
+Below are instructions for install using the package manager of your distro.  If you'd rather, you can also [install on Linux without a package manager](#installing-on-linux-without-a-package-manager).
76 89
 
77
-What you do next depends on the output of that command.
90
+* [Debian](#debian)
91
+* [Fedora](#fedora)
78 92
 
79
-#### No JDKs Installed
93
+## Debian
80 94
 
81
-If you have no JDKs installed at all (e.g. you have a fresh install of Mac OS X 10.10 [Yosemite]),
82
-the OS presents a dialog:
95
+If you are using Debian or its derivatives (like Ubuntu or Linux Mint), use APT:
83 96
 
84
-![To use the "java," command-line tool you need to install a JDK.  Click "More Info..." to visit the Java Developer Kit download website.](http://x.exercism.io/v3/tracks/java/docs/img/mac-osx--install-java-dialog.png)
97
+*(verified on: Linux Mint 18, Ubuntu 14)*
85 98
 
86
-Clicking on the "More Info..." button takes you to the [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
99
+1. Install the JDK:
87 100
 
88
-Download the latest version of the JDK (at the time of writing,
89
-[JDK 8u71](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html))
90
-and run the installer, using all the defaults.
101
+   ```sh
102
+   $ sudo apt-get update
103
+   $ sudo apt-get install python-software-properties
104
+   $ sudo add-apt-repository ppa:webupd8team/java
105
+   $ sudo apt-get update
106
+   $ sudo apt-get install oracle-java8-installer
107
+   ```
108
+-  Install Gradle:
91 109
 
92
-Skip down to [Verify JDK Install](#verify-jdk-install)
110
+   ```sh
111
+   $ sudo apt-get install gradle
112
+   ```
93 113
 
94
-#### Older JDKs Installed
114
+You now are ready to get started with the Java track of Exercism!
95 115
 
96
-If you see something like...
116
+To get started, see "[Running the Tests](http://exercism.io/languages/java/tests)".
97 117
 
98
-```bash
99
-java version "1.6.0_65"
100
-Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
101
-Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
102
-```
118
+----
103 119
 
104
-Or any version that is prior to 1.8, you need to install the 1.8 JDK...
120
+## Fedora
105 121
 
106
-1. Go to [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
107
-and download the latest version of the JDK (at the time of writing,
108
-[JDK 8u71](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html))
109
-2. Run the installer, using all the defaults.
122
+If you are using Fedora or its derivatives, use DNF:
110 123
 
111
-#### Verify JDK Install
124
+*(verified on: Fedora 24)*
112 125
 
113
-Let's verify that the installation worked...
126
+1. Install the JDK:
114 127
 
115
-```bash
116
-$ java -version
117
-```
128
+   ```sh
129
+   $ sudo dnf install java-1.8.0-openjdk-devel
130
+   ```
131
+-  Install Gradle:
118 132
 
119
-You should see something like this:
133
+   ```sh
134
+   $ sudo dnf install gradle
135
+   ```
120 136
 
121
-```bash
122
-java version "1.8.0_45"
123
-Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
124
-Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
125
-```
126 137
 
127
-The exact version number is not important, just that version 1.8 or better is installed.
128
-Circa 2004, Sun Microsystem, in their inifinite wisdom, decided that it would be "better" to
129
-have dual numbering conventions.  Java 1.8 == Java 8.0.
138
+You now are ready to get started with the Java track of Exercism!
130 139
 
131
-Congratulations, you've ensured you have the proper version of Java, itself, installed!
140
+To get started, see "[Running the Tests](http://exercism.io/languages/java/tests)".
132 141
 
133
-### Step 2 — Install IntelliJ IDEA Community Edition
142
+----
134 143
 
135
-Download, install and configure IntelliJ with the JDK you have installed:
144
+# Install Manually
136 145
 
137
-1. Download [IntelliJ IDEA Community Edition](https://www.jetbrains.com/idea/download/) and
138
-run the installer; accept all the defaults.
146
+* [Installing on Windows manually](#installing-on-windows-manually)
147
+* [Installing on Mac OS X without Homebrew](#installing-on-mac-os-x-without-homebrew)
148
+* [Installing on Linux without a package manager](#installing-on-linux-without-a-package-manager)
139 149
 
140
-2. Run IntelliJ (`/Applications/IntelliJ IDEA 14 CE.app`)
141
-    * The first time you do, IntelliJ walks you through some initial setup.  We recommend
142
-      selecting a UI Theme and then just clicking "Skip All and Set Defaults".
150
+----
143 151
 
144
-3. In the "Welcome to IntelliJ IDEA" window, open the "Configure" pull-down and select
145
-   "Project Defaults", then "Project Structure".
152
+## Installing on Windows manually
146 153
 
147
-6. In the "Default Project Structure" dialog, find the "Project SDK:" section in the right panel.
148
-   Click the "New..." button and select "JDK".
154
+*NOTE: these instructions are intended for experienced Windows users.  If you don't already know how to set environment variables or feel comfortable managing the directory structure, we highly recommend you use the Chocolatey-based install, [above](#windows).*
149 155
 
150
-5. In the "Select Home Directory for JDK" file open dialog, navigate to
151
-   `/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home`. Click "OK".
156
+1. Install the JDK:
157
+   1. Download "**Java Platform (JDK)**" from [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
158
+   -  Run the installer, using all the defaults.
159
+-  Install Gradle:
160
+   - Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
161
+   - Unzip the archive.  We recommend a place like `C:\Users\JohnDoe\Tools`.
162
+   - Add a new system environment variable named `GRADLE_HOME` and set it to the path you just created (e.g. `C:\Users\JohnDoe\Tools\gradle-x.y`).
163
+   - Update the system `Path` to include the `bin` directory from Gradle's home (e.g. `Path`=`...;%GRADLE_HOME%\bin`).
152 164
 
153
-6. Back in the "Default Project Structure" dialog, in the "Project language level:" section,
154
-   select "8 - Lambdas, type annotations etc.".  Click "OK".
155 165
 
156
-## How work with Exercism using Eclipse
166
+You now are ready to get started with the Java track of Exercism!
157 167
 
158
-This section is about Eclipse, and it is assumed that you already have
159
-Java development kit for your computing environment installed. If that
160
-is not the case, see the instructions above.
168
+To get started, see "[Running the Tests](http://exercism.io/languages/java/tests)".
161 169
 
162
-Additionally, this is not a guide about how to use Eclipse. Please, consult
163
-your favorite search engine for that because there are plenty of tutorials
164
-already available.
170
+----
165 171
 
166
-Once you've got Eclipse installed and running, there are at least two ways
167
-to get exercism tasks into Eclipse: letting gradle build Eclipse workspace
168
-for you and using Buildship Gradle plugin for Eclipse. 
172
+## Installing on Mac OS X without Homebrew
169 173
 
170
-Firstly, a simpler way of doing things.
174
+*NOTE: these instructions are intended for experienced Mac OS X users.  Unless you specifically do not want to use a package manager, we highly recommend using the Homebrew-based installation instructions, [above](#mac-os-x).*
171 175
 
172
-1. Fetch an exercise: `exercism fetch java <exercise>`
173
-   (see [the list of available exercises](http://exercism.io/languages/java)).
176
+1. Install the JDK:
177
+   1. Download "**Java Platform (JDK)**" from [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
178
+   -  Run the installer, using all the defaults.
179
+-  Install Gradle:
180
+   - Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
181
+   -  Unpack Gradle:
174 182
 
175
-2. Change to the directory containing the exercise: `cd ~/exercism/java/
176
-   <exercise>` (by default things will end up in `~/exercism`).
183
+      ```sh
184
+      $ mkdir ~/tools
185
+      $ cd ~/tools
186
+      $ unzip ~/Downloads/gradle-*-bin.zip
187
+      $ cd gradle*
188
+      ```
189
+   -  Configure Gradle and add it to the path:
177 190
 
178
-3. Let Gradle prepare things for Eclipse: `gradle eclipse`.
191
+      ```sh
192
+      $ cat << DONE >> ~/.bashrc
193
+      export GRADLE_HOME=`pwd`
194
+      export PATH=\$PATH:\$GRADLE_HOME/bin
195
+     DONE
196
+     ```
179 197
 
180
-4. Start Eclipse.
181 198
 
182
-5. From the "File" menu select "Import".
199
+You now are ready to get started with the Java track of Exercism!
183 200
 
184
-6. Select "Existing Projects Into Workspace" as import source.
201
+To get started, see "[Running the Tests](http://exercism.io/languages/java/tests)".
185 202
 
186
-7. Browse the directory containing the exercise fetched during the
187
-   step 1 to a text field labeled "Select root directory".
203
+----
188 204
 
189
-8. Hit the button labeled "Finish".
205
+## Installing on Linux without a package manager
190 206
 
191
-Secondly, a slightly more complex and more "Eclipseish" way. This is
192
-for those who absolutely despise doing anything away from Eclipse.
207
+*NOTE: these instructions are intended for experienced Linux users.  Unless you specifically do not want to use a package manager, we highly recommend using the the installation instructions, [above](#linux).*
193 208
 
194
-1. Install the Buildship Gradle Integration plugin from Eclipse
195
-   Marketplace (accessible from Help-menu, under Eclipse Marketplace).
209
+1. Install the JDK:
210
+   1. Download "**Java Platform (JDK)**" from [Oracle OTN](http://www.oracle.com/technetwork/java/javase/downloads/index.html).
211
+   -  Run the installer, using all the defaults.
212
+-  Install Gradle:
213
+   - Download "**Binary only distribution**" from the [Gradle download page](https://gradle.org/gradle-download/).
214
+   -  Unpack Gradle:
196 215
 
197
-   ![Eclipse Help Menu](/docs/img/eclipse-help-dropdown.png)
216
+      ```sh
217
+      $ mkdir ~/tools
218
+      $ cd ~/tools
219
+      $ unzip ~/Downloads/gradle-*-bin.zip
220
+      $ cd gradle*
221
+      ```
222
+   -  Configure Gradle and add it to the path:
198 223
 
199
-   To find the Buildship Gradle Plugin, search for "Buildship Gradle".
224
+      ```sh
225
+      $ cat << DONE >> ~/.bashrc
226
+      export GRADLE_HOME=`pwd`
227
+      export PATH=\$PATH:\$GRADLE_HOME/bin
228
+     DONE
229
+     ```
200 230
 
201
-   ![Buildship Gradle Plugin](/docs/img/eclipse-mp-search-buildship-gradle.png)
231
+You now are ready to get started with the Java track of Exercism!
202 232
 
203
-   In case you've been reading about the Gradle STS plugin, note that
204
-   the Buildship Gradle Integration plugin replaces the Gradle STS plugin
205
-   which is no longer maintained.
233
+To get started, see "[Running the Tests](http://exercism.io/languages/java/tests)".
206 234
 
207
-   Start (or restart) Eclipse after the plugin has been installed.
235
+----
208 236
 
209
-2. Fetch an exercise: `exercism fetch java <exercise>`
210
-   (see [the list of available exercises](http://exercism.io/languages/java)).
237
+# Java IDEs
211 238
 
212
-3. From the "File" menu select "Import".
239
+There are many Java IDEs available.  The three most popular are:
213 240
 
214
-5. Select "Gradle" > "Gradle Project" as your import source.
241
+* [IntelliJ IDEA](https://www.jetbrains.com/idea/download/) (download the "Community" edition)
242
+- [Eclipse](https://www.eclipse.org/downloads/)
243
+- [NetBeans](https://netbeans.org/downloads/) (download the "Java SE" bundle)
215 244
 
216
-6. Browse to the directory containing the exercise fetched during
217
-   the step 1 to a text field labeled "Project root directory".
218
-
219
-7. Hit the button labeled "Finish".
220
-
221
-It seems that the simple way of doing things is, as usual, the better
222
-way of doing things. The only caveat is that you have to run `gradle eclipse`
223
-every time you change something affecting Eclipse.
224
-
225
-For most exercises there is no need to ever touch build.gradle or anything
226
-else besides the source files; so, there is no need to constantly run
227
-`gradle eclipse`.
245
+and there are [others](https://en.wikibooks.org/wiki/Java_Programming/Java_IDEs).
228 246
 

+ 76
- 57
docs/TESTS.md 查看文件

@@ -1,91 +1,110 @@
1
-## Windows
1
+# Running the Tests
2 2
 
3
-1) In the Command Prompt window, get the first exercise...
3
+Choose your operating system:
4 4
 
5
-```
6
-C:\Users\johndoe> exercism fetch java
5
+* [Windows](#windows)
6
+* [Mac OS X](#mac-os-x)
7
+* [Linux](#linux)
7 8
 
8
-New:
9
-java (Etl)      C:\Users\johndoe\exercism\java\etl
9
+----
10 10
 
11
-unchanged: 0, updated: 0, new: 1
12
-```
11
+# Windows
13 12
 
14
-2) In the "Welcome to IntelliJ IDEA" window, click the "Open" option.
13
+1. Open a Command Prompt.
14
+-  Get the first exercise:
15 15
 
16
-3) Navigate to the "C:\Users\johndoe\exercism\java\etl" folder.  Make sure you've selected the "etl" folder. Click "OK".
16
+   ```batchfile
17
+   C:\Users\JohnDoe>exercism fetch java
18
+   
19
+   Not Submitted:     1 problem
20
+   java (Hello World) C:\Users\JohnDoe\exercism\java\hello-world
21
+   
22
+   New:               1 problem
23
+   java (Hello World) C:\Users\JohnDoe\exercism\java\hello-world
24
+   
25
+   unchanged: 0, updated: 0, new: 1
26
+   
27
+   ```
28
+-  Change directory into the exercism:
17 29
 
18
-4) In the "Import Project from Gradle" dialog, check the "auto-import" and "create directories" checkboxes and select "Use customizable gradle wrapper".
30
+   ```batchfile
31
+   C:\Users\JohnDoe>cd C:\Users\JohnDoe\exercism\java\hello-world
32
+   ```
33
+   
34
+-  Run the tests:
19 35
 
20
-```
21
-Gradle project:    [C:\Users\johndoe\exercism\java\etl\build.gradle   ](...)
36
+   ```batchfile
37
+   C:\Users\JohnDoe>gradle test
38
+   ```
39
+   *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
40
+- Solve the exercise.  Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/xjava/blob/master/exercises/hello-world/GETTING_STARTED.md)).
22 41
 
23
-[X] Use auto-import
24
-[X] Create directories for empty content roots automatically
25 42
 
26
-( ) Use default gradle wrapper (not configured for the current project)
27
-(o) Use customizable gradle wrapper
28
-( ) Use local gradle distribution
43
+Good luck!  Have fun!
29 44
 
30
-...
31
-```
45
+If you get stuck, at any point, don't forget to reach out for [help](http://exercism.io/languages/java/help).
32 46
 
33
-5) Click "OK".  IntelliJ will automatically create its project artifacts based on the Gradle project file.
47
+----
34 48
 
35
-* After the project has loaded and you've dismissed the "Tip of the Day" dialog, you may see a notice (in the top-right-hand corner), saying, "Unindex remote maven repositories found." you can safely dismiss this notice.
49
+# Mac OS X
36 50
 
37
-6) Open the `README.md` file and carefully read the background for the assignment.
51
+1. In the terminal window, get the first exercise:
38 52
 
39
-7) Start by running the test suite: In the "Project" view, right-click on the test file (`etl\src\test\java\EtlTest`), select "Run", then pick the "EtlTest" that has a JUnit icon to the left of it (red and green arrows), NOT the Gradle icon (circular green).
53
+   ```
54
+   $ exercism fetch java
40 55
 
41
-* When you first start an exercise, you should expect compilation errors because the test is setting expectations on a class that you need to write.  By trying to run the tests, you get a nice list of what needs to be fixed in the "Messages Make" view.
56
+   New:                 1 problem
57
+   Java (Etl) /Users/johndoe/exercism/java/hello-world
42 58
 
43
-... and away you go!!!
59
+   unchanged: 0, updated: 0, new: 1
44 60
 
45
-## Mac OS X
61
+  ```
62
+- Change directory into the exercise:
46 63
 
47
-### Get started with the first exercise
64
+   ```
65
+   $ cd /Users/johndoe/exercism/java/hello-world
66
+   ```
67
+- Run the tests:
48 68
 
49
-1. In the terminal window, get the first exercise...
69
+  ```
70
+  $ gradle test
71
+  ```
72
+   *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
73
+- Solve the exercise.  Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/xjava/blob/master/exercises/hello-world/GETTING_STARTED.md)).
50 74
 
51
-        $ exercism fetch java
75
+Good luck!  Have fun!
52 76
 
53
-        Not Submitted:       1 problem
54
-        Java (Etl) /Users/johndoe/exercism/java/etl
77
+If you get stuck, at any point, don't forget to reach out for [help](http://exercism.io/languages/java/help).
55 78
 
56
-        New:                 1 problem
57
-        Java (Etl) /Users/johndoe/exercism/java/etl
79
+----
58 80
 
59
-        unchanged: 0, updated: 0, new: 1
81
+# Linux
60 82
 
61
-2. In the "Welcome to IntelliJ IDEA" window, click the "Open" option.
83
+1. In the terminal window, get the first exercise:
62 84
 
63
-3. Navigate to the `/Users/johndoe/exercism/java/etl` folder.  Make sure you've selected the
64
-   "etl" folder. Click "OK".
85
+   ```
86
+   $ exercism fetch java
65 87
 
66
-4. In the "Import Project from Gradle" dialog, check the "auto-import" and "create directories"
67
-   checkboxes and select "Use customizable gradle wrapper".
88
+   New:                 1 problem
89
+   Java (Etl) /home/johndoe/exercism/java/hello-world
68 90
 
69
-    ![IntelliJ 14 CE -- Gradle import dialog](http://x.exercism.io/v3/tracks/java/docs/img/mac-osx--idea-ce-gradle-import-dialog.png)
91
+   unchanged: 0, updated: 0, new: 1
70 92
 
71
-5. Click "OK".  IntelliJ will automatically create its project artifacts based on the Gradle project file.
93
+  ```
94
+- Change directory into the exercise:
72 95
 
73
- * After the project has loaded and you've dismissed the "Tip of the Day" dialog, you may see a
74
-   notice (in the top-right-hand corner), saying, "Unindex remote maven repositories found." you can
75
-   safely dismiss this notice.
96
+   ```
97
+   $ cd /home/johndoe/exercism/java/hello-world
98
+   ```
99
+- Run the tests:
76 100
 
77
-6. Open the `README.md` file and carefully read the background for the assignment.
101
+  ```
102
+  $ gradle test
103
+  ```
104
+   *(Don't worry about the tests failing, at first, this is how you begin each exercise.)*
105
+- Solve the exercise.  Find and work through the `GETTING_STARTED.md` guide ([view on GitHub](https://github.com/exercism/xjava/blob/master/exercises/hello-world/GETTING_STARTED.md)).
78 106
 
79
-7. Start by running the test suite: In the "Project" view, right-click on the test file
80
-   (`etl\src\test\java\EtlTest`), select "Run", then pick the "EtlTest" that has a JUnit icon to the
81
-   left of it (red and green arrows), NOT the Gradle icon (circular green).
82
-   ![Run tests through IDEA JUnit Runner, NOT Gradle](http://x.exercism.io/v3/tracks/java/docs/img/mac-osx--idea-ce-run-unit-tests.png)
107
+Good luck!  Have fun!
83 108
 
84
- * If these menu options don't appear at first, wait for a few seconds and try again; IntelliJ is still
85
-   configuring the project with a Java nature.
109
+If you get stuck, at any point, don't forget to reach out for [help](http://exercism.io/languages/java/help).
86 110
 
87
- * When you first start an exercise, you should expect compilation errors because the test is
88
-   setting expectations on a class that you need to write.  By trying to run the tests, you get a
89
-   nice list of what needs to be fixed in the "Messages Make" view.
90
-
91
-... and away you go!!!

二进制
docs/img/mac-osx--idea-ce-gradle-import-dialog.png 查看文件