开发者

using scala jar from java project in NetBeans

I'm developing a scala library, which I would like to be used by java applications.

If I set up a java project in netbeans, with a reference to the scala library (jar), I can compile the java project without errors.

However I get problems when running the java project directly from netbeans (code from scala library is not executed e.g. for scala object methods), while when running it without ant (directly with开发者_StackOverflow中文版 java -jar .... on the command line in the /dist folder) everything works.

Does anyone have an idea why?

Boris


Without more information, it's impossible to say for sure. However, one possibility leaps immediately to mind: Your Scala library is using Scala types. If you don't have scala-library.jar in your Java programs' classpaths, they won't be able to use the Scala classes in your library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜