1

Having absolutely no luck with http://code.google.com/p/berkelium-java/]berkelium-java, nor the outdated jars, not the up to date subversion source.

When attempting to run from jars, I add them to dependencies, and after modifying one of the examples so it runs under an older jar, it doesn't actually work as it should (AwtExample never paints a site)

When attempting to run from source I get this:

initializing berkelium-java...
Exception in thread "Berkelium Thread" java.lang.ExceptionInInitializerError
at org.berkelium.java.impl.MultiThreadBerkelium.initThread(MultiThreadBerkelium.java:99)
at org.berkelium.java.impl.MultiThreadBerkelium.access$200(MultiThreadBerkelium.java:13)
at org.berkelium.java.impl.MultiThreadBerkelium$2.run(MultiThreadBerkelium.java:41)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: org/berkelium/java/native/win32/icudt46.dll
at org.berkelium.java.impl.NativeLibraryLoader.<init>(NativeLibraryLoader.java:73)
at org.berkelium.java.impl.SingleThreadBerkelium.<clinit>(SingleThreadBerkelium.java:16)
... 4 more
Caused by: java.io.FileNotFoundException: org/berkelium/java/native/win32/icudt46.dll
at org.berkelium.java.impl.NativeLibraryLoader.open(NativeLibraryLoader.java:85)
at org.berkelium.java.impl.NativeLibraryLoader.copy(NativeLibraryLoader.java:97)
at org.berkelium.java.impl.NativeLibraryLoader.processFile(NativeLibraryLoader.java:121)
at org.berkelium.java.impl.NativeLibraryLoader.loadLib(NativeLibraryLoader.java:79)
at org.berkelium.java.impl.NativeLibraryLoader.<init>(NativeLibraryLoader.java:63)
... 5 more

Has anyone had any success with berkelium-java?

EDIT: So I edited it so it requires icudt42 rather than 46, because the version 42 is provider in the natives jar.

Now I'm facing:

initializing berkelium-java...
Exception in thread "Berkelium Thread" java.lang.UnsatisfiedLinkError: org.berkelium.java.impl.SingleThreadBerkelium._init(Ljava/lang/String;Ljava/lang/String;)V
at org.berkelium.java.impl.SingleThreadBerkelium._init(Native Method)
at org.berkelium.java.impl.SingleThreadBerkelium.<init>(SingleThreadBerkelium.java:21)
at org.berkelium.java.impl.MultiThreadBerkelium.initThread(MultiThreadBerkelium.java:99)
at org.berkelium.java.impl.MultiThreadBerkelium.access$200(MultiThreadBerkelium.java:13)
at org.berkelium.java.impl.MultiThreadBerkelium$2.run(MultiThreadBerkelium.java:41)
at java.lang.Thread.run(Thread.java:722)
4

1 回答 1

1

我不确定 Java 包装器是如何工作的,但如果它们需要构建最新版本的 Berkelium,它们可能会失败,因为 Berkelium::init() 方法的签名更改为采用可选的附加参数:

bool BERKELIUM_EXPORT init(FileString homeDirectory, unsigned int extra_argc = 0, const char* extra_argv[] = NULL);

或者

bool BERKELIUM_EXPORT init(FileString homeDirectory, FileString subprocessDirectory, unsigned int extra_argc = 0, const char* extra_argv[] = NULL);

您可能需要更新方法签名并调用 src/main/java/org/berkelium/java/impl/SingleThreadBerkelium.java 中的 init 以提供默认参数。

于 2012-02-14T09:08:40.207 回答