No main class in scala

Hello,



I downloaded the jme sdk, installed the scala plugin.

I created a new jme3 project “BasicGame”.

I deleted the Main.java file and replaced it with HelloSimpleApplication.scala



SME/HelloSimpleApplication.scala at master · hsyl20/SME · GitHub



But Netbeans does not find the main class for some reason.

If I create a Scala Application the HelloWorld example works. The autocompletion doesn’t work either.



Any ideas?

It doesn’t work that way. You would have to create a scala library that you call from the main application. You could also do it the other way round and import the application jar files to your scala application, in which case you don’t have asset support, deployment or anything else in the scala project. Nobody promised scala interoperability :slight_smile:

1 Like
@normen said:
It doesn't work that way. You would have to create a scala library that you call from the main application. You could also do it the other way round and import the application jar files to your scala application, in which case you don't have asset support, deployment or anything else in the scala project. Nobody promised scala interoperability :)
-
That is no problem, it is probably easier to write a jme wrapper than to completely design a new engine.

One thing bugs me, does your netbeans ide work with the scala plugin?
http://plugins.netbeans.org/plugin/38999/nbscala-2-9-x-0-9

Because if I install it, it gives me some errors and then I have no auto-completion anymore , neither in java nor in scala.

No idea, its basically the same base as netbeans 7.2

i dont remember, but on studies i was using netbeans to programm in scala.



anyway google helps,

maybe here:

I am using intellij now. Everything works fine, thanks.