Scala Plugin Version 1 for NetBeans 6.7 Released

>>> Updated on July 1, 2009

There are couple of reports on "Could not connect to compilation daemon.", mostly under Windows OS. It's a known issue, to resolve it, please check the following:

  • SCALA_HOME is set to a fresh installed Scala runtime
  • PATH includes $SCALA_HOME/bin
  • If the build task still complain, try to run "fsc" or "scala" in a command window first

======

I'm pleased to announce the availability of Scala plugin version 1 for NetBeans 6.7

What's new:

  • Use fsc instead of scalac as the project building compiler (If you've set SCALA_HOME, make sure $SCALA_HOME/bin is included in your PATH environment).
  • Fixed setting breakpoint in closure statement.
  • A basic import-fixer (Right click on source, then choose "Fix Imports").
  • Code assistant for local vars and functions.
  • Run/Debug single file.

To download, please go to:  https://sourceforge.net/project/showfiles.php?group_id=192439&package_id=256544&release_id=686747

For more information, please see  http://wiki.netbeans.org/Scala

Bug reports are welcome.

It works on NetBeans 6.7 RC1 or above.

  • Posted: 2009-06-01 09:00 (Updated: 2009-12-30 11:16)
  • Author: dcaoyuan
  • Categories: NetBeans

Comments

1. Emil Ivanov -- 2009-06-01 09:00

Great work! Thank you!

2. gotaproblem -- 2009-06-01 09:00

when i try to add a new scala platform i get this:  http://ubuntu.pastebin.com/m4128236d ideas?

3. -- 2009-06-02 09:00

Running the default Hello World under Netbeans 6.7 RC1 on Windows Vista x64 results in a compile error.

Both x86 and x64 JDK's are installed on the system.

SCALA_HOME is set, as well as a path to the bin dir in SCALA_HOME (hard path)

 http://pastebin.com/m34b4ed32

4. Caoyuan -- 2009-06-02 09:00

@83.163.50.11, it seems the fsc server is not started. Try to run scala once, and try again.

5. Brian Clapper -- 2009-06-02 09:00

The plugin seems to be bundled with Scala 2.7.3. Why not 2.7.4, at the very least? (2.7.5 was released yesterday.)

6. Caoyuan -- 2009-06-02 09:00

@Brian, the bundled Scala is used for IDE itself, it's ok for all 2.7.x serials. To specify a custom scala version, please set SCALA_HOME.

And I'm actually waiting for scala 2.8.x, which brings some new language features.

7. Marcus Olk -- 2009-06-02 09:00

The plugin doesn't work with RC1: When trying to compile a Scala application created with the wizard I get this error:

Could not connect to compilation daemon. org.netbeans.core.execution.ExitSecurityException?: Exit from within execution engine, normal

at org.netbeans.core.execution.SecMan?.checkExitImpl(SecMan?.java:85) at org.netbeans.core.execution.SecMan?$PrivilegedCheck?.run(SecMan?.java:160) at java.security.AccessController?.doPrivileged(Native Method) at org.netbeans.core.execution.SecMan?$PrivilegedCheck?.check(SecMan?.java:175) at org.netbeans.core.execution.SecMan?$PrivilegedCheck?.checkExit(SecMan?.java:170) at org.netbeans.core.execution.SecMan?.checkExit(SecMan?.java:69) at org.netbeans.TopSecurityManager?.checkExit(TopSecurityManager?.java:149) at java.lang.Runtime.exit(Runtime.java:88) at java.lang.System.exit(System.java:906) at scala.Predef$.exit(Predef.scala:81) at scala.tools.nsc.CompileSocket?.fatal(CompileSocket?.scala:53) at scala.tools.nsc.CompileSocket?.getPort(CompileSocket?.scala:175) at scala.tools.nsc.CompileSocket?.getsock$1(CompileSocket?.scala:206) at scala.tools.nsc.CompileSocket?.getOrCreateSocket(CompileSocket?.scala:227) at scala.tools.nsc.StandardCompileClient?.main0(CompileClient?.scala:94) at scala.tools.ant.FastScalac?.execute(FastScalac?.scala:96) at org.apache.tools.ant.UnknownElement?.execute(UnknownElement?.java:288) at sun.reflect.GeneratedMethodAccessor?49.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils?.execute(DispatchUtils?.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62) at org.apache.tools.ant.UnknownElement?.execute(UnknownElement?.java:288) at sun.reflect.GeneratedMethodAccessor?49.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils?.execute(DispatchUtils?.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.MacroInstance?.execute(MacroInstance?.java:394) at org.apache.tools.ant.UnknownElement?.execute(UnknownElement?.java:288) at sun.reflect.GeneratedMethodAccessor?49.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl?.invoke(DelegatingMethodAccessorImpl?.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils?.execute(DispatchUtils?.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor?.executeTargets(DefaultExecutor?.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.module.bridge.impl.BridgeImpl?.run(BridgeImpl?.java:278) at org.apache.tools.ant.module.run.TargetExecutor?.run(TargetExecutor?.java:497) at org.netbeans.core.execution.RunClassThread?.run(RunClassThread?.java:151)

Bummer, Marcus

8. Marcus Olk -- 2009-06-02 09:00

Running a Scala application created with the new project wizard gets me this error:

Could not connect to compilation daemon. org.netbeans.core.execution.ExitSecurityException?: Exit from within execution engine, normal

at org.netbeans.core.execution.SecMan?.checkExitImpl(SecMan?.java:85) at org.netbeans.core.execution.SecMan?$PrivilegedCheck?.run(SecMan?.java:160) at java.security.AccessController?.doPrivileged(Native Method) at org.netbeans.core.execution.SecMan?$PrivilegedCheck?.check(SecMan?.java:175) at org.netbeans.core.execution.SecMan?$PrivilegedCheck?.checkExit(SecMan?.java:170) at org.netbeans.core.execution.SecMan?.checkExit(SecMan?.java:69) at org.netbeans.TopSecurityManager?.checkExit(TopSecurityManager?.java:149)

(I had to remove to rest of the stacktrace to avoid beeing considered as spam ...)

Any ideas?

Marcus

9. Marcus Olk -- 2009-06-02 09:00

I figured out that I have to connect the plugin with my installation of Scala via SCALA_HOME. I thought that the plugin comes with a Scala compiler and runtime?

Using my local Scala installation works now.

Marcus

10. Martin Sturm -- 2009-06-07 09:00

I tried the new Scala plugin in Netbeans 6.7 RC1 and RC2, but have an issue when running 'Test Project'. The output shows the following: init: deps-jar: compile: /Users/martin/Projects/javafx/Yasc/nbproject/build-impl.xml:584: Unknown attribute [debug] BUILD FAILED (total time: 1 second)

Where build-impl.xml around line 584 says the following:

<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">

<scalaProject1:scalac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> <copy todir="${build.test.classes.dir}">

<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}&#10; " includes="${includes}"/>

</copy>

</target>

the 'debug="true"' seems to be the problem...

Apart from this issue, I must say that it is a very nice released compared to the versions for NB 6.5. It feels a lot faster! Thanks for the effort!!