{
  "id": 44798,
  "title": "How to run scala file? Do I need to make .jar file first?",
  "url": "/competitions/kkbox-churn-prediction-challenge/discussion/44798",
  "author_name": "",
  "post_date": "2017-12-02T17:29:39.447787400Z",
  "votes": null,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Would you like to provide a pointer to run a scala file?\nI installed scala, sbt, and spark to run the scala file. (Ubuntu environment)\n Do I need to make .jar file first?</p>\n\n<pre><code>$ spark-submit --master localhost ./WSDMChurnLabeller.scala\nError: Cannot load main class from JAR file:/--PATH--/WSDMChurnLabeller.scala\n</code></pre>",
  "messages": [
    {
      "id": "252290",
      "postDate": "12/02/2017 17:29:39",
      "content": "<p>Would you like to provide a pointer to run a scala file?\nI installed scala, sbt, and spark to run the scala file. (Ubuntu environment)\n Do I need to make .jar file first?</p>\n\n<pre><code>$ spark-submit --master localhost ./WSDMChurnLabeller.scala\nError: Cannot load main class from JAR file:/--PATH--/WSDMChurnLabeller.scala\n</code></pre>",
      "rawMarkdown": "Would you like to provide a pointer to run a scala file?\nI installed scala, sbt, and spark to run the scala file. (Ubuntu environment)\n Do I need to make .jar file first?\n\n    $ spark-submit --master localhost ./WSDMChurnLabeller.scala\n    Error: Cannot load main class from JAR file:/--PATH--/WSDMChurnLabeller.scala",
      "votes": null
    },
    {
      "id": "252663",
      "postDate": "12/03/2017 13:11:07",
      "content": "<p>I think I found out how to do</p>",
      "rawMarkdown": "I think I found out how to do",
      "votes": null
    },
    {
      "id": "256871",
      "postDate": "12/12/2017 21:35:21",
      "content": "<p>What did you end up doing?</p>",
      "rawMarkdown": "What did you end up doing?",
      "votes": null
    },
    {
      "id": "257194",
      "postDate": "12/13/2017 17:12:36",
      "content": "<p>Here is <a href=\"https://spark.apache.org/docs/latest/quick-start.html#self-contained-applications\">the documentation</a> of running scala on spark.</p>",
      "rawMarkdown": "Here is [the documentation](https://spark.apache.org/docs/latest/quick-start.html#self-contained-applications) of running scala on spark.",
      "votes": null
    },
    {
      "id": "257250",
      "postDate": "12/13/2017 19:53:51",
      "content": "<p>I have been trying to follow that documentation. Getting the following error at the \"sbt package\" step. Anyone know what causes it?</p>\n\n<p>&gt; [error] /home/nicholas/Downloads/kkbox/src/main/scala/WSDMChurnLabeller.scala:10:8: WSDMChurnLabeller is already defined as object WSDMChurnLabeller</p>\n\n<p>[error] object WSDMChurnLabeller {</p>\n\n<p>[error]             ^</p>\n\n<p>[error] one error found</p>\n\n<p>[error] (compile:compileIncremental) Compilation failed</p>\n\n<p>[error] Total time: 7 s, completed Dec 13, 2017 1:51:01 PM</p>",
      "rawMarkdown": "I have been trying to follow that documentation. Getting the following error at the \"sbt package\" step. Anyone know what causes it?\n\n&gt; [error] /home/nicholas/Downloads/kkbox/src/main/scala/WSDMChurnLabeller.scala:10:8: WSDMChurnLabeller is already defined as object WSDMChurnLabeller\n\n[error] object WSDMChurnLabeller {\n\n[error]             ^\n\n[error] one error found\n\n[error] (compile:compileIncremental) Compilation failed\n\n[error] Total time: 7 s, completed Dec 13, 2017 1:51:01 PM",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 252663,
      "author_name": "sundong",
      "author_url": "",
      "post_date": "12/03/2017 13:11:07",
      "content": "<p>I think I found out how to do</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 256871,
      "author_name": "monsieurwagner",
      "author_url": "",
      "post_date": "12/12/2017 21:35:21",
      "content": "<p>What did you end up doing?</p>",
      "votes": null,
      "replies": [
        {
          "id": 257194,
          "author_name": "infinitewing",
          "author_url": "",
          "post_date": "12/13/2017 17:12:36",
          "content": "<p>Here is <a href=\"https://spark.apache.org/docs/latest/quick-start.html#self-contained-applications\">the documentation</a> of running scala on spark.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 257250,
          "author_name": "monsieurwagner",
          "author_url": "",
          "post_date": "12/13/2017 19:53:51",
          "content": "<p>I have been trying to follow that documentation. Getting the following error at the \"sbt package\" step. Anyone know what causes it?</p>\n\n<p>&gt; [error] /home/nicholas/Downloads/kkbox/src/main/scala/WSDMChurnLabeller.scala:10:8: WSDMChurnLabeller is already defined as object WSDMChurnLabeller</p>\n\n<p>[error] object WSDMChurnLabeller {</p>\n\n<p>[error]             ^</p>\n\n<p>[error] one error found</p>\n\n<p>[error] (compile:compileIncremental) Compilation failed</p>\n\n<p>[error] Total time: 7 s, completed Dec 13, 2017 1:51:01 PM</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "252290": "Would you like to provide a pointer to run a scala file?\nI installed scala, sbt, and spark to run the scala file. (Ubuntu environment)\n Do I need to make .jar file first?\n\n    $ spark-submit --master localhost ./WSDMChurnLabeller.scala\n    Error: Cannot load main class from JAR file:/--PATH--/WSDMChurnLabeller.scala",
    "252663": "I think I found out how to do",
    "256871": "What did you end up doing?",
    "257194": "Here is [the documentation](https://spark.apache.org/docs/latest/quick-start.html#self-contained-applications) of running scala on spark.",
    "257250": "I have been trying to follow that documentation. Getting the following error at the \"sbt package\" step. Anyone know what causes it?\n\n&gt; [error] /home/nicholas/Downloads/kkbox/src/main/scala/WSDMChurnLabeller.scala:10:8: WSDMChurnLabeller is already defined as object WSDMChurnLabeller\n\n[error] object WSDMChurnLabeller {\n\n[error]             ^\n\n[error] one error found\n\n[error] (compile:compileIncremental) Compilation failed\n\n[error] Total time: 7 s, completed Dec 13, 2017 1:51:01 PM"
  },
  "source": "meta"
}