• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scala not compiling on Eclipse

 
Alejandro Barrero
Ranch Hand
Posts: 335
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Luigi Plinge
Ranch Hand
Posts: 441
IntelliJ IDE Scala Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 335
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 441
IntelliJ IDE Scala Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic