Java、android開發環境變數的配置

來源:互聯網
上載者:User

標籤:maven   jdk   java開發環境   

1.  先安裝oracle11G,它會自動在環境變數中加入oracle所使用的jdk的配置.

2.  安裝好jdk,再進行Jdk配置,確保jdk7的環境變數配置一定要在  oracle的配置之前。

將jdk與jre都安裝到預設的路徑下,再進行環境變數配置

JAVA_HOME:   jdk路徑

PATH: %JAVA_HOME%\bin; %JAVA_HOME%\jre\bin;

CLASSPATH: .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar

完成後,請在控制台中測試:   java –version

                          Javac -version

3.  Android配置

將Android ADT bundle解壓到d:\ 目錄下.再進行配置:

ANDROID_HOME: D:\adt-bundle-windows-x86-20140702;

PATH: %ANDROID_HOME%\sdk\tools;%ANDROID_HOME%\sdk\platform-tools;

以下配置用來修改avd檔案的位置

ANDROID_SDK_HOME: d:\android\avd

4.  Maven配置

(1)環境變數

MAVEN_HOME :    D:\apache-maven-3.3.1
   MAVEN :          %MAVEN_HOME%\bin
  (可選) MAVEN_OPTS :   -Xms256m-Xmx512m

PATH:    %MAVEN%;

  (2)maven設定檔settings.xml 請拷貝一份到D:\apache-maven-3.3.1\conf,替換原來的settings.xml(  這份新的中主要是增加了私服的配置,請注意私服的ip地址,請根據私服的具體位置修改)

    用nexus代理Maven的中央倉庫,setting.xml的設定檔修改內容如下:

<mirrors>
     <mirror>
          <id>nexus</id>
          <mirrorOf>*</mirrorOf>
          <name>Nexus Mirror</name>
          <url>http://私服地址:8081/nexus/content/groups/public</url>
     </mirror>
  </mirrors>
  
  <profiles>
     <profile>
      <id>nexus</id>
      <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
     <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>nexus</activeProfile>
  </activeProfiles>

Java、android開發環境變數的配置

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.