2016-11-12 5 views
0

「Javaで計算集約型のタスクを実行する方法」のチュートリアルに従っています。 はしかし、私は、次のステップにこだわっている:
https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-classic-java-run-compute-intensive-task/#how-to-create-a-java-application-that-performs-a-compute-intensive-taskEclipseでMicrosoft Azureの依存関係を解決する方法

Eclipseは、これらの依存関係が解決できないというエラーが表示されます。

import com.microsoft.windowsazure.services.core.Configuration; 
import com.microsoft.windowsazure.services.core.ServiceException; 
import com.microsoft.windowsazure.services.serviceBus.*; 
import com.microsoft.windowsazure.services.serviceBus.models.*;` 

私はEclipseを使用していると私は、ダウンロードしましたEclipse用Azureツールキット

は、ここに私のEclipseプロジェクトがどのように見えるかです:

Project

コードは単にTSPSolver.javaのコピー&ペーストです。

答えて

0

私の経験上、いくつかの依存ライブラリが見つからないために、Java Build Pathを設定して追加しようとするか、またはMavenプロジェクトのpom.xmlファイルを解決して解決することができませんでした。

最初の方法は、Build Pathを設定して従属ライブラリを追加することです。これらのライブラリとその依存関係はlinkからダウンロードできます。

  1. Build Pathを選択し、プロジェクト名をクリックするとConfigure Build Pathをクリックします。 enter image description here

  2. pom.xmlファイルにMavenの依存関係を追加し、クリックを経由して第二の方法についてはAdd External Class Folder enter image description here

をこれらのjarファイルを追加します。

  1. 現在の通常のEclipseプロジェクトをMavenプロジェクトに変換します。 enter image description here

  2. は、プロジェクト内のpom.xmlファイルを開き、link1 & link2から以下の内容を追加します。

    <dependencies> 
        <dependency> 
         <groupId>com.microsoft.azure</groupId> 
         <artifactId>azure-core</artifactId> 
         <version>0.9.7</version> 
        </dependency> 
        <dependency> 
         <groupId>com.microsoft.azure</groupId> 
         <artifactId>azure-servicebus</artifactId> 
         <version>0.9.7</version> 
        </dependency> 
    </dependencies> 
    
関連する問題