[scala-tools] Eclipse sees scala source as java

View: New views
7 Messages — Rating Filter:   Alert me  

[scala-tools] Eclipse sees scala source as java

by Bram Bouwens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just did a fresh install of eclipse 3.4.2 (eclipse-SDK-3.4.2-linux-gtk-x86_64.tar.gz)
on Linux (Fedora 10).

Then I installed the Scala plugin as described in http://www.scala-lang.org/node/94
and tried the little Test Example there.

Now the problem is that the program is compiled as if it's plain old java, see
http://www.xs4all.nl/~bbouwens/scala_hello.png

I've been doing Java in eclipse for years, but I'm really not a wizard, and I'm new
to Scala. So I wonder, what could I be doing wrong?

Regards,


Bram

Re: [scala-tools] Eclipse sees scala source as java

by Bram Bouwens :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry to reply to my own message, but I think I found the cause:
installation of the Scala plugin requires write access to the
eclipse package. When I fixed that an reinstalled the plugin, it worked.

I would recommend adding a comment in this sense to the instructions.


Bram

Re: [scala-tools] Eclipse sees scala source as java

by BillyPilgrim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I had the same problem on Fedora 10.

I am using Fedora 10's version of Eclipse which is installed as an rpm package.  All I had to do was run Eclipse as root and install the scala plugin as root then it was available to me under my user account and functions properly.  Other plugins have no problem being installed by a user but the scala plugin won't install properly unless you so it as root.

Re: [scala-tools] Eclipse sees scala source as java

by Miles Sabin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, May 24, 2009 at 6:11 PM, BillyPilgrim <billy-pilgrim@...> wrote:
> I am using Fedora 10's version of Eclipse which is installed as an rpm
> package.  All I had to do was run Eclipse as root and install the scala
> plugin as root then it was available to me under my user account and
> functions properly.  Other plugins have no problem being installed by a user
> but the scala plugin won't install properly unless you so it as root.

Actually it's not necessary to install the Scala IDE as root, however,
due to an Eclipse limitation which will go away in 3.5 when it's
finally released there are a few hoops you have to jump through to
make it work.

You can find detailed instructions here,

  http://wiki.eclipse.org/JDT_weaving_features

See the section headed "Installing JDT Weaving in a non-default location".

Cheers,


Miles

--
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://twitter.com/milessabin

Re: [scala-tools] Eclipse sees scala source as java

by Antony Stubbs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I seem to have the same problem on OSX. Installing as root didn't help. I'm running Eclipse 3.5.

I also see the same problem as this http://lampsvn.epfl.ch/trac/scala/ticket/2090

I will try the nightly...


Miles Sabin wrote:
On Sun, May 24, 2009 at 6:11 PM, BillyPilgrim <billy-pilgrim@lycos.com> wrote:
> I am using Fedora 10's version of Eclipse which is installed as an rpm
> package.  All I had to do was run Eclipse as root and install the scala
> plugin as root then it was available to me under my user account and
> functions properly.  Other plugins have no problem being installed by a user
> but the scala plugin won't install properly unless you so it as root.

Actually it's not necessary to install the Scala IDE as root, however,
due to an Eclipse limitation which will go away in 3.5 when it's
finally released there are a few hoops you have to jump through to
make it work.

You can find detailed instructions here,

  http://wiki.eclipse.org/JDT_weaving_features

See the section headed "Installing JDT Weaving in a non-default location".

Cheers,


Miles

--
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://twitter.com/milessabin
___________________________
http://stubbisms.wordpress.com

Re: [scala-tools] Eclipse sees scala source as java

by Antony Stubbs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Same thing with
Eclipse Weaving Service Feature 1.6.4.20090313172428 org.eclipse.contribution.weaving.feature.group
Scala Eclipse Plugin 2.8.0.r18245-b20090710023859 ch.epfl.lamp.sdt.feature.group

i.e. the
object HiWorld extends Application {
    Console.println("Hello World!")
  }

gives:
Description Resource Path Location Type
Syntax error on token "object", interface expected HiWorld.scala /test2/src line 1 Java Problem
 etc...


I seem to have the same problem on OSX. Installing as root didn't help. I'm running Eclipse 3.5.

I also see the same problem as this http://lampsvn.epfl.ch/trac/scala/ticket/2090

I will try the nightly...


Miles Sabin wrote:
On Sun, May 24, 2009 at 6:11 PM, BillyPilgrim <billy-pilgrim@lycos.com> wrote:
> I am using Fedora 10's version of Eclipse which is installed as an rpm
> package.  All I had to do was run Eclipse as root and install the scala
> plugin as root then it was available to me under my user account and
> functions properly.  Other plugins have no problem being installed by a user
> but the scala plugin won't install properly unless you so it as root.

Actually it's not necessary to install the Scala IDE as root, however,
due to an Eclipse limitation which will go away in 3.5 when it's
finally released there are a few hoops you have to jump through to
make it work.

You can find detailed instructions here,

  http://wiki.eclipse.org/JDT_weaving_features

See the section headed "Installing JDT Weaving in a non-default location".

Cheers,


Miles

--
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://twitter.com/milessabin

___________________________
http://stubbisms.wordpress.com

Re: [scala-tools] Eclipse sees scala source as java

by Miles Sabin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is definitely due to JDT Weaving not being enabled for you
installation ... see the other thread.

Cheers,


Miles

--
Miles Sabin
tel: +44 (0)7813 944 528
skype:  milessabin
http://www.chuusai.com/
http://twitter.com/milessabin