This page is no longer maintained — Please continue to the home page at www.scala-lang.org

"Could not find the main class"

1 reply
jlist9
Joined: 2009-09-29,
User offline. Last seen 42 years 45 weeks ago.

Hi,

I mentioned this on scala user list but I think the tools list should be
a better place for this question. So here it goes.

I wanted to try eclipse again so I downloaded eclipse classic 3.5.2, and
scala eclipse plugin from this page: http://www.scala-lang.org/node/94
I find that it's version 2.7.7. I assume this is also the scala version that's
included in the plugin? I wonder if there is a 2.8 version plugin or should
I try the URL for nightly?

Anyway, I installed 2.7.7, and created a Scala project. When I tried to
create a scala application, I typed in a name, the wizard complains that
"Resource with same name already exists". I changed to some odd names,
still got the same error. So I just clicked Cancel to close it, but I saw all
those scala files created already.

I then deleted all scala files but the one I created first, and tried to run it,
I get "Could not find the main class. Program will exit". Up to this point
I haven't figured out how to run a scala app in my new environment. (I was
able to do it when I tried eclipse scala plugin last time.)

Any idea what I'm missing/doing wrong?

Thanks

Walter van der Laan
Joined: 2010-02-01,
User offline. Last seen 42 years 45 weeks ago.
Re: "Could not find the main class"

jlist9 writes:

> I wanted to try eclipse again so I downloaded eclipse classic 3.5.2, and
> scala eclipse plugin from this page: http://www.scala-lang.org/node/94
> I find that it's version 2.7.7. I assume this is also the scala version that's
> included in the plugin? I wonder if there is a 2.8 version plugin or should
> I try the URL for nightly?

The 2.8 plugin is located at http://www.scala-lang.org/scala-eclipse-plugin-beta-
preview

This might fix your problems. It works fine for me with classic 3.5.2

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland