【问题标题】:Am I missing something basic? Personality Insights我错过了一些基本的东西吗?个性洞察
【发布时间】:2018-01-08 04:28:48
【问题描述】:

所以这是第一次使用任何 bluemix 服务,我收到以下错误,并且在网上找不到与此相关的任何帮助。 我错过了一些基本的设置吗?

感谢您的帮助。

错误是:

> 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);
}

}

【问题讨论】:

    标签: ibm-cloud watson personality-insights


    【解决方案1】:

    这听起来像是一个类路径问题。当你运行它时,你是否指定了这个类的 jar 在你的类路径中(又名java -cp...)?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-09-06
      • 2017-10-19
      • 2012-02-11
      • 2021-03-14
      • 2015-07-15
      • 2010-10-17
      • 2019-09-18
      • 1970-01-01
      相关资源
      最近更新 更多