Preparing a Java Development Environment for Spark
Scenario
The Java development environment can be set up on Windows, but the operating environment (client) can be deployed on Linux only.
Procedure
- The IDEA tool is recommended for the Java development environment. The installation requirements are as follows:
- JDK 1.7 or 1.8 is required.
- IntelliJ IDEA 13.1.6 is required.
- Spark tasks cannot be submitted to a server in Yarn-client mode when client applications are running on IBM JDK 1.7.
- Oracle JDK requires security hardening. The operations are as follows:
- Obtain the Java Cryptography Extension (JCE) file whose version matches that of JDK from the Oracle official website. After decompression, the JCE file contains local_policy.jar and US_export_policy.jar. Copy the JAR file to the following directory:
Linux: JDK installation directory/jre/lib/security
Windows: JDK installation directory\jre\lib\security
- Copy SMS4JA.jar in the Client installation directory/JDK/jdk/jre/lib/ext/ directory to the following directory:
Linux: JDK installation directory/jre/lib/ext/
Windows: JDK installation directory\jre\lib\ext\
- Install and configure the IntelliJ IDEA and JDK tools.
- Install the JDK.
- Install IntelliJ IDEA.
- Configure the JDK in the IntelliJ IDEA.
- Start the IntelliJ IDEA and select Configure.
Figure 1 Quick start
- Choose Project Defaults on the Configure page.
Figure 2 Configure page
- Choose Project Structure on the Project Defaults page.
Figure 3 Project Defaults page
- On the Project Structure page, select SDKs and click the green plus sign to add the JDK.
Figure 4 Adding the JDK
- On the Select Home Directory for JDK page that is displayed, select the JDK directory and click OK.
Figure 5 Selecting the JDK directory
- After selecting the JDK, click OK to complete the configuration.
Figure 6 Completing the JDK configuration
- Start the IntelliJ IDEA and select Configure.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot