X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f04cb933da95f9df2da6d58a72a7b1da12582f7d..8a0edc1a3b6e911b8e6b8db2cb2c94b751fae29a:/docs/source/app_java.rst diff --git a/docs/source/app_java.rst b/docs/source/app_java.rst index 067726db60..e77587c5f9 100644 --- a/docs/source/app_java.rst +++ b/docs/source/app_java.rst @@ -1,8 +1,7 @@ .. _Java_doc: -================= The Java Bindings -================= +################# .. raw:: html @@ -19,22 +18,22 @@ The Java Bindings This section describes jMSG, the Java API to Simgrid. This API mimicks :ref:`MSG `, which is a simple yet somehow realistic interface. -The full [javadoc](javadoc/index.html) is available. +The full reference documentation is provided at the end of this page. Most of the documentation of the :ref:`MSG API ` in C applies directly to the Java bindings (any divergence is seen as a bug that we should fix). MSG structures are mapped to Java objects as expected, and the MSG functions are methods in these objects. -How to install the Java bindings --------------------------------- +Installing the Java bindings +**************************** The easiest is to use a :ref:`precompiled jarfile `, but some people may prefer to :ref:`compile it from the sources `. -How to use the Java bindings ----------------------------- +Using the Java bindings +*********************** In most cases, you can use the SimGrid bindings as if it was a Java library: @@ -48,7 +47,7 @@ For example: .. code-block:: shell - $ cd examples/java + $ cd examples/deprecated/java $ java -classpath ../../simgrid.jar:. .:../../simgrid.jar app.pingpong.Main ../platforms/platform.xml Any SimGrid simulation (java or not) is usually constituted of several @@ -58,7 +57,7 @@ should declare these actors, plus a Main class in charge of deploying your actors on the platform. Please refer to the examples for details. Troubleshooting ---------------- +*************** Actually, these bindings are not only implemented in Java. They do use the C implementation of SimGrid. This should be transparent as this @@ -66,7 +65,7 @@ library is directly included in the ``simgrid.jar`` file but things can still go wrong is several ways. Error: library simgrid not found -................................ +================================ This means that the JVM fails to load the native library. If you use a precompiled jarfile, please report this bug. @@ -74,16 +73,16 @@ precompiled jarfile, please report this bug. If you built it yourself, you can try to use an installed version of the library instead of the one included in the jar. For that, add the path to the native library into the ``LD_LIBRARY_PATH`` variable (or in -the ``DYLD_LIBRARY_PATH`` on Mac OSX). +the ``DYLD_LIBRARY_PATH`` on macOS). pthread_create failed -..................... +===================== You reached the amount of threads that can be run on your system. Try increasing the thread limits of your operating system. Other errors -............ +============ When using jMSG, your program can crash for 3 main reasons: @@ -106,3 +105,36 @@ When using jMSG, your program can crash for 3 main reasons: the error should be uglier. In that case, you may submit a bug directly to SimGrid. +API Reference +************* + +Package org.simgrid.msg +======================= + +.. java:package:: org.simgrid.msg + +.. toctree:: + :maxdepth: 1 + + Class org.simgrid.msg.As + Class org.simgrid.msg.Comm + Class org.simgrid.msg.File + Class org.simgrid.msg.Host + Class org.simgrid.msg.HostFailureException + Class org.simgrid.msg.HostNotFoundException + Class org.simgrid.msg.JniException + Class org.simgrid.msg.Msg + Class org.simgrid.msg.MsgException + Class org.simgrid.msg.Mutex + Class org.simgrid.msg.Process + Class org.simgrid.msg.ProcessKilledError + Class org.simgrid.msg.ProcessNotFoundException + Class org.simgrid.msg.RngStream + Class org.simgrid.msg.Semaphore + Class org.simgrid.msg.Storage + Class org.simgrid.msg.StorageNotFoundException + Class org.simgrid.msg.Task + Class org.simgrid.msg.TaskCancelledException + Class org.simgrid.msg.TimeoutException + Class org.simgrid.msg.TransferFailureException + Class org.simgrid.msg.VM