Scala on NetBeans Modules on Update Center Now
>>> Updated Feb 2, 2008:
There is an issue in auto-generated Scala project's ant build-impl.xml file, which get the scala.home property wrongly set. I just fixed it, please wait the new Scala Project module to be available on Update Center, which version should be 1.2.1.
======
I've added Scala modules to nightly build cluster, so, you can get/update these modules via NetBeans plugins update center from today.
Since these modules are experimental, I recommend you to download a nightly build version NetBeans before get these modules, you can get the latest nightly build NetBeans from: http://bits.netbeans.org/download/trunk/nightly/latest/
To get the Scala modules, open menu: [Tools]->[Plugins]</b>, check [Setting] to ensure "Last Development Build" is in the list of Update Centers, which with Url:
Then in the [Available Plugins] tab, you can find the "Scala" category, which currently contains 3 modules: Scala Console, Scala Editing, Scala Project (you may need to click [Reload Category]). Select them and click [Install]
Notes:
- Don't forget to set your <b>SCALA_HOME</b> environment first, and append -J-Dscala.home=scalahomepath (for Windows users, try to append -J-Dscala.home=%SCALA_HOME%) to the end of "netbeans_default_options" in your netbeans.conf file, where, scalahomepath is your Scala home's absolute path. For example: /Users/dcaoyuan/apps/scala/share/scala/ (which contains sub-directory: bin, lib etc). netbeans.conf is located at "pathToNetBeansInstallationDirectory/etc", in Mac OSX, it could be:
- /Applications/NetBeans/NetBeans\ 6.0.app/Contents/Resources/NetBeans/etc, or ~/SomePath/netbeans/etc
- The Scala Project supporting has been rewritten, so if you have Scala projects created by previous Scala plugin, you should recreate new Scala project, and copy source files to this new created project's src directory.
- Debugger module is not released yet.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/blog_logo.png)
rss
Comments
Thanks for all your work. I am new to Scala, but your posts made all this very interesting. I just downloaded the latest Netbeans build and the latest Scala version. Looking forward to playing with the language and your plugin.
How come it is already Friday in Canada? Anyway, I finally will be downloading NB6. Thanks!
Great work. Keep it up.
This blog is hosted in China freely by my friend, and the timezone is set to China at the beginning, so I just let it be. It's already Friday in China :-)
I just adjusted the timezone to Canada Pacific
Can't get this to work in NB6.1M1. Everything goes well until I try to create a Scala project. I get the following:
<pre> java.lang.NoSuchMethodError?: org.netbeans.spi.project.support.ant.ProjectGenerator?.createProject(Lorg/openide/filesystems/FileObject;Ljava/lang/String;Ljava/lang/String;)Lorg/netbeans/spi/project/support/ant/AntProjectHelper;
[catch] at org.openide.util.RequestProcessor?$Processor.run(RequestProcessor?.java:986) </pre>
Can't get this to work in NB6.1M1. Everything goes well until I try to create a Scala project. I get the following (can' t post the whole stack, 1000 limit):
<pre> java.lang.NoSuchMethodError?: org.netbeans.spi.project.support.ant.ProjectGenerator?.createProject(Lorg/openide/filesystems/FileObject;Ljava/lang/String;Ljava/lang/String;)Lorg/netbeans/spi/project/support/ant/AntProjectHelper;
</pre>
Hi Curtis,
This doesn't happen on NetBeans nightly build. If I have time, I'll try to take a look at M1.
BTW, the current NetBeans nightly build is not stable yet, there are some Exceptions throwing out when do Java editing, but it seems not affecting Scala editing. Hope this issue will go on soon.
Cool, thanks. Look forward to trying it.
I installed the module in the current Netbeans snapshot (OSX 10.5), but whenever I try to run the project, I get:
Could not load definitions from resource scala/tools/ant/antlib.xml. It could not be found.
I cannot find this antlib.xml file anywhere in my scala distribution.
Help!
Please disregard my last comment, I upgraded to the latest plugin versions and it seems to work now.
where to report issues? IMO, this one is your - http://www.netbeans.org/issues/show_bug.cgi?id=126596
Hi Lukas,
You can report issues under "languages"->"code" subcomponent
Great improvements, but unfortunately I get a very annoying error every time I type a '.', because of the completion mechanism:
java.lang.NullPointerException?
Caused: java.lang.reflect.InvocationTargetException?
Btw. Can you please change scalac to fsc in the ant script to speed up compilation as I have to edit the build-impl.xml again as soon as change a project properties.
Nichael,
Which version are you using? I do not encounter the issue when press "."
To replace scalac with fsc, I have to make sure SCALA_HOME working on all OSes, Mac, Windows, Linux etc. So please wait for some time. For a temporary solution, you may try to link scalac to fsc?
Thanks for the update, Editor Module Update 1.0.4 -> 1.0.5 fixes the problem :-)
I'm getting this stack trace trying to start a new Scala project from yesterday's build. This is with the
netbeans-trunk-nightly-200802120006-javaee-macosx.dmg
JavaEE NetBeans build.
java.lang.NoClassDefFoundError?: org/netbeans/modules/j2ee/persistence/spi/PersistenceLocationProvider
[catch] at org.openide.util.RequestProcessor?$Processor.run(RequestProcessor?.java:986)
I'm getting this stack trace trying to start a new Scala project from yesterday's build. This is with the netbeans-trunk-nightly-200802120006-javaee-macosx.dmg JavaEE NetBeans build. java.lang.NoClassDefFoundError?: org/netbeans/modules/j2ee/persistence/spi/PersistenceLocationProvider at java.lang.ClassLoader?.defineClass1(Native Method) at java.lang.ClassLoader?.defineClass(ClassLoader?.java:620) at org.netbeans.JarClassLoader?.doLoadClass(JarClassLoader?.java:242) at org.netbeans.ProxyClassLoader?.selfLoadClass(ProxyClassLoader?.java:253) at org.netbeans.ProxyClassLoader?.loadClass(ProxyClassLoader?.java:227) at java.lang.ClassLoader?.loadClass(ClassLoader?.java:251) at java.lang.ClassLoader?.loadClassInternal(ClassLoader?.java:319) at org.netbeans.modules.scala.project.J2SEProject.createLookup(J2SEProject.java:252) at org.netbeans.modules.scala.project.J2SEProject.<init>(J2SEProject.java:168) at org.netbeans.modules.scala.project.J2SEProjectType.createProject(J2SEProjectType.java:69) at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton?.loadProject(AntBasedProjectFactorySingleton?.java:192) at org.netbeans.api.project.ProjectManager?.createProject(ProjectManager?.java:368) at org.netbeans.api.project.ProjectManager?.access$300(ProjectManager?.java:80) at org.netbeans.api.project.ProjectManager?$3.run(ProjectManager?.java:289) at org.netbeans.api.project.ProjectManager?$3.run(ProjectManager?.java:242) ... ... at org.openide.WizardDescriptor?$Listener$2$1.run(WizardDescriptor?.java:1908) at org.openide.util.RequestProcessor?$Task.run(RequestProcessor?.java:561) [catch] at org.openide.util.RequestProcessor?$Processor.run(RequestProcessor?.java:986)
I'm getting this stack trace trying to start a new Scala project from yesterday's build. This is with the netbeans-trunk-nightly-200802120006-javaee-macosx.dmg JavaEE NetBeans build. java.lang.NoClassDefFoundError?: org/netbeans/modules/j2ee/persistence/spi/PersistenceLocationProvider at java.lang.ClassLoader?.defineClass1(Native Method) at java.lang.ClassLoader?.defineClass(ClassLoader?.java:620) at org.netbeans.JarClassLoader?.doLoadClass(JarClassLoader?.java:242) at org.netbeans.ProxyClassLoader?.selfLoadClass(ProxyClassLoader?.java:253) at org.netbeans.ProxyClassLoader?.loadClass(ProxyClassLoader?.java:227) at java.lang.ClassLoader?.loadClass(ClassLoader?.java:251) at java.lang.ClassLoader?.loadClassInternal(ClassLoader?.java:319) at org.netbeans.modules.scala.project.J2SEProject.createLookup(J2SEProject.java:252) at org.netbeans.modules.scala.project.J2SEProject.<init>(J2SEProject.java:168) at org.netbeans.modules.scala.project.J2SEProjectType.createProject(J2SEProjectType.java:69) ...
I'm getting this stack trace trying to start a new Scala project with this NetBeans: netbeans-trunk-nightly-200802120006-javaee-macosx.dmg java.lang.NoClassDefFoundError?: org/netbeans/modules/j2ee/persistence/spi/PersistenceLocationProvider at java.lang.ClassLoader?.defineClass1(Native Method) at java.lang.ClassLoader?.defineClass(ClassLoader?.java:620) at org.netbeans.JarClassLoader?.doLoadClass(JarClassLoader?.java:242) at org.netbeans.ProxyClassLoader?.selfLoadClass(ProxyClassLoader?.java:253) at org.netbeans.ProxyClassLoader?.loadClass(ProxyClassLoader?.java:227) at java.lang.ClassLoader?.loadClass(ClassLoader?.java:251) at java.lang.ClassLoader?.loadClassInternal(ClassLoader?.java:319) at org.netbeans.modules.scala.project.J2SEProject.createLookup(J2SEProject.java:252) at org.netbeans.modules.scala.project.J2SEProject.<init>(J2SEProject.java:168) at org.netbeans.modules.scala.project.J2SEProjectType.createProject(J2SEProjectType.java:69) ...
Blair,
You may need the latest nightly build again, I just tested it on NetBeans IDE Dev 200802150006.
Sometimes, to fix a bug, I have to modify code that not limited to scala only modules, which may not be updated via Update Center, and you have to download a latest nightly build.
XVqwOQ <a href=" http://ngkkbjyejtbw.com/">ngkkbjyejtbw</a>, [url= http://hfbouifkbech.com/]hfbouifkbech[/url], [link= http://oktfdzedemjg.com/]oktfdzedemjg[/link], http://oszgrhcfongz.com/
XVqwOQ <a href=" http://ngkkbjyejtbw.com/">ngkkbjyejtbw</a>, [url= http://hfbouifkbech.com/]hfbouifkbech[/url], [link= http://oktfdzedemjg.com/]oktfdzedemjg[/link], http://oszgrhcfongz.com/