[Windows] Win7 Configuring the Java Development environment

Source: Internet
Author: User

Installed softwares
    • Git for Windows bit
    • Java 7 & 8 bit
    • Apache Maven 3.3.3
    • Intellij Idea IDE
Git

Installing Git is a success. Git can be used both as a git bash and as a general Linux bash. Very convenient. Cygyin is omitted.

Maven

Maven doesn't seem to differentiate the OS, download the tar package, and unzip it with Git bash.

Java

Installs two versions of Java. Because there are spaces in the Java directory, an error occurs, so create a new empty directory/software directly. The installed software is put on the inside. There was a problem selecting the directory when installing one of the versions of the JRE. The result is that the registry is confusing, Git is looking for Java error

Error:registry key ' Software\javasoft\java Runtime environment ' \currentversion ' have value ' 1.8 ', but ' 1.7 ' is required.

Google found the http://stackoverflow.com/questions/29697543/registry-key-error-java-version-has-value-1-8-but-1-7-is-required. Select how you would modify the registry.

1. Change current version to 1.7

2. Configure the Java home configuration

For example, configure JAVA7:

C:\Software\Java\jdk1.7.0_79\jre

C:\Software\Java\jdk1.7.0_79\jre\bin\server\jvm.dll

So git can find java.

Configuring Environment variables

installed, the next step is to get git bash to find mvn, Java7, java8 these commands. First, create a file that manages the environment variables.

VI ~/.bash_profile

Export path= $PATH:/c/software/apache-maven-3.3.3/Binexport maven_opts="-xmx3072m-xx:maxpermsize=1024m"Export Jdk7_home=/c/software/java/jdk1.7. 0_79export Jdk8_home=/c/software/java/jdk1.8. 0_91export PATH= $JAVA _home/Bin: $PATHif[-Z $JAVA _home]; ThenExport Java_home=$JDK 7_homefialias Java7="export java_home= $JDK 7_home; java-version"alias Java8="export java_home= $JDK 8_home; java-version"

The file directory is changed to what git likes to look like. Save Remember

SOURCE ~/.bash_profile

[Windows] Win7 Configuring the Java Development environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.