| Author |
Scala not compiling on Eclipse
|
Alejandro Barrero
Ranch Hand
Joined: Aug 01, 2005
Posts: 264
|
|
|
I installed the plug-in. I can create scala projects and scala objects. I am following the tutorial in Scala development with Eclipse. I enabled JDT Weaving. It is not compiling even if I deselect Build Automatically and click on Build Project.
|
Your help will be greatly appreciated,
Alejandro Barrero
|
 |
Luigi Plinge
Ranch Hand
Joined: Jan 06, 2011
Posts: 439
|
|
Have you tried Setup Diagnostics in the Scala menu?
Then check your Project Properies, under Scala Compiler, check that the Use Project Properties box is unticked (so that you will use the global defaults).
Make sure you have your project set up as a Scala project rather than a Java one. If not, you can add a Scala Nature by right-clicking and selecting Configure...
I found the Eclipse error messages were not very useful. If your project doesn't compile, it tells you it had a problem loading your classes, rather than giving you the compiler error message.
|
 |
Alejandro Barrero
Ranch Hand
Joined: Aug 01, 2005
Posts: 264
|
|
Thanks for your help Luigi. It is a Scala project. The Use Project Properties box is unticked. I don't know how to setup Diagnostics in the Scala menu; I couldn't find a Scala menu. I still can't run it. This is my file:
|
 |
Luigi Plinge
Ranch Hand
Joined: Jan 06, 2011
Posts: 439
|
|
The tutorial you're looking at is over 2 years old, and the Eclipse plugin has changed a lot. Follow the instructions at this site : http://www.scala-ide.org/
Make sure you have the latest Scala installed, which is 2.9.0.1, and a recent compatible version of Eclipse.
Are you able to compile and run your Hello World program from the command line? Also see http://en.wikipedia.org/wiki/Scala_%28programming_language%29 Hello World example
|
 |
 |
|
|
subject: Scala not compiling on Eclipse
|
|
|