Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename SG_java -> simgrid-java.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sat, 2 Nov 2013 22:16:37 +0000 (23:16 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Sat, 2 Nov 2013 22:16:37 +0000 (23:16 +0100)
26 files changed:
CMakeLists.txt
buildtools/Cmake/Distrib.cmake
buildtools/Cmake/MakeJava.cmake
buildtools/Cmake/src/simgrid.nsi.in
doc/doxygen/bindings.doc
examples/java/async/CMakeLists.txt
examples/java/bittorrent/CMakeLists.txt
examples/java/chord/CMakeLists.txt
examples/java/cloud/CMakeLists.txt
examples/java/commTime/CMakeLists.txt
examples/java/io/CMakeLists.txt
examples/java/kademlia/CMakeLists.txt
examples/java/master_slave_bypass/CMakeLists.txt
examples/java/master_slave_kill/CMakeLists.txt
examples/java/masterslave/CMakeLists.txt
examples/java/migration/CMakeLists.txt
examples/java/mutualExclusion/CMakeLists.txt
examples/java/pingPong/CMakeLists.txt
examples/java/priority/CMakeLists.txt
examples/java/startKillTime/CMakeLists.txt
examples/java/suspend/CMakeLists.txt
examples/java/tracing/CMakeLists.txt
examples/scala/master_slave_bypass/CMakeLists.txt
examples/scala/master_slave_kill/CMakeLists.txt
examples/scala/masterslave/CMakeLists.txt
src/bindings/java/org/simgrid/msg/Msg.java

index b2fa7c4..6adbbd2 100644 (file)
@@ -59,7 +59,7 @@ else()
   set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}.${SIMGRID_VERSION_PATCH}")
 endif()
 set(libsimgrid_version "${release_version}")
-set(libSG_java_version "${release_version}")
+set(libsimgrid-java_version "${release_version}")
 set(GCC_NEED_VERSION "4.0")
 set(APPLE_NEED_GCC_VERSION "4.6")
 
index 7c9a201..775512c 100644 (file)
@@ -67,7 +67,7 @@ if(enable_lib_static AND NOT WIN32)
 endif()
 
 if(enable_java)
-  install(TARGETS SG_java
+  install(TARGETS simgrid-java
       DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/)
   install(FILES ${SIMGRID_JAR}
       DESTINATION $ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/java/)
index c6a77b7..52de66d 100644 (file)
@@ -2,31 +2,31 @@ cmake_minimum_required(VERSION 2.8.6)
 
 include(UseJava)
 
-# Rules to build libSG_java
+# Rules to build libsimgrid-java
 #
-add_library(SG_java SHARED ${JMSG_C_SRC})
-set_target_properties(SG_java PROPERTIES VERSION ${libSG_java_version})
+add_library(simgrid-java SHARED ${JMSG_C_SRC})
+set_target_properties(simgrid-java PROPERTIES VERSION ${libsimgrid-java_version})
 if (CMAKE_VERSION VERSION_LESS "2.8.8")
   include_directories(${JNI_INCLUDE_DIRS})
 
   message(WARNING "[Java] Try to workaround missing feature in older CMake.  You should better update CMake to version 2.8.8 or above.")
   get_directory_property(CHECK_INCLUDES INCLUDE_DIRECTORIES)
 else()
-  get_target_property(COMMON_INCLUDES SG_java INCLUDE_DIRECTORIES)
+  get_target_property(COMMON_INCLUDES simgrid-java INCLUDE_DIRECTORIES)
   if (COMMON_INCLUDES)
-    set_target_properties(SG_java PROPERTIES
+    set_target_properties(simgrid-java PROPERTIES
       INCLUDE_DIRECTORIES "${COMMON_INCLUDES};${JNI_INCLUDE_DIRS}")
   else()
-    set_target_properties(SG_java PROPERTIES
+    set_target_properties(simgrid-java PROPERTIES
       INCLUDE_DIRECTORIES "${JNI_INCLUDE_DIRS}")
   endif()
-  add_dependencies(SG_java simgrid)
+  add_dependencies(simgrid-java simgrid)
 
-  get_target_property(CHECK_INCLUDES SG_java INCLUDE_DIRECTORIES)
+  get_target_property(CHECK_INCLUDES simgrid-java INCLUDE_DIRECTORIES)
 endif()
-message("-- [Java] SG_java includes: ${CHECK_INCLUDES}")
+message("-- [Java] simgrid-java includes: ${CHECK_INCLUDES}")
 
-target_link_libraries(SG_java simgrid)
+target_link_libraries(simgrid-java simgrid)
 
 
 
@@ -39,14 +39,14 @@ if(WIN32)
     message(FATAL_ERROR "Java JVM needs to be 32 bits to be able to run with Simgrid on Windows for now")
   endif()
 
-  set_target_properties(SG_java PROPERTIES
+  set_target_properties(simgrid-java PROPERTIES
     LINK_FLAGS "-Wl,--subsystem,windows,--kill-at"
     PREFIX "")
   find_path(PEXPORTS_PATH NAMES pexports.exe PATHS NO_DEFAULT_PATHS)
   message(STATUS "pexports: ${PEXPORTS_PATH}")
   if(PEXPORTS_PATH)
-    add_custom_command(TARGET SG_java POST_BUILD
-      COMMAND ${PEXPORTS_PATH}/pexports.exe ${CMAKE_BINARY_DIR}/lib/SG_java.dll > ${CMAKE_BINARY_DIR}/lib/SG_java.def)
+    add_custom_command(TARGET simgrid-java POST_BUILD
+      COMMAND ${PEXPORTS_PATH}/pexports.exe ${CMAKE_BINARY_DIR}/lib/simgrid-java.dll > ${CMAKE_BINARY_DIR}/lib/simgrid-java.def)
   endif(PEXPORTS_PATH)
 endif()
 
@@ -60,7 +60,7 @@ set(MANIFEST_FILE "${CMAKE_HOME_DIRECTORY}/src/bindings/java/MANIFEST.MF")
 set(LIBSIMGRID_SO
   libsimgrid${CMAKE_SHARED_LIBRARY_SUFFIX})
 set(LIBSG_JAVA_SO
-  ${CMAKE_SHARED_LIBRARY_PREFIX}SG_java${CMAKE_SHARED_LIBRARY_SUFFIX})
+  ${CMAKE_SHARED_LIBRARY_PREFIX}simgrid-java${CMAKE_SHARED_LIBRARY_SUFFIX})
 
 ## Name of the "NATIVE" folder in simgrid.jar
 ##
@@ -87,12 +87,12 @@ endif()
 ## Here is how to build simgrid.jar
 ##
 set(CMAKE_JAVA_TARGET_OUTPUT_NAME simgrid)
-add_jar(SG_java_pre_jar ${JMSG_JAVA_SRC})
+add_jar(simgrid-java_pre_jar ${JMSG_JAVA_SRC})
 
 add_custom_command(
   COMMENT "Finalize simgrid.jar..."
   OUTPUT ${SIMGRID_JAR}_finalized
-  DEPENDS simgrid SG_java SG_java_pre_jar
+  DEPENDS simgrid simgrid-java simgrid-java_pre_jar
           ${SIMGRID_JAR} ${MANIFEST_FILE}
           ${CMAKE_BINARY_DIR}/lib/${LIBSIMGRID_SO}
           ${CMAKE_BINARY_DIR}/lib/${LIBSG_JAVA_SO}
@@ -114,4 +114,4 @@ add_custom_command(
   COMMAND ${CMAKE_COMMAND} -E remove ${SIMGRID_JAR}_finalized
   COMMAND ${CMAKE_COMMAND} -E touch ${SIMGRID_JAR}_finalized
   )
-add_custom_target(SG_java_jar ALL DEPENDS ${SIMGRID_JAR}_finalized)
+add_custom_target(simgrid-java_jar ALL DEPENDS ${SIMGRID_JAR}_finalized)
index 2550b85..53813ec 100644 (file)
@@ -174,8 +174,8 @@ Section "Java Bindings" JavaSection
        # install java library and examples\r
        CreateDirectory $INSTDIR\examples\simgrid-java\r
        setOutPath $INSTDIR\lib\r
-       file /nonfatal "lib\SG_java.dll"\r
-       file /nonfatal "lib\SG_java.def"\r
+       file /nonfatal "lib\simgrid-java.dll"\r
+       file /nonfatal "lib\simgrid-java.def"\r
        file /nonfatal "simgrid.jar"\r
        setOutPath $INSTDIR\examples\simgrid-java\r
        file /nonfatal /r ".\examples\"\r
index 25721cc..b0e900e 100644 (file)
@@ -83,7 +83,7 @@ $ cmake .
 \subsubsection bindings_binding_java_use How to use Simgrid-java
 
 To execute the examples you need to add the path where you installed
-the generated `libSG_java` and `libsimgrid` libraries
+the generated `libsimgrid-java` and `libsimgrid` libraries
 into the `LD_LIBRARY_PATH`.
 
 Be careful on Mac, this variable is called `DYLD_LIBRARY_PATH` and not
@@ -203,7 +203,7 @@ factory if your JVM support it, so you will just need to execute your
 simulation with the correct JVM. The selected context factory gets
 displayed automatically.
 ~~~~{.sh}
-export LD_LIBRARY_PATH=/path/to/simgrid.so:/path/to/libSG_java.so
+export LD_LIBRARY_PATH=/path/to/simgrid.so:/path/to/libsimgrid-java.so
 cd examples
 $PATH_TO_COROUTINE_JVM/java -cp .:../simgrid.jar masterslave.Masterslave masterslave/ masterslaveDeployment.xml platform.xml
 ~~~~
index 18d4de1..c2e64e8 100644 (file)
@@ -13,7 +13,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index a245baa..23e3773 100644 (file)
@@ -15,7 +15,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 90167e8..ddab502 100644 (file)
@@ -17,7 +17,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 9dbb0d1..a02cc47 100644 (file)
@@ -12,7 +12,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 320b5c8..2ca1a7a 100644 (file)
@@ -12,7 +12,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 767e4d6..fe437f0 100644 (file)
@@ -10,7 +10,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 8b3833d..fbfe466 100644 (file)
@@ -20,7 +20,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 9b18ca4..808bb24 100644 (file)
@@ -12,7 +12,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 34e5b26..95d4ad8 100644 (file)
@@ -12,7 +12,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index c3083f6..cccca32 100644 (file)
@@ -13,7 +13,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 72108f0..2f372ef 100644 (file)
@@ -11,7 +11,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 4593c8c..b74eecc 100644 (file)
@@ -14,7 +14,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 8756c21..7a951e5 100644 (file)
@@ -12,7 +12,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index a93beec..b897df1 100644 (file)
@@ -10,7 +10,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 0a9716a..97a28eb 100644 (file)
@@ -11,7 +11,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 0ac2dfd..abf841b 100644 (file)
@@ -11,7 +11,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index f035001..e07314b 100644 (file)
@@ -12,7 +12,7 @@ if(enable_java)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${JAVA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index f5c954a..c44c0aa 100644 (file)
@@ -12,7 +12,7 @@ if(enable_scala)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${SCALA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index ca978c6..bdc19ec 100644 (file)
@@ -12,7 +12,7 @@ if(enable_scala)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${SCALA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 54b1029..634590e 100644 (file)
@@ -13,7 +13,7 @@ if(enable_scala)
   add_custom_command(
     COMMENT "Building ${example}..."
     OUTPUT ${example}_compiled
-    DEPENDS ${sources} SG_java_jar ${SIMGRID_JAR}
+    DEPENDS ${sources} simgrid-java_jar ${SIMGRID_JAR}
     COMMAND ${SCALA_COMPILE} -cp ${SIMGRID_JAR}
                              -d ${CMAKE_CURRENT_BINARY_DIR}/.. ${sources}
     COMMAND ${CMAKE_COMMAND} -E remove ${example}_compiled
index 229566c..93409c5 100644 (file)
@@ -25,11 +25,11 @@ public final class Msg {
                        return;
                try {
                        /* prefer the version on disk, if existing */
-                       System.loadLibrary("SG_java");
+                       System.loadLibrary("simgrid-java");
                } catch (UnsatisfiedLinkError e) {
                        /* If not found, unpack the one bundled into the jar file and use it */
                        loadLib("simgrid");
-                       loadLib("SG_java");
+                       loadLib("simgrid-java");
                }
                isNativeInited = true;
        }