diff --git a/bbb-screenshare/app/jws/lib/javacpp.jar b/bbb-screenshare/app/jws/lib/javacpp.jar index bc59939912a2..d6e28280256a 100755 Binary files a/bbb-screenshare/app/jws/lib/javacpp.jar and b/bbb-screenshare/app/jws/lib/javacpp.jar differ diff --git a/bbb-screenshare/app/jws/lib/javacv-screenshare-0.0.1.jar b/bbb-screenshare/app/jws/lib/javacv-screenshare-0.0.1.jar index 8525b7a09aea..7e0950f1bb44 100755 Binary files a/bbb-screenshare/app/jws/lib/javacv-screenshare-0.0.1.jar and b/bbb-screenshare/app/jws/lib/javacv-screenshare-0.0.1.jar differ diff --git a/bbb-screenshare/jws/native-libs/unsigned-jars/javacpp-1.2.jar b/bbb-screenshare/jws/native-libs/unsigned-jars/javacpp-1.2.jar index f6d7a5b67c19..a7d44149683c 100755 Binary files a/bbb-screenshare/jws/native-libs/unsigned-jars/javacpp-1.2.jar and b/bbb-screenshare/jws/native-libs/unsigned-jars/javacpp-1.2.jar differ diff --git a/bbb-screenshare/jws/webstart/build.gradle b/bbb-screenshare/jws/webstart/build.gradle index b3b0176502ec..151a9806abd4 100755 --- a/bbb-screenshare/jws/webstart/build.gradle +++ b/bbb-screenshare/jws/webstart/build.gradle @@ -12,7 +12,7 @@ repositories { } dependencies { - compile ":javacpp:@jar" +// compile ":javacpp:@jar" compile ":ffmpeg:@jar" // compile ":javacv:@jar" } diff --git a/bbb-screenshare/jws/webstart/build.sh b/bbb-screenshare/jws/webstart/build.sh index e5350188c1f1..34699d94eee5 100755 --- a/bbb-screenshare/jws/webstart/build.sh +++ b/bbb-screenshare/jws/webstart/build.sh @@ -1,6 +1,10 @@ +if [ -d "lib" ]; then + rm -rf lib +fi mkdir lib cp ../../app/jws/lib/*.jar lib rm lib/javacv.jar +rm lib/javacpp.jar gradle clean gradle jar ant sign-jar diff --git a/bbb-screenshare/jws/webstart/src/main/java/org/bytedeco/javacpp/Loader.java b/bbb-screenshare/jws/webstart/src/main/java/org/bytedeco/javacpp/Loader.java index 5a3b57c57b02..c340789c1eb1 100755 --- a/bbb-screenshare/jws/webstart/src/main/java/org/bytedeco/javacpp/Loader.java +++ b/bbb-screenshare/jws/webstart/src/main/java/org/bytedeco/javacpp/Loader.java @@ -468,9 +468,6 @@ public static String load(Class cls, Properties properties, boolean pathsFirst) for (String s : targetClasses) { try { - if (logger.isDebugEnabled()) { - logger.debug("load: Target class [" + s + "]"); - } Class.forName(s, true, cls.getClassLoader()); } catch (ClassNotFoundException ex) { if (logger.isDebugEnabled()) { @@ -485,52 +482,33 @@ public static String load(Class cls, Properties properties, boolean pathsFirst) // Preload native libraries desired by our class List preloads = new ArrayList(); preloads.addAll(p.get("platform.preload")); -// for (String preload : preloads) { -// if (logger.isDebugEnabled()) { -// logger.debug("Platform Preload lib " + preload); -// } -// } -// preloads.addAll(p.get("platform.link")); + + // Do not include the platform.link into our list of native libs. + // This will just add to the number of libs to search increasing + // delay on startup. (ralam - june 15, 2016). + //preloads.addAll(p.get("platform.link")); + UnsatisfiedLinkError preloadError = null; -// for (String preload : preloads) { -// if (logger.isDebugEnabled()) { -// logger.debug("Plaform link lib " + preload); -// } -// } - if (logger.isDebugEnabled()) { - logger.debug("*****aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa*****"); - } for (String preload : preloads) { try { - if (logger.isDebugEnabled()) { - logger.debug("Loading class " + cls + " from preload lib " + preload); - } + // Do not try searching for the library. Let the system find the + // native library. Searching for it manually prolongs startup time. + // (ralam - june 15, 2016) URL[] urls = new URL[0]; //findLibrary(cls, p, preload, pathsFirst); loadLibrary(urls, preload); } catch (UnsatisfiedLinkError e) { preloadError = e; } } - if (logger.isDebugEnabled()) { - logger.debug("*****bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb*****"); - } - if (logger.isDebugEnabled()) { - logger.debug("*****xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*****"); - } + try { String library = p.getProperty("platform.library"); - if (logger.isDebugEnabled()) { - logger.debug("Loading class " + cls + " from platform.library " + library); - } + // Do not try searching for the library. Let the system find the + // native library. Searching for it manually prolongs startup time. + // (ralam - june 15, 2016) URL[] urls = new URL[0]; //findLibrary(cls, p, library, pathsFirst); String loadedLibPath = loadLibrary(urls, library); - if (logger.isDebugEnabled()) { - logger.debug("Lib path for class " + cls + " " + loadedLibPath); - } - if (logger.isDebugEnabled()) { - logger.debug("*****yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy*****"); - } return loadedLibPath; } catch (UnsatisfiedLinkError e) { if (preloadError != null && e.getCause() == null) { @@ -563,9 +541,6 @@ public static URL[] findLibrary(Class cls, ClassProperties properties, String li String filename = loadedLibraries.get(libnameversion); if (filename != null) { try { - if (logger.isDebugEnabled()) { - logger.debug("findLibrary: Found class " + cls + " in library " + libnameversion + " in " + filename); - } return new URL[] { new File(filename).toURI().toURL() }; } catch (IOException ex) { if (logger.isDebugEnabled()) { @@ -575,10 +550,6 @@ public static URL[] findLibrary(Class cls, ClassProperties properties, String li } } - if (logger.isDebugEnabled()) { - logger.debug("findLibrary: Library " + libnameversion + " not found. Setting up search paths"); - } - String subdir = properties.getProperty("platform") + '/'; String prefix = properties.getProperty("platform.library.prefix", "") + libname; String suffix = properties.getProperty("platform.library.suffix", ""); @@ -618,18 +589,11 @@ public static URL[] findLibrary(Class cls, ClassProperties properties, String li paths.addAll(Arrays.asList(libpath.split(File.pathSeparator))); } - ArrayList urls = new ArrayList(styles.length * (1 + paths.size())); */ if (logger.isDebugEnabled()) { logger.debug("findLibrary: Before get resource"); } -// try { -// Thread.sleep(3000); -// } catch (InterruptedException ex) { -// // ... reset interrupt to be nice ... -// Thread.currentThread().interrupt(); -// } String platform = Loader.getPlatform(); Set urls = new HashSet(); @@ -654,12 +618,7 @@ public static URL[] findLibrary(Class cls, ClassProperties properties, String li if (logger.isDebugEnabled()) { logger.debug("findLibrary: After get resource"); } -// try { -// Thread.sleep(3000); -// } catch (InterruptedException ex) { - // ... reset interrupt to be nice ... -// Thread.currentThread().interrupt(); -// } + /* // ... and in case of bad resources search the paths last, or first on user request. int k = pathsFirst ? 0 : urls.size(); @@ -704,15 +663,6 @@ public static URL[] findLibrary(Class cls, ClassProperties properties, String li * @throws UnsatisfiedLinkError on failure */ public static String loadLibrary(URL[] urls, String libnameversion) { - if (logger.isDebugEnabled()) { - logger.debug("Attempt to load " + libnameversion + " url[] length=" + urls.length); - } - - for (URL url : urls) { - if (logger.isDebugEnabled()) { - logger.debug("URL for " + libnameversion + " " + url); - } - } if (!isLoadLibraries()) { if (logger.isDebugEnabled()) { logger.debug("Not loading " + libnameversion ); @@ -724,9 +674,6 @@ public static String loadLibrary(URL[] urls, String libnameversion) { // If we do not already have the native library file ... String filename = loadedLibraries.get(libnameversion); if (filename != null) { - if (logger.isDebugEnabled()) { - logger.debug("Not loading. " + libnameversion + " is already loaded in " + filename); - } return filename; } @@ -736,10 +683,6 @@ public static String loadLibrary(URL[] urls, String libnameversion) { for (URL url : urls) { File file; - if (logger.isDebugEnabled()) { - logger.debug("Loading " + libnameversion + " from url " + url); - } - // ... then check if it has not already been extracted, and if not ... if (!(file = new File(getCacheDir() != null ? getCacheDir() : getTempDir(), new File(url.getPath()).getName())).exists()) { if (tempFile != null && tempFile.exists()) { @@ -747,9 +690,6 @@ public static String loadLibrary(URL[] urls, String libnameversion) { } // ... then extract it from our resources ... - if (logger.isDebugEnabled()) { - logger.debug("Extracting " + url); - } if (getCacheDir() != null) { file = extractResource(url, getCacheDir(), null, null); } else { @@ -768,10 +708,6 @@ public static String loadLibrary(URL[] urls, String libnameversion) { filename = file.getAbsolutePath(); try { // ... and load it! - if (logger.isDebugEnabled()) { - logger.debug("Loading " + libnameversion + " from library " + filename); - logger.debug("Storing " + libnameversion + " with library " + filename); - } loadedLibraries.put(libnameversion, filename); System.load(filename); return filename; @@ -786,30 +722,14 @@ public static String loadLibrary(URL[] urls, String libnameversion) { } // ... or as last resort, try to load it via the system. String libname = libnameversion.split("@")[0]; - if (logger.isDebugEnabled()) { - logger.debug("Loading library " + libname); - logger.debug("Last resort: Storing " + libnameversion + " with library " + filename); - } loadedLibraries.put(libnameversion, libname); System.loadLibrary(libname); - if (logger.isDebugEnabled()) { - logger.debug("Loaded library " + libname); - logger.debug("Last resort: Stored " + libnameversion + " with library " + filename); - } return libname; } catch (UnsatisfiedLinkError e) { - if (loadedLibraries.containsKey(libnameversion)) { - if (logger.isDebugEnabled()) { - logger.debug("Removing entry for library " + libnameversion); - } - } loadedLibraries.remove(libnameversion); if (loadError != null && e.getCause() == null) { e.initCause(loadError); } - if (logger.isDebugEnabled()) { - logger.debug("Failed to load for " + libnameversion + ": " + e); - } throw e; } catch (IOException ex) { loadedLibraries.remove(libnameversion); @@ -818,9 +738,6 @@ public static String loadLibrary(URL[] urls, String libnameversion) { } Error e = new UnsatisfiedLinkError(ex.toString()); e.initCause(ex); - if (logger.isDebugEnabled()) { - logger.debug("Failed to extract for " + libnameversion + ": " + e); - } throw e; } finally { if (tempFile != null && tempFile.exists()) { diff --git a/bbb-screenshare/jws/webstart/src/main/java/org/bytedeco/javacpp/tools/Logger.java b/bbb-screenshare/jws/webstart/src/main/java/org/bytedeco/javacpp/tools/Logger.java index 7c58e5a4b0ab..4fc8b3476d34 100755 --- a/bbb-screenshare/jws/webstart/src/main/java/org/bytedeco/javacpp/tools/Logger.java +++ b/bbb-screenshare/jws/webstart/src/main/java/org/bytedeco/javacpp/tools/Logger.java @@ -32,11 +32,7 @@ public class Logger { * returns new {@link Slf4jLogger#Slf4jLogger(Class)}, else returns new {@link #Logger()}. */ public static Logger create(Class cls) { String s = System.getProperty("org.bytedeco.javacpp.logger", "").toLowerCase(); - if (s.equals("slf4j") || s.equals("slf4jlogger")) { - return new Slf4jLogger(cls); - } else { - return new Logger(); - } + return new Logger(); } static boolean debug = false;