I am facing a weird situation with Eclipse Oxygen. I did as follow:

  • Created a Maven Project
  • Added Scala Nature
  • Changed Scala compiler to 2.10.6
  • Added a dummy hello world object


object SSHbaseApp extends App{
  println("Running SSHbaseApp...")

And Eclipse gave me the option to Run As... Scala Application

Then I added a few packages in the pom:


The I Run As... Maven Install and I then eclipse doesn't give me the option of Run As Scala Application any more.

I commented out these two packages I added in the POM, repeat the Maven Install and then I am able to keep running as Scala Application.

Anyone knows why this may be happening?

The whole POM.xml looks like this now:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">









1 Answers

Eduardo Mendes On Best Solutions

Still not 100% sure if it was my mistake or a bug in Eclipse, but I was able to sorted out in the following way.

Firstly I notice a red exclamation mark next to my project name. Maven was showing BUILD SUCCESS, but some errors were still there.

I checked what was the error and it said:

Error in Scala compiler: object scala.runtime in compiler mirror not found. SparkStreamingHbaseSandbox Unknown Scala Problem

I solved this one by going into:

Properties -> Scala Compiler -> Scala Installation I changed from Latest 2.10 bundle (dynamic) to Fixed Scala Installation: 2.10.6 (built-in)

After a new build with Maven the exclamation mark and the errors disappear. But it still didn't let me Run my app as Scala Application.

So last step was to close that project inside eclipse and reopen again... And problem solved.