wood burning stoves 2.0*
The moose likes Scala and the fly likes Scala not compiling on Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Languages » Scala
Bookmark "Scala not compiling on Eclipse" Watch "Scala not compiling on Eclipse" New topic
Author

Scala not compiling on Eclipse

Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 319
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: 441

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: 319
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: 441

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scala not compiling on Eclipse