davidcavazos commented on code in PR #22747:
URL: https://github.com/apache/beam/pull/22747#discussion_r951899351


##########
website/www/site/content/en/get-started/quickstart-java.md:
##########
@@ -1,5 +1,5 @@
 ---
-title: "Beam Quickstart for Java"
+title: "WordCount sample for Java"
 aliases:

Review Comment:
   Since this is no longer titled "Quickstart", maybe we should rename this 
file?



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit 
(JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the

Review Comment:
   Let's remove Java 8 since it's already end of life, so it's no longer 
supported.
   
   https://endoflife.date/java
   
   @kennknowles do you know if Beam already supports Java 17? From the docs it 
looks like it's [not supported yet](https://beam.apache.org/roadmap/java-sdk/).



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit 
(JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  
[JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:

Review Comment:
   Can we make these (Gradle / Maven) into tabs?



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit 
(JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  
[JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).

Review Comment:
   Again, with `sdkman` installing Gradle or Maven is really easy. Installing 
them manually is very painful, so I wouldn't send people through that route :)
   
   ```sh
   # To install Gradle.
   sdk install gradle
   
   # To install Maven.
   sdk install maven
   ```



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit 
(JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  
[JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)
+  environment variable is set and points to your JDK installation.
+2. You can use either Gradle or Apache Maven to run this quickstart:
+    - Gradle: Install [Gradle](https://gradle.org/install/).
+    - Maven: Download [Apache Maven](https://maven.apache.org/download.cgi) and
+     follow the [installation guide](https://maven.apache.org/install.html)
+     for your operating system.
+
+## Clone the GitHub repository
+
+Clone or download the
+[apache/beam-starter-java](https://github.com/apache/beam-starter-java) GitHub
+repository and change into the beam-starter-java directory.
+
+{{< highlight >}}
+git clone https://github.com/apache/beam-starter-java.git
+cd beam-starter-java
+{{< /highlight >}}
+
+## Run the quickstart
+
+**Gradle**: To run the quickstart with Gradle, run the following command:
+
+{{< highlight >}}
+gradle run --args='--inputText=Greetings'
+{{< /highlight >}}
+
+**Maven**: To run the quickstart with Maven, run the following command:
+
+{{< highlight >}}
+mvn compile exec:java -Dexec.args=--inputText='Greetings'
+{{< /highlight >}}
+
+The output is similar to the following:
+
+{{< highlight >}}
+Hello
+World!
+Greetings
+{{< /highlight >}}
+
+The lines might appear in a different order.
+
+## Explore the code
+
+The main code file for this quickstart is **App.java** 
+([GitHub](https://github.com/apache/beam-starter-java/blob/main/src/main/java/com/example/App.java)).
+The code performs the following steps:
+
+1. Create a Beam pipeline.
+3. Create an initial `PCollection`.
+3. Apply a transform to the `PCollection`.
+4. Run the pipeline, using the Direct Runner.
+
+### Create a pipeline
+
+The code first creates a `Pipeline` object. The `Pipeline` object builds up the
+graph of transformations to be executed.
+
+{{< highlight >}}

Review Comment:
   I believe it would be nice to include the language for the syntax 
highlighting (?)
   
   `{{< highlight java >}}`
   
   And same for other Java code snippets.



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:

Review Comment:
   We probably want to add `/get-started/quickstart-java/` to the aliases list 
here to redirect people from the "old quickstart".



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit 
(JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
+  version 8, 11, or 17. Verify that the
+  
[JAVA_HOME](https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars001.html)

Review Comment:
   If using `sdkman`, it already takes care of this automatically.



##########
website/www/site/content/en/get-started/quickstart/java.md:
##########
@@ -0,0 +1,185 @@
+---
+title: "Beam Quickstart for Java"
+aliases:
+  - /get-started/quickstart/
+  - /use/quickstart/
+  - /getting-started/
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# Apache Beam Java SDK quickstart
+
+This quickstart shows you how to run an
+[example pipeline](https://github.com/apache/beam-starter-java) written with
+the [Apache Beam Java SDK](/documentation/sdks/java), using the
+[Direct Runner](/documentation/runners/direct/). The Direct Runner executes
+pipelines locally on your machine.
+
+If you're interested in contributing to the Apache Beam Java codebase, see the
+[Contribution Guide](/contribute).
+
+On this page:
+
+{{< toc >}}
+
+## Set up your development environment
+
+1. Download and install the
+  [Java Development Kit 
(JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html)

Review Comment:
   I personally use `sdkman` to install Java, it's a lot easier it install and 
it allows you to choose which vendor's SDK to install.
   
   https://sdkman.io/
   
   I believe their default choice is the Temurin flavor (not Oracle) since it's 
open source and production ready.
   
   https://sdkman.io/jdks#tem
   
   I would personally recommend this route since it's faster, easier, and the 
installation cannot go wrong.
   
   ```sh
   # Install sdkman.
   curl -s "https://get.sdkman.io"; | bash
   
   # Install Java 11.
   sdk install java 11.0.12-tem
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to