2017-08-01 93 views
0

因此,這是第一次使用任何bluemix服務,並且出現以下錯誤,並且無法找到與此有關的任何幫助。 我是否缺少基本的設置?我錯過了一些基本的東西嗎? Personality Insights

任何幫助表示讚賞,謝謝。

錯誤是:

> Error: Could not find or load main class 
> com.ibm.watson.developer_cloud.personality_insights.v3.Main 

屏幕截圖:http://imgur.com/a/ArkP6

代碼:

package com.ibm.watson.developer_cloud.personality_insights.v3; 

import com.ibm.watson.developer_cloud.personality_insights.v3.model.Profile; 

public class Main { 
public static void main(String[] args) { 
    System.out.println("kek"); 


    PersonalityInsights service = new PersonalityInsights("2016-10-19"); 
    service.setUsernameAndPassword(Blanked); 

    // Demo content from Moby Dick by Hermann Melville (Chapter 1) 
    String text = "Call me Ishmael. Some years ago-never mind how long precisely-having " 
      + "little or no money in my purse, and nothing particular to interest me on shore, " 
      + "I thought I would sail about a little and see the watery part of the world. " 
      + "It is a way I have of driving off the spleen and regulating the circulation. " 
      + "Whenever I find myself growing grim about the mouth; whenever it is a damp, " 
      + "drizzly November in my soul; whenever I find myself involuntarily pausing before " 
      + "coffin warehouses, and bringing up the rear of every funeral I meet; and especially " 
      + "whenever my hypos get such an upper hand of me, that it requires a strong moral " 
      + "principle to prevent me from deliberately stepping into the street, and methodically " 
      + "knocking people's hats off-then, I account it high time to get to sea as soon as I can. " 
      + "This is my substitute for pistol and ball. With a philosophical flourish Cato throws himself " 
      + "upon his sword; I quietly take to the ship. There is nothing surprising in this. " 
      + "If they but knew it, almost all men in their degree, some time or other, cherish " 
      + "very nearly the same feelings towards the ocean with me. There now is your insular " 
      + "city of the Manhattoes, belted round by wharves as Indian isles by coral reefs-commerce surrounds " 
      + "it with her surf. Right and left, the streets take you waterward."; 

    ProfileOptions options = new ProfileOptions.Builder().text(text).build(); 
    Profile profile = service.profile(options).execute(); 

    System.out.println(profile); 
} 

} 

回答

0

這聽起來像一個類路徑問題。你運行它時是否指定了這個類的jar在你的類路徑中(又名java -cp...)?

相關問題