开发者

ruby class to java class using jruby

i found the following ruby app in git: https://github.com/chrislo/sourceclassifier and it is exactly what i need for the final part of my school project. It would be great if i could use it in a my java project.

i used jRuby and managed to compile the class i need ( sourceclassifier.rb ) to a Java .class file, and added it to the build path of my eclipse app.

how can i now use it inside my app? using s开发者_如何学Goourceclassifier s = new sourceclassifier() throws me the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: sourceclassifier/lib/sourceclassifier
    at StackOverFlowReader.main(StackOverFlowReader.java:208)
Caused by: java.lang.ClassNotFoundException: sourceclassifier.lib.sourceclassifier
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 1 more`

and help will be appreciated, Boris.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜