有建立SimGrid的.jar文件的步骤。
我从here下载了存档。 然后我做了以下
cmake -DCMAKE_INSTALL_PREFIX=/home/Documents/simgrid -Denable_maintainer_mode=off -Denable_compile_optimizations=off -Denable_java=on -Denable_model-checking=off
make
make check
100% tests passed, 0 tests failed out of 586
ctest
100% tests passed, 0 tests failed out of 586
make install
SimGrid-3.13文件夹中有simgrid.jar
。
但是当我编写代码时,我无法从这个.jar文件中加载类。
我该如何解决?
已更新
如果我从thence下载准备simgrid.jar
,则会发生错误
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/simgrid-java2166199247712718748/libsimgrid.so: libcgraph.so.6: cannot open shared object file: No such file or directory
我必须添加libsimgrid-java.so
,libsimgrid.so
?
UPDATED2
安装graphviz graphviz-dev
后。发生新错误
Invalid XML (XML input line 2, state 2): Bad declaration <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">.
If your are using a XML v3 file (check the version attribute in <platform>), please update it with tools/simgrid_update_xml.pl
[0.000000] /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/surf/xml/surfxml_sax_cb.cpp:55: [surf_parse/ERROR] Parse error at (null):2: Parse error in /home/ken/IdeaProjects/Sim2Sim/src/main/java/LHCb/platform.xml
[0.000000] /builds/workspace/SimGrid-Multi/build_mode/Debug/node/simgrid-ubuntu-trusty-64/build/SimGrid-3.13/src/surf/xml/surfxml_sax_cb.cpp:57: [xbt/CRITICAL] Exiting now
答案 0 :(得分:4)
对于第二次更新,您应该阅读您复制粘贴的错误消息:
If your are using a XML v3 file (check the version attribute in <platform>), please update it with tools/simgrid_update_xml.pl
你能确认一下:
version
中的<platform>
属性为3
答案 1 :(得分:2)
我刚刚在第二个搜索框中查看了Debian package search page。我查找了/usr/lib/libcgraph.so.6
,并说该库位于包libcgraph6
中。所以你必须apt-get install libcgraph6
才能得到它。