changeset 1533:ab5d4f74c562

Made rust launchers to resovle jars, compose classpath and this run itw * Makefile: renamed netx.jar to javaws.jar; properly ued variabels for NETX_JAR and SPLASH_PNG and all other .jar and.png resources * configure.a: added check for --with-itw-libs which determines wheter build is for distribution, self or portable usage * netx/net/sourceforge/jnlp/cache/CacheUtil.java: adapted netx->javaws renaming * netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java: adapted netx->javaws renaming * netx/net/sourceforge/jnlp/resources/Messages.properties: adapted netx->javaws renaming * netx/net/sourceforge/jnlp/resources/Messages_cs.properties: adapted netx->javaws renaming * netx/net/sourceforge/jnlp/resources/Messages_de.properties: adapted netx->javaws renaming * netx/net/sourceforge/jnlp/resources/Messages_pl.properties: adapted netx->javaws renaming * netx/net/sourceforge/jnlp/resources/Messages_ru.properties: adapted netx->javaws renaming * netx/net/sourceforge/jnlp/runtime/Translator.java: adapted netx->javaws renaming * rust-launcher/src/dirs_paths_helper.rs: added utility methods of path_to_string, current_program, current_program_parent, current_program_name check_config_files_paths split to check_config_files_paths and check_legacy_config_files_paths. Both win only. First one temporarily. * rust-launcher/src/hardcoded_paths.rs: made aware of SPLASH_PNG, TAGSOUP_JAR, RHINO_JAR, ITW_LIBS added enum for ITW_LIBS - BOTH, BUNDLED and DISTRIBUTION * rust-launcher/src/main.rs: by using jars_helper, compose classpath, put it to java args together with main, and so is making launchers work * rust-launcher/src/jars_helper.rs: new class, responsible composing classpath by resolving which jars to use * rust-launcher/src/os_access.rs: Added trait method get_classpath_separator * rust-launcher/src/property_from_files_resolver.rs: TestLogger moved to utils * rust-launcher/src/utils.rs: got TestLogger and provided factory method for it.
author Jiri Vanek <jvanek@redhat.com>
date Wed, 09 Jan 2019 16:16:54 +0100
parents 3202999ab80f
children e5394f3f30d3
files ChangeLog Makefile.am configure.ac netx/net/sourceforge/jnlp/cache/CacheUtil.java netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java netx/net/sourceforge/jnlp/resources/Messages.properties netx/net/sourceforge/jnlp/resources/Messages_cs.properties netx/net/sourceforge/jnlp/resources/Messages_de.properties netx/net/sourceforge/jnlp/resources/Messages_pl.properties netx/net/sourceforge/jnlp/resources/Messages_ru.properties netx/net/sourceforge/jnlp/runtime/Translator.java rust-launcher/src/dirs_paths_helper.rs rust-launcher/src/hardcoded_paths.rs rust-launcher/src/jars_helper.rs rust-launcher/src/main.rs rust-launcher/src/os_access.rs rust-launcher/src/property_from_files_resolver.rs rust-launcher/src/utils.rs
diffstat 18 files changed, 553 insertions(+), 99 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Dec 13 10:51:17 2018 +0100
+++ b/ChangeLog	Wed Jan 09 16:16:54 2019 +0100
@@ -1,3 +1,26 @@
+2019-01-09  Jiri Vanek <jvanek@redhat.com>
+
+	Made rust launchers to resovle jars, compose classpath and this run itw
+	* Makefile: renamed netx.jar to javaws.jar; properly ued variabels for NETX_JAR and SPLASH_PNG and all other .jar and.png resources
+	* configure.a: added check for --with-itw-libs which determines wheter build is for distribution, self or portable usage
+	* netx/net/sourceforge/jnlp/cache/CacheUtil.java: adapted netx->javaws renaming
+	* netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java:  adapted netx->javaws renaming
+	* netx/net/sourceforge/jnlp/resources/Messages.properties:  adapted netx->javaws renaming
+	* netx/net/sourceforge/jnlp/resources/Messages_cs.properties:  adapted netx->javaws renaming
+	* netx/net/sourceforge/jnlp/resources/Messages_de.properties:  adapted netx->javaws renaming
+	* netx/net/sourceforge/jnlp/resources/Messages_pl.properties:  adapted netx->javaws renaming
+	* netx/net/sourceforge/jnlp/resources/Messages_ru.properties:  adapted netx->javaws renaming
+	* netx/net/sourceforge/jnlp/runtime/Translator.java:  adapted netx->javaws renaming
+	* rust-launcher/src/dirs_paths_helper.rs: added utility methods of path_to_string, current_program, current_program_parent, current_program_name
+	check_config_files_paths split to check_config_files_paths and check_legacy_config_files_paths. Both win only. First one temporarily.
+	* rust-launcher/src/hardcoded_paths.rs: made aware of SPLASH_PNG, TAGSOUP_JAR, RHINO_JAR, ITW_LIBS
+	added enum for ITW_LIBS - BOTH, BUNDLED and DISTRIBUTION
+	* rust-launcher/src/main.rs: by using jars_helper, compose classpath, put it to java args together with main, and so is making launchers work
+	* rust-launcher/src/jars_helper.rs: new class, responsible composing classpath by resolving which jars to use
+	* rust-launcher/src/os_access.rs: Added trait method get_classpath_separator
+	* rust-launcher/src/property_from_files_resolver.rs: TestLogger moved to utils
+	* rust-launcher/src/utils.rs: got TestLogger and provided factory method for it.
+
 2018-12-10  Jiri Vanek <jvanek@redhat.com>
             jtesdall <jtesdall@mapcon.com>
 
--- a/Makefile.am	Thu Dec 13 10:51:17 2018 +0100
+++ b/Makefile.am	Wed Jan 09 16:16:54 2019 +0100
@@ -164,6 +164,8 @@
   PLUGIN_JAR=$(datadir)/$(PACKAGE_NAME)/plugin.jar
   JSOBJECT_JAR=$(datadir)/$(PACKAGE_NAME)/jsobject.jar
 endif
+  NETX_JAR=$(datadir)/$(PACKAGE_NAME)/javaws.jar
+  SPLASH_PNG=$(datadir)/$(PACKAGE_NAME)/javaws_splash.png
 
 # Conditional defintions
 if HAVE_TAGSOUP
@@ -186,7 +188,7 @@
 #    IllegalAccessException
 #  - we want full privileges
 #
-export UNIFIED_CLASSPATH_SEGMENTS=$(datadir)/$(PACKAGE_NAME)/netx.jar $(PLUGIN_JAR) $(JSOBJECT_JAR) $(RHINO_JAR) $(TAGSOUP_JAR)
+export UNIFIED_CLASSPATH_SEGMENTS=$(NETX_JAR) $(PLUGIN_JAR) $(JSOBJECT_JAR) $(RHINO_JAR) $(TAGSOUP_JAR)
 export UNIFIED_JACOCO_CLASSPATH_SEGMENTS=$(UNIFIED_CLASSPATH_SEGMENTS) $(JACOCO_CLASSPATH)
 export UNIFIED_CLASSPATH=$(call joinsegments, $(UNIFIED_CLASSPATH_SEGMENTS))
 export UNIFIED_JACOCO_CLASSPATH=$(call joinsegments, $(UNIFIED_JACOCO_CLASSPATH_SEGMENTS))
@@ -314,14 +316,16 @@
 # make-time from configure-time
 edit_launcher_script = sed \
   -e "s|[@]LAUNCHER_BOOTCLASSPATH[@]|$(LAUNCHER_BOOTCLASSPATH)|g" \
-  -e "s|[@]JAVAWS_SPLASH_LOCATION[@]|$(datadir)/$(PACKAGE_NAME)/javaws_splash.png|g" \
+  -e "s|[@]JAVAWS_SPLASH_LOCATION[@]|$(SPLASH_PNG)|g" \
   -e "s|[@]JAVA[@]|$(JAVA)|g" \
   -e "s|[@]JRE[@]|$(SYSTEM_JRE_DIR)|g" \
   -e "s|[@]MAIN_CLASS[@]|$${MAIN_CLASS}|g" \
   -e "s|[@]BIN_LOCATION[@]|$${BIN_LOCATION}|g" \
-  -e "s|[@]NETX_JAR[@]|$(datadir)/$(PACKAGE_NAME)/netx.jar|g" \
+  -e "s|[@]NETX_JAR[@]|$(NETX_JAR)|g" \
   -e "s|[@]PLUGIN_JAR[@]|$(PLUGIN_JAR)|g" \
   -e "s|[@]JSOBJECT_JAR[@]|$(JSOBJECT_JAR)|g" \
+  -e "s|[@]TAGSOUP_JAR[@]|$(TAGSOUP_JAR)|g" \
+  -e "s|[@]RHINO_JAR[@]|$(RHINO_JAR)|g" \
   -e "s|[@]PROGRAM_NAME[@]|$${PROGRAM_NAME}|g"
 
 # Top-Level Targets
@@ -350,11 +354,11 @@
 	${INSTALL_PROGRAM} $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY) $(DESTDIR)$(libdir)
 endif
 if ENABLE_PLUGINJAR
-	${INSTALL_DATA} $(TOP_BUILD_DIR)/liveconnect/lib/classes-applet.jar   $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
-	${INSTALL_DATA} $(TOP_BUILD_DIR)/liveconnect/lib/classes-jsobject.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/jsobject.jar
+	${INSTALL_DATA} $(TOP_BUILD_DIR)/liveconnect/lib/classes-applet.jar   $(DESTDIR)$(PLUGIN_JAR)
+	${INSTALL_DATA} $(TOP_BUILD_DIR)/liveconnect/lib/classes-jsobject.jar $(DESTDIR)$(JSOBJECT_JAR)
 endif
-	${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
-	${INSTALL_DATA} $(NETX_SRCDIR)/javaws_splash.png $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/javaws_splash.png
+	${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(NETX_JAR)
+	${INSTALL_DATA} $(NETX_SRCDIR)/javaws_splash.png $(DESTDIR)$(SPLASH_PNG)
 	${INSTALL_DATA} $(TOP_SRC_DIR)/javaws.png $(ICONS_DEST_DIR)/
 if ENABLE_NATIVE_LAUNCHERS
 	${INSTALL_PROGRAM} launcher.build/$(javaws) $(DESTDIR)$(bindir)
@@ -510,10 +514,10 @@
 	rm -f $(BASH_CMPL_DEST_DIR)/policyeditor.bash
 
 uninstall-local: uninstall-linux-only
-	rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar
-	rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/jsobject.jar
-	rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar
-	rm -r $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/javaws_splash.png
+	rm -f $(DESTDIR)$(PLUGIN_JAR)
+	rm -f $(DESTDIR)$(JSOBJECT_JAR)
+	rm -f $(DESTDIR)$(NETX_JAR)
+	rm -r $(DESTDIR)$(SPLASH_PNG)
 	rm -r $(ICONS_DEST_DIR)/javaws.png
 	rm -rf $(DESTDIR)$(htmldir)
 if WINDOWS
@@ -554,7 +558,7 @@
 	  -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \
 	  -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \
 	  -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \
-	  -DNETX_JAR="\"$(datadir)/$(PACKAGE_NAME)/netx.jar\"" \
+	  -DNETX_JAR="\"$(NETX_JAR)\"" \
 	  -DPLUGIN_JAR="\"$(PLUGIN_JAR)\"" \
 	  -DJSOBJECT_JAR="\"$(JSOBJECT_JAR)\""\
 	  $(GLIB_CFLAGS) \
@@ -609,7 +613,7 @@
 	  -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \
 	  -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \
 	  -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \
-	  -DNETX_JAR="\"$(datadir)/$(PACKAGE_NAME)/netx.jar\"" \
+	  -DNETX_JAR="\"$(NETX_JAR)\"" \
 	  -DPLUGIN_JAR="\"$(PLUGIN_JAR)\"" \
 	  -DJSOBJECT_JAR="\"$(JSOBJECT_JAR)\""\
 	  $(GLIB_CFLAGS) \
@@ -907,6 +911,13 @@
 	pushd $$outs ; \
 	  export JAVA=$(JAVA) ; \
 	  export JRE=$(SYSTEM_JRE_DIR) ; \
+	  export SPLASH_PNG=$(SPLASH_PNG) ; \
+	  export ITW_LIBS=$(ITW_LIBS) ; \
+	  export PLUGIN_JAR=$(PLUGIN_JAR) ; \
+	  export NETX_JAR=$(NETX_JAR) ; \
+	  export JSOBJECT_JAR=$(JSOBJECT_JAR) ; \
+	  export TAGSOUP_JAR=$(TAGSOUP_JAR) ; \
+	  export RHINO_JAR=$(RHINO_JAR) ; \
 	  unset MAIN_CLASS ; \
 	  unset BIN_LOCATION ; \
 	  unset PROGRAM_NAME ; \
@@ -1638,7 +1649,7 @@
 	  -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \
 	  -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_COVERAGE_BOOTCLASSPATH) \
 	  -DCOVERAGE_AGENT=$(JACOCO_AGENT_PLUGIN_SWITCH) \
-	  -DNETX_JAR="\"$(datadir)/$(PACKAGE_NAME)/netx.jar\"" \
+	  -DNETX_JAR="\"$(NETX_JAR)\"" \
 	  -DPLUGIN_JAR="\"$(PLUGIN_JAR)\"" \
 	  -DJSOBJECT_JAR="\"$(JSOBJECT_JAR)\""\
 	  $(GLIB_CFLAGS) \
--- a/configure.ac	Thu Dec 13 10:51:17 2018 +0100
+++ b/configure.ac	Wed Jan 09 16:16:54 2019 +0100
@@ -82,6 +82,26 @@
 AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"])
 AM_CONDITIONAL([WINDOWS], [test "$build_windows" = "yes"])
 
+AC_MSG_CHECKING([how to search for libraries in native launchers])
+AC_ARG_WITH([itw-libs],
+	      [AS_HELP_STRING([--with-itw-libs],
+	      		      [set way of searching system for jar depndencies - BUNDLED, for portable build (in application space); DISTRIBUTION, for linux (in installed path); BOTH, for both usages (should be for testing only])], [ITW_LIBS="${withval}"], [ITW_LIBS='none'])
+if test "x$build_windows" = xyes ; then
+  if test x"$ITW_LIBS" = xnone -o x"$ITW_LIBS" = x; then
+      ITW_LIBS="BUNDLED"
+      echo  -n "On Windows, presetting missing --with-itw-libs ITW_LIBS to $ITW_LIBS. " 
+      echo  -n "On Windows, DISTRIBUTION nor BOTH do not have much sense... " 
+  fi
+fi
+AC_MSG_RESULT(${ITW_LIBS})
+AC_SUBST(ITW_LIBS)
+if test x"$ITW_LIBS" = xnone -o x"$ITW_LIBS" = x; then
+    AC_MSG_ERROR([missing --with-itw-libs; mandatory on linux. Use BUNDLED, DISTRIBUTION or BOTH. use BOTH with care. ])
+fi
+if test ! "$ITW_LIBS" = BUNDLED -a ! "$ITW_LIBS" = DISTRIBUTION -a ! "$ITW_LIBS" = BOTH; then
+    AC_MSG_ERROR([incorrect --with-itw-libs; mandatory are BUNDLED, DISTRIBUTION or BOTH ])
+fi
+
 IT_CHECK_WITH_GCJ
 FIND_TOOL([ZIP], [zip])
 FIND_JAVAC
--- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java	Thu Dec 13 10:51:17 2018 +0100
+++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java	Wed Jan 09 16:16:54 2019 +0100
@@ -183,10 +183,10 @@
                 FileChannel channel = fis.getChannel();
                 locking  = channel.tryLock();
                 if (locking == null) {
-                    OutputController.getLogger().log("Other instances of netx are running");
+                    OutputController.getLogger().log("Other instances of javaws are running");
                     return false;
                 }
-                OutputController.getLogger().log("No other instances of netx are running");
+                OutputController.getLogger().log("No other instances of javaws are running");
                 return true;
 
             } else {
--- a/netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java	Thu Dec 13 10:51:17 2018 +0100
+++ b/netx/net/sourceforge/jnlp/controlpanel/ClassFinder.java	Wed Jan 09 16:16:54 2019 +0100
@@ -74,7 +74,7 @@
         for (String classpathEntry : classPathRoots) {
             //need to avoid base jdk jars/modules
             if (classpathEntry.toLowerCase().contains("icedtea-web")
-                    || classpathEntry.toLowerCase().contains("netx")
+                    || classpathEntry.toLowerCase().contains("javaws")
                     || classpathEntry.toLowerCase().contains("plugin")) {
                 File f = new File(classpathEntry);
                 if (!f.exists()) {
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Thu Dec 13 10:51:17 2018 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Wed Jan 09 16:16:54 2019 +0100
@@ -133,8 +133,8 @@
 LCantReadInfo=You can try to download this file manually and send it as bug report to IcedTea-Web team.
 LNullLocation=Could not determine .jnlp file location.
 LNullLocationInfo=An attempt was made to launch a JNLP file in another JVM, but the file could not be located.  In order to launch in an external JVM, the runtime must be able to locate the .jnlp file either in the local file system or on a server.
-LNetxJarMissing=Could not determine location of netx.jar.
-LNetxJarMissingInfo=An attempt was made to launch a JNLP file in another JVM, but the netx.jar could not be located.  In order to launch in an external JVM, the runtime must be able to locate the netx.jar file.
+LNetxJarMissing=Could not determine location of javaws.jar.
+LNetxJarMissingInfo=An attempt was made to launch a JNLP file in another JVM, but the javaws.jar could not be located.  In order to launch in an external JVM, the runtime must be able to locate the javaws.jar file.
 LNotToSpec=JNLP file not strictly to specifications.
 LNotToSpecInfo=The JNLP file contains data that is prohibited by the JNLP specification.  The runtime can attempt to ignore the invalid information and continue launching the file.
 LNotApplication=Not an application file.
--- a/netx/net/sourceforge/jnlp/resources/Messages_cs.properties	Thu Dec 13 10:51:17 2018 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages_cs.properties	Wed Jan 09 16:16:54 2019 +0100
@@ -111,8 +111,8 @@
 LCantReadInfo=M\u016f\u017eete zkusit st\u00e1hnout tento soubor ru\u010dn\u011b a zaslat ho prost\u0159ednictv\u00edm hl\u00e1\u0161en\u00ed o chyb\u011b t\u00fdmu IcedTea-Web.
 LNullLocation=Nelze ur\u010dit um\u00edst\u011bn\u00ed souboru JNLP.
 LNullLocationInfo=Byl u\u010din\u011bn pokus o spu\u0161t\u011bn\u00ed souboru JNLP v jin\u00e9m prost\u0159ed\u00ed JVM, av\u0161ak soubor nebyl nalezen.  Chcete-li spustit extern\u00ed prost\u0159ed\u00ed JVM, modul runtime mus\u00ed b\u00fdt schopen nal\u00e9zt soubor .jnlp v lok\u00e1ln\u00edm souborov\u00e9m syst\u00e9mu nebo na serveru.
-LNetxJarMissing=Nelze ur\u010dit um\u00edst\u011bn\u00ed souboru netx.jar.
-LNetxJarMissingInfo=Byl u\u010din\u011bn pokus o spu\u0161t\u011bn\u00ed souboru JNLP v jin\u00e9m prost\u0159ed\u00ed JVM, av\u0161ak soubor netx.jar nebyl nalezen.  Chcete-li spustit extern\u00ed prost\u0159ed\u00ed JVM, modul runtime mus\u00ed b\u00fdt schopen nal\u00e9zt soubor netx.jar.
+LNetxJarMissing=Nelze ur\u010dit um\u00edst\u011bn\u00ed souboru javaws.jar.
+LNetxJarMissingInfo=Byl u\u010din\u011bn pokus o spu\u0161t\u011bn\u00ed souboru JNLP v jin\u00e9m prost\u0159ed\u00ed JVM, av\u0161ak soubor javaws.jar nebyl nalezen.  Chcete-li spustit extern\u00ed prost\u0159ed\u00ed JVM, modul runtime mus\u00ed b\u00fdt schopen nal\u00e9zt soubor javaws.jar.
 LNotToSpec=Soubor JNLP p\u0159esn\u011b neodpov\u00edd\u00e1 specifikaci.
 LNotToSpecInfo=Soubor JNLP obsahuje data, kter\u00e1 jsou zak\u00e1z\u00e1na v r\u00e1mci specifikace JNLP.  Modul runtime se m\u016f\u017ee pokusit ignorovat neplatn\u00e9 informace a pokra\u010dovat ve spou\u0161t\u011bn\u00ed souboru.
 LNotApplication=Nejedn\u00e1 se o soubor aplikace.
--- a/netx/net/sourceforge/jnlp/resources/Messages_de.properties	Thu Dec 13 10:51:17 2018 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages_de.properties	Wed Jan 09 16:16:54 2019 +0100
@@ -129,8 +129,8 @@
 LCantReadInfo=Die Datei kann m\u00f6glicherweise manuell heruntergeladen und als Fehlerbericht an das IcedTea-Web Team gesendet werden.
 LNullLocation=Konnte den Ort der .jnlp Datei nicht bestimmen.
 LNullLocationInfo=Es wurde versucht eine JNLP-Datei in einer anderen JVM zu starten, aber die Datei konnte am Ort nicht ermittelt werden. Um in einer externen JVM zu starten, muss die Laufzeitumgebung in der Lage sein die .jnlp Datei entweder auf dem lokalen Dateisystem oder einem Server zu ermitteln.
-LNetxJarMissing=Konnte den Ort von netx.jar nicht bestimmen.
-LNetxJarMissingInfo=Ein wurde versucht eine JNLP-Datei in einer anderen JVM zu starten, aber das netx.jar konnte am Ort nicht ermittelt werden. Um in einer externen JVM zu starten, muss die Laufzeitumgebung in der Lage sein das netx.jar zu ermitteln.
+LNetxJarMissing=Konnte den Ort von javaws.jar nicht bestimmen.
+LNetxJarMissingInfo=Ein wurde versucht eine JNLP-Datei in einer anderen JVM zu starten, aber das javaws.jar konnte am Ort nicht ermittelt werden. Um in einer externen JVM zu starten, muss die Laufzeitumgebung in der Lage sein das javaws.jar zu ermitteln.
 LNotToSpec=JNLP-Datei nicht strikt nach Spezifikation.
 LNotToSpecInfo=Die JNLP-Datei enth\u00e4lt Daten, die nach JNLP Spezifikation verboten sind. Die Laufzeitumgebung kann versuchen die ung\u00fcltigen Information zu ignorieren und die Datei zu starten fortfahren.
 LNotApplication=Keine Anwendungsdatei.
--- a/netx/net/sourceforge/jnlp/resources/Messages_pl.properties	Thu Dec 13 10:51:17 2018 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages_pl.properties	Wed Jan 09 16:16:54 2019 +0100
@@ -110,8 +110,8 @@
 LCantReadInfo=Mo\u017cesz spr\u00f3bowa\u0107 r\u0119cznie pobra\u0107 ten plik i wys\u0142a\u0107 go razem ze zg\u0142oszeniem b\u0142\u0119du do zespo\u0142u IcedTea-Web.
 LNullLocation=Nie mo\u017cna ustali\u0107 lokalizacj\u0119 pliku .jnlp.
 LNullLocationInfo=Podj\u0119to pr\u00f3b\u0119 wystartowania pliku JNLP w innej JVM, lecz nie mo\u017cna by\u0142o zlokalizowa\u0107 plik. Aby wystartowa\u0107 w zewn\u0119trznej JVM, uruchomienie programowe musi by\u0107 w stanie zlokalizowa\u0107 plik .jnlp albo w lokalnym systemie plik\u00f3w czy na serwerze.
-LNetxJarMissing=Nie mo\u017cna ustali\u0107 lokalizacj\u0119 netx.jar.
-LNetxJarMissingInfo=Podj\u0119to pr\u00f3b\u0119 wystartowania pliku JNLP w innej JVM, lecz nie mo\u017cna by\u0142o zlokalizowa\u0107 netx.jar. Aby wystartowa\u0107 w zewn\u0119trznej JVM, uruchomienie programowe musi by\u0107 w stanie zlokalizowa\u0107 plik netx.jar.
+LNetxJarMissing=Nie mo\u017cna ustali\u0107 lokalizacj\u0119 javaws.jar.
+LNetxJarMissingInfo=Podj\u0119to pr\u00f3b\u0119 wystartowania pliku JNLP w innej JVM, lecz nie mo\u017cna by\u0142o zlokalizowa\u0107 javaws.jar. Aby wystartowa\u0107 w zewn\u0119trznej JVM, uruchomienie programowe musi by\u0107 w stanie zlokalizowa\u0107 plik javaws.jar.
 LNotToSpec=Plik JNLP nie spe\u0142nia \u015bci\u015ble specyfikacji.
 LNotToSpecInfo=Plik JNLP zawiera dane, kt\u00f3re s\u0105 zabronione wed\u0142ug specyfikacji JNLP. Uruchomienie programowe mo\u017ce pr\u00f3bowa\u0107 ignorowa\u0107 niepoprawne informacje i kontynuowa\u0107 startowanie pliku.
 LNotApplication=Brak pliku applet-owego.
--- a/netx/net/sourceforge/jnlp/resources/Messages_ru.properties	Thu Dec 13 10:51:17 2018 +0100
+++ b/netx/net/sourceforge/jnlp/resources/Messages_ru.properties	Wed Jan 09 16:16:54 2019 +0100
@@ -113,8 +113,8 @@
 LCantReadInfo=\u041c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0442\u0447\u0451\u0442\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 IcedTea-Web.
 LNullLocation=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 .jnlp.
 LNullLocationInfo=\u0411\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 JNLP \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 JVM, \u043d\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b.  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e JVM, \u0441\u0440\u0435\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b .jnlp \u043b\u0438\u0431\u043e \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043b\u0438\u0431\u043e \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.
-LNetxJarMissing=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b netx.jar.
-LNetxJarMissingInfo=\u0411\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 JNLP \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 JVM, \u043d\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b netx.jar.  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e JVM, \u0441\u0440\u0435\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b netx.jar.
+LNetxJarMissing=\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b javaws.jar.
+LNetxJarMissingInfo=\u0411\u044b\u043b\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 JNLP \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 JVM, \u043d\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b javaws.jar.  \u0427\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e JVM, \u0441\u0440\u0435\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b javaws.jar.
 LNotToSpec=\u0424\u0430\u0439\u043b JNLP \u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f\u043c.
 LNotToSpecInfo=\u0424\u0430\u0439\u043b JNLP \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 JNLP.  \u0421\u0440\u0435\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u043a \u0444\u0430\u0439\u043b\u0430.
 LNotApplication=\u041d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.
--- a/netx/net/sourceforge/jnlp/runtime/Translator.java	Thu Dec 13 10:51:17 2018 +0100
+++ b/netx/net/sourceforge/jnlp/runtime/Translator.java	Wed Jan 09 16:16:54 2019 +0100
@@ -52,7 +52,7 @@
             resources = ResourceBundle.getBundle(s);
         } catch (Exception ex) {
             throw new IllegalStateException("No bundles found for Locale: " + Locale.getDefault().toString()
-                    + "and missing base resource bundle in netx.jar:net/sourceforge/jnlp/resource/Messages.properties");
+                    + "and missing base resource bundle in javaws.jar:net/sourceforge/jnlp/resource/Messages.properties");
         }
     }
 
--- a/rust-launcher/src/dirs_paths_helper.rs	Thu Dec 13 10:51:17 2018 +0100
+++ b/rust-launcher/src/dirs_paths_helper.rs	Wed Jan 09 16:16:54 2019 +0100
@@ -60,6 +60,22 @@
     path.metadata().map(|md| md.is_dir()).unwrap_or(false)
 }
 
+pub fn path_to_string(path: &std::path::PathBuf) -> String {
+    path.to_str().expect("unwrap of os string failed").to_string()
+}
+
+pub fn current_program() -> std::path::PathBuf {
+    env::current_exe().expect("unwrap of pgm path failed")
+}
+
+pub fn current_program_parent() -> std::path::PathBuf {
+    std::path::PathBuf::from(current_program().parent().expect("getting of pgm dir failed"))
+}
+
+pub fn current_program_name() -> String {
+    String::from(current_program().file_name().expect("unwrap of pgm name failed").to_str().expect("unwrap of pgm name failed"))
+}
+
 /*tests*/
 #[cfg(test)]
 mod tests {
@@ -69,22 +85,30 @@
     use utils::tests_utils as tu;
 
     #[test]
+    #[cfg(not(windows))]
     fn check_config_files_paths() {
         let os = os_access::Linux::new(false);
         let p3 = super::get_itw_config_file(&os);
-        let p4 = super::get_itw_legacy_config_file(&os);
-        let p5 = super::get_itw_legacy_global_config_file(&os);
         let p6 = super::get_itw_global_config_file(&os);
         assert_ne!(None, p3);
-        assert_ne!(None, p4);
-        assert_ne!(None, p5);
         assert_ne!(None, p6);
         println!("{}", p3.clone().expect("unwrap failed").display());
-        println!("{}", p4.clone().expect("unwrap failed").display());
-        println!("{}", p5.clone().expect("unwrap failed").display());
         println!("{}", p6.clone().expect("unwrap failed").display());
         assert_eq!(true, p3.clone().expect("unwrap failed").display().to_string().contains("icedtea-web"));
         assert_eq!(true, p3.clone().expect("unwrap failed").display().to_string().ends_with("deployment.properties"));
+        assert_eq!(true, p6.clone().expect("unwrap failed").display().to_string().ends_with("deployment.properties"));
+    }
+
+    #[test]
+    #[cfg(not(windows))]
+    fn check_legacy_config_files_paths() {
+        let os = os_access::Linux::new(false);
+        let p4 = super::get_itw_legacy_config_file(&os);
+        let p5 = super::get_itw_legacy_global_config_file(&os);
+        assert_ne!(None, p4);
+        assert_ne!(None, p5);
+        println!("{}", p4.clone().expect("unwrap failed").display());
+        println!("{}", p5.clone().expect("unwrap failed").display());
         assert_eq!(true, p4.clone().expect("unwrap failed").display().to_string().contains(".icedtea"));
         assert_eq!(true, p4.clone().expect("unwrap failed").display().to_string().ends_with("deployment.properties"));
         assert_eq!(true, p5.clone().expect("unwrap failed").display().to_string().contains("etc"));
@@ -94,7 +118,6 @@
         assert_eq!(true, p5.clone().expect("unwrap failed").display().to_string().contains("etc"));
         assert_eq!(true, p5.clone().expect("unwrap failed").display().to_string().contains(".java"));
         assert_eq!(true, p5.clone().expect("unwrap failed").display().to_string().contains("deployment"));
-        assert_eq!(true, p6.clone().expect("unwrap failed").display().to_string().ends_with("deployment.properties"));
     }
 
     #[test]
--- a/rust-launcher/src/hardcoded_paths.rs	Thu Dec 13 10:51:17 2018 +0100
+++ b/rust-launcher/src/hardcoded_paths.rs	Wed Jan 09 16:16:54 2019 +0100
@@ -1,7 +1,13 @@
+use os_access;
+use env;
+use std::string::String;
+use std::fmt::Write;
+use std::str::FromStr;
+
 /*legacy variables*/
 const PROGRAM_NAME: Option<&'static str> = option_env!("PROGRAM_NAME");
 const LAUNCHER_BOOTCLASSPATH: Option<&'static str> = option_env!("LAUNCHER_BOOTCLASSPATH");
-const JAVAWS_SPLASH_LOCATION: Option<&'static str> = option_env!("JAVAWS_SPLASH_LOCATION");
+const SPLASH_PNG: Option<&'static str> = option_env!("SPLASH_PNG");
 const JAVA: Option<&'static str> = option_env!("JAVA");
 const JRE: Option<&'static str> = option_env!("JRE");
 const MAIN_CLASS: Option<&'static str> = option_env!("MAIN_CLASS");
@@ -9,6 +15,9 @@
 const NETX_JAR: Option<&'static str> = option_env!("NETX_JAR");
 const PLUGIN_JAR: Option<&'static str> = option_env!("PLUGIN_JAR");
 const JSOBJECT_JAR: Option<&'static str> = option_env!("JSOBJECT_JAR");
+const TAGSOUP_JAR: Option<&'static str> = option_env!("TAGSOUP_JAR");
+const RHINO_JAR: Option<&'static str> = option_env!("RHINO_JAR");
+const ITW_LIBS: Option<&'static str> = option_env!("ITW_LIBS");
 
 
 pub fn get_jre() -> &'static str {
@@ -31,12 +40,93 @@
     BIN_LOCATION.unwrap_or("BIN_LOCATION-dev-unspecified")
 }
 
+pub fn get_splash() -> &'static str {
+    SPLASH_PNG.unwrap_or("SPLASH_PNG-dev-unspecified")
+}
+
+pub fn get_netx() -> &'static str { NETX_JAR.unwrap_or("NETX_JAR-dev-unspecified") }
+
+fn get_itwlibsearch() -> &'static str {
+    ITW_LIBS.unwrap_or("ITW_LIBS-dev-unspecified")
+}
+
+pub fn get_bootcp() -> &'static str {LAUNCHER_BOOTCLASSPATH.unwrap_or("LAUNCHER_BOOTCLASSPATH-dev-unspecified") }
+
+// optional deps
+pub fn get_plugin() -> Option<&'static str> {
+    PLUGIN_JAR
+}
+
+pub fn get_jsobject() -> Option<&'static str> { JSOBJECT_JAR }
+
+pub fn get_tagsoup() -> Option<&'static str> { TAGSOUP_JAR }
+
+pub fn get_rhino() -> Option<&'static str> { RHINO_JAR }
+
+
+#[derive(PartialEq)]
+pub enum ItwLibSearch {
+    BUNDLED,
+    DISTRIBUTION,
+    BOTH,
+}
+
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct ParseItwLibSearch { _priv: () }
+
+impl FromStr for ItwLibSearch {
+
+    type Err = ParseItwLibSearch;
+
+    fn from_str(sstr: &str) -> Result<ItwLibSearch, ParseItwLibSearch> {
+        if sstr == "BOTH" {
+            return Ok(ItwLibSearch::BOTH);
+        }
+        if sstr == "BUNDLED" {
+            return Ok(ItwLibSearch::BUNDLED);
+        }
+        if sstr == "DISTRIBUTION" {
+            return Ok(ItwLibSearch::DISTRIBUTION);
+        }
+        return Err(ParseItwLibSearch { _priv: () })
+    }
+}
+
+pub fn get_libsearch(logger: &os_access::Os) -> ItwLibSearch {
+    let itw_libs_override = env::var("ITW_LIBS");
+    match itw_libs_override {
+        Ok(result_of_override_var) => match ItwLibSearch::from_str(&result_of_override_var) {
+            Ok(result_of_override_to_enum) => {
+                return result_of_override_to_enum;
+            }
+            _Err => {
+                let mut info = String::new();
+                write!(&mut info, "ITW-LIBS provided, but have invalid value of {}. Use BUNDLED, DISTRIBUTION or BOTH", result_of_override_var);
+                logger.info(&info);
+            }
+        }
+        _error => {
+            //no op, continuing via get_itwlibsearch
+        }
+    }
+    match ItwLibSearch::from_str(get_itwlibsearch()) {
+        Ok(v) => {
+            return v
+        }
+        _Err=> {
+            panic!("itw-lib search out of range");
+        }
+    }
+}
+
 
 /*new variables*/
 
 /*tests*/
 #[cfg(test)]
 mod tests {
+    use std::str::FromStr;
+
     #[test]
     fn variables_non_default() {
         assert_ne!(String::from(super::get_jre()).trim(), String::from("JRE-dev-unspecified"));
@@ -44,6 +134,9 @@
         assert_ne!(String::from(super::get_main()).trim(), String::from("MAIN_CLASS-dev-unspecified"));
         assert_ne!(String::from(super::get_name()).trim(), String::from("PROGRAM_NAME-dev-unspecified"));
         assert_ne!(String::from(super::get_bin()).trim(), String::from("BIN_LOCATION-dev-unspecified"));
+        assert_ne!(String::from(super::get_splash()).trim(), String::from("SPLASH_PNG-dev-unspecified"));
+        assert_ne!(String::from(super::get_netx()).trim(), String::from("NETX_JAR-dev-unspecified"));
+        assert_ne!(String::from(super::get_itwlibsearch()).trim(), String::from("ITW_LIBS-dev-unspecified"));
     }
 
     #[test]
@@ -53,5 +146,21 @@
         assert_ne!(String::from(super::get_main()).trim(), String::from(""));
         assert_ne!(String::from(super::get_name()).trim(), String::from(""));
         assert_ne!(String::from(super::get_bin()).trim(), String::from(""));
+        assert_ne!(String::from(super::get_splash()).trim(), String::from(""));
+        assert_ne!(String::from(super::get_netx()).trim(), String::from(""));
+        assert_ne!(String::from(super::get_itwlibsearch()).trim(), String::from(""));
+    }
+
+    #[test]
+    fn get_itwlibsearch_in_enumeration() {
+        assert_eq!(super::get_itwlibsearch() == "BOTH" || super::get_itwlibsearch() == "BUNDLED" || super::get_itwlibsearch() == "DISTRIBUTION", true);
+    }
+
+    #[test]
+    fn itw_libsearch_to_enum_test() {
+        assert!(super::ItwLibSearch::from_str("BUNDLED") == Ok(super::ItwLibSearch::BUNDLED));
+        assert!(super::ItwLibSearch::from_str("BOTH") == Ok(super::ItwLibSearch::BOTH));
+        assert!(super::ItwLibSearch::from_str("DISTRIBUTION") == Ok(super::ItwLibSearch::DISTRIBUTION));
+        assert!(super::ItwLibSearch::from_str("") == Err(super::ParseItwLibSearch { _priv: () }));
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rust-launcher/src/jars_helper.rs	Wed Jan 09 16:16:54 2019 +0100
@@ -0,0 +1,199 @@
+use std;
+use env;
+use hardcoded_paths;
+use hardcoded_paths::ItwLibSearch;
+use os_access;
+use dirs_paths_helper;
+use std::fmt::Write;
+
+//order important!
+const LOCAL_PATHS: &'static [&'static str] = &[
+    "share/icedtea-web",
+    "linux-deps-runtime",
+    "win-deps-runtime",
+    "win-deps-all",
+    "../share/icedtea-web",
+    "../linux-deps-runtime",
+    "../win-deps-runtime",
+    "../win-deps-all",
+    "."];
+
+
+pub fn resolve_splash(logger: &os_access::Os) -> std::path::PathBuf {
+    resolve_jar(hardcoded_paths::get_splash(), logger)
+}
+
+fn try_jar_in_subdirs(dir: &std::path::PathBuf, name: &std::ffi::OsStr, logger: &os_access::Os) -> Option<std::path::PathBuf> {
+    for path in LOCAL_PATHS {
+        let mut candidate = std::path::PathBuf::from(dir);
+        candidate.push(path);
+        candidate.push(name);
+        let mut info1 = String::new();
+        write!(&mut info1, "itw-rust-debug: trying {}", &dirs_paths_helper::path_to_string(&candidate)).expect("unwrap failed");
+        logger.log(&info1);
+        if dirs_paths_helper::is_file(&candidate) {
+            logger.log(&dirs_paths_helper::path_to_string(&candidate));
+            return Some(candidate);
+        }
+    }
+    return None;
+}
+
+fn resolve_jar(full_hardcoded_path: &str, logger: &os_access::Os) -> std::path::PathBuf {
+    let current_libsearch = hardcoded_paths::get_libsearch(logger);
+    let full_path = std::path::PathBuf::from(full_hardcoded_path);
+    let name = full_path.file_name().expect("Error obtaining file name form hardcoded jar");
+    //ITW_LIBS_DIR always, hopefully it is  not set
+    let itw_libs_override = env::var("ITW_HOME");
+    match itw_libs_override {
+        Ok(result_of_override_var) => {
+            let custom_dir = std::path::PathBuf::from(&result_of_override_var);
+            if dirs_paths_helper::is_dir(&custom_dir) {
+                match try_jar_in_subdirs(&custom_dir, name, logger) {
+                    Some(candidate) => {
+                        return candidate;
+                    }
+                    _none => {
+                        //nothing found, continuing
+                    }
+                }
+            } else {
+                let mut info1 = String::new();
+                write!(&mut info1, "custom ITW_HOME provided, but do not exists or is not directory: {}", &(dirs_paths_helper::path_to_string(&custom_dir)));
+                logger.info(&info1);
+            }
+        }
+        _error => {
+            //good, no messing with paths!
+        }
+    }
+    //first local dir - if allowed
+    if current_libsearch == ItwLibSearch::BUNDLED || current_libsearch == ItwLibSearch::BOTH {
+        let pgmdir = dirs_paths_helper::current_program_parent();
+        let pgmparent: std::path::PathBuf = match pgmdir.parent() {
+            Some(s) => {
+                s.to_path_buf()
+            }
+            None => {
+                pgmdir.clone()
+            }
+        };
+        match try_jar_in_subdirs(&pgmparent, &name, logger) {
+            Some(candidate) => {
+                return candidate;
+            }
+            _none => {
+                //nothing found, continuing
+            }
+        }
+    }
+    //then installed dirs, if allowd
+    if current_libsearch == ItwLibSearch::DISTRIBUTION || current_libsearch == ItwLibSearch::BOTH {
+        let candidate = std::path::PathBuf::from(full_hardcoded_path);
+        if dirs_paths_helper::is_file(&candidate) {
+            logger.log(&dirs_paths_helper::path_to_string(&candidate));
+            return candidate;
+        }
+    }
+    //fallback to hardcoded, but warn
+    logger.info("Warning!, Fall back in resolve_jar to hardcoded paths: ");
+    let result = std::path::PathBuf::from(full_hardcoded_path);
+    logger.info(&dirs_paths_helper::path_to_string(&result));
+    result
+}
+
+fn append_if_exists(value: Option<&'static str>, os: &os_access::Os, vec: &mut Vec<std::path::PathBuf>) {
+    match value {
+        Some(s) => {
+            vec.push(resolve_jar(s, os));
+        }
+        _none => {}
+    }
+}
+
+//TODO what to do with rt.jar, nashorn and javafx.jar with jdk11 and up?
+fn get_bootcp_members(jre_path: &std::path::PathBuf, os: &os_access::Os) -> Vec<std::path::PathBuf> {
+    let mut cp_parts = Vec::new();
+    cp_parts.push(resolve_jar(hardcoded_paths::get_netx(), os));
+    append_if_exists(hardcoded_paths::get_plugin(), os, &mut cp_parts);
+    append_if_exists(hardcoded_paths::get_jsobject(), os, &mut cp_parts);
+    append_if_exists(hardcoded_paths::get_rhino(), os, &mut cp_parts);
+    append_if_exists(hardcoded_paths::get_tagsoup(), os, &mut cp_parts);
+    let mut nashorn_jar = jre_path.clone();
+    nashorn_jar.push("lib");
+    nashorn_jar.push("ext");
+    nashorn_jar.push("nashorn.jar");
+    cp_parts.push(nashorn_jar);
+    cp_parts
+}
+
+//can this be buggy? Shouldnt jfxrt.jar be in boot classapth? Copied from shell launchers...
+//see eg: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2018-November/040492.html
+fn get_cp_members(jre_path: &std::path::PathBuf, _os: &os_access::Os) -> Vec<std::path::PathBuf> {
+    let mut cp_parts = Vec::new();
+    let mut rt_jar = jre_path.clone();
+    rt_jar.push("lib");
+    rt_jar.push("rt.jar");
+    cp_parts.push(rt_jar);
+    let mut jfxrt_jar = jre_path.clone();
+    jfxrt_jar.push("lib");
+    jfxrt_jar.push("jfxrt.jar");
+    cp_parts.push(jfxrt_jar);
+    cp_parts
+}
+
+fn compose_class_path(members: Vec<std::path::PathBuf>, os: &os_access::Os) -> String {
+    let mut result = String::new();
+    let mut i = 0;
+    for (i, mb) in members.iter().enumerate()  {
+        result.push_str(&dirs_paths_helper::path_to_string(&mb));
+        if i < members.len() - 1 {
+            result.push(os.get_classpath_separator());
+        }
+    }
+    result
+}
+
+pub fn get_classpath(jre_path: &std::path::PathBuf, os: &os_access::Os) -> String {
+    compose_class_path(get_cp_members(jre_path, os), os)
+}
+
+pub fn get_bootclasspath(jre_path: &std::path::PathBuf, os: &os_access::Os) -> String {
+    let mut result = String::from("-Xbootclasspath/a");
+    result.push(os.get_classpath_separator());
+    result.push_str(&compose_class_path(get_bootcp_members(jre_path, os), os));
+    result
+}
+
+/*tests*/
+#[cfg(test)]
+mod tests {
+    use utils::tests_utils as tu;
+
+    #[test]
+    fn compose_class_path_test_emty() {
+        assert_eq!("", super::compose_class_path(vec![], &tu::TestLogger::create_new()));
+    }
+
+    #[test]
+    fn compose_class_path_test_two() {
+        assert_eq!("a:b", super::compose_class_path(vec![std::path::PathBuf::from("a"), std::path::PathBuf::from("b")], &tu::TestLogger::create_new()));
+    }
+
+    #[test]
+    fn compose_class_path_test_one() {
+        assert_eq!("a", super::compose_class_path(vec![std::path::PathBuf::from("a")], &tu::TestLogger::create_new()));
+    }
+
+
+    #[test]
+    fn compose_class_path_test_three() {
+        assert_eq!("a/b:/a/b/:c:c:a/b", super::compose_class_path(vec![
+            std::path::PathBuf::from("a/b"),
+            std::path::PathBuf::from("/a/b/"),
+            std::path::PathBuf::from("c"),
+            std::path::PathBuf::from("c"),
+            std::path::PathBuf::from("a/b"),
+        ], &tu::TestLogger::create_new()));
+    }
+}
--- a/rust-launcher/src/main.rs	Thu Dec 13 10:51:17 2018 +0100
+++ b/rust-launcher/src/main.rs	Wed Jan 09 16:16:54 2019 +0100
@@ -5,13 +5,14 @@
 mod property_from_files_resolver;
 mod utils;
 mod property;
+mod jars_helper;
 
 use std::string::String;
 use std::fmt::Write;
 use os_access::Os;
 use std::env;
 
-fn is_debug_on() -> bool{
+fn is_debug_on() -> bool {
     for s in env::args() {
         //this can go wrong with case like -jnlp file-verbose or -html file-verbose
         //but it is really unlikely case as those are ususally .jnlp or .html suffixed
@@ -26,6 +27,7 @@
 fn main() {
     //TODO verbose will be populated by also from deployment properties
     let os = os_access::Linux::new(is_debug_on());
+    os.log(&dirs_paths_helper::path_to_string(&dirs_paths_helper::current_program()));
     let java_dir: std::path::PathBuf;
     let mut info1 = String::new();
     write!(&mut info1, "itw-rust-debug: trying jdk over properties ({})", property_from_file::JRE_PROPERTY_NAME).expect("unwrap failed");
@@ -64,7 +66,58 @@
     let mut info2 = String::new();
     write!(&mut info2, "selected jre: {}", java_dir.display()).expect("unwrap failed");
     os.info(&info2);
-    let mut child = os.spawn_java_process(&java_dir, &(env::args().skip(1).collect()));
+
+    let hard_bootcp = hardcoded_paths::get_bootcp();
+    let bootcp = jars_helper::get_bootclasspath(&java_dir, &os);
+    let cp = jars_helper::get_classpath(&java_dir, &os);
+    let current_name = dirs_paths_helper::current_program_name();
+    let current_bin = dirs_paths_helper::current_program();
+    info2 = String::new();
+    write!(&mut info2, "itw-rust-debug: exemplar boot classpath: {}", hard_bootcp).expect("unwrap failed");
+    os.log(&info2);
+    info2 = String::new();
+    write!(&mut info2, "itw-rust-debug: used boot classpath: {}", bootcp).expect("unwrap failed");
+    os.log(&info2);
+    info2 = String::new();
+    write!(&mut info2, "itw-rust-debug: used classpath: {}", cp).expect("unwrap failed");
+    os.log(&info2);
+    info2 = String::new();
+    write!(&mut info2, "itw-rust-debug: expected name: {}", hardcoded_paths::get_name()).expect("unwrap failed");
+    os.log(&info2);
+    info2 = String::new();
+    write!(&mut info2, "itw-rust-debug: current name: {}", current_name).expect("unwrap failed");
+    os.log(&info2);
+    info2 = String::new();
+    write!(&mut info2, "itw-rust-debug: installed bin: {}", hardcoded_paths::get_bin()).expect("unwrap failed");
+    os.log(&info2);
+    info2 = String::new();
+    write!(&mut info2, "itw-rust-debug: current bin: {}", &dirs_paths_helper::path_to_string(&current_bin)).expect("unwrap failed");
+    os.log(&info2);
+
+    let splash = jars_helper::resolve_splash(&os);
+    let mut bin_name = String::from("-Dicedtea-web.bin.name=");
+    let mut bin_location = String::from("-Dicedtea-web.bin.location=");
+    //no metter what ITW_LIBS are saying, imho using current pgm is always correct comapred to hardcoded values
+    bin_name.push_str(&current_name);
+    bin_location.push_str(&dirs_paths_helper::path_to_string(&current_bin));
+
+    let mut all_args = std::vec::Vec::new();
+    all_args.push(bootcp);
+    all_args.push(String::from("-classpath"));
+    all_args.push(cp);
+    all_args.push(bin_name);
+    all_args.push(bin_location);
+    all_args.push(hardcoded_paths::get_main().to_string());
+
+
+    let a = env::args();
+    let s = a.skip(1);
+    let c: std::vec::Vec<String> = s.collect();
+    for f in c.iter() {
+        all_args.push(f.to_string());
+    }
+
+    let mut child = os.spawn_java_process(&java_dir, &all_args);
     let ecode = child.wait().expect("failed to wait on child");
     let code = ecode.code().expect("code should be always here");
     std::process::exit(code)
--- a/rust-launcher/src/os_access.rs	Thu Dec 13 10:51:17 2018 +0100
+++ b/rust-launcher/src/os_access.rs	Wed Jan 09 16:16:54 2019 +0100
@@ -1,6 +1,7 @@
 use std;
 use dirs_paths_helper;
 use std::env;
+use std::fmt::Write;
 
 pub trait Os {
     // logging "api" can change
@@ -20,6 +21,7 @@
     // it should have fallback in env::home_dir as it is doing a bit more
     // see https://doc.rust-lang.org/std/env/fn.home_dir.html
     fn get_home(&self) -> Option<std::path::PathBuf>;
+    fn get_classpath_separator(&self) -> char;
 }
 
 pub struct Linux {
@@ -88,6 +90,9 @@
         cmd.stdin(std::process::Stdio::inherit());
         cmd.stdout(std::process::Stdio::inherit());
         cmd.stderr(std::process::Stdio::inherit());
+        let mut info = String::new();
+        write!(&mut info, "itw-rust-debug: command {}", format!("{:?}", cmd)).expect("unwrap failed");
+        self.log(&info);
         let res = cmd.spawn();
         match res {
             Ok(child) => child,
@@ -111,4 +116,8 @@
         // locally, or fix the distribution itslef
         None
     }
+
+    fn get_classpath_separator(&self) -> char {
+        return ':';
+    }
 }
--- a/rust-launcher/src/property_from_files_resolver.rs	Thu Dec 13 10:51:17 2018 +0100
+++ b/rust-launcher/src/property_from_files_resolver.rs	Wed Jan 09 16:16:54 2019 +0100
@@ -67,64 +67,12 @@
 mod tests {
     use std;
     use os_access;
-    use std::cell::RefCell;
     use utils::tests_utils as tu;
     use property_from_file;
     //if you wont to investigate files used for testing
     // use cargo test -- --nocapture to see  files which needs delete
     static DELETE_TEST_FILES: bool = true;
 
-    pub struct TestLogger {
-        vec: RefCell<Vec<String>>,
-    }
-
-    impl TestLogger {
-        fn get_log(&self) -> String {
-            let joined = self.vec.borrow_mut().join("; ");
-            joined
-        }
-    }
-
-    impl os_access::Os for TestLogger {
-        fn log(&self, s: &str) {
-            let ss = String::from(s);
-            self.vec.borrow_mut().push(ss);
-        }
-
-        fn info(&self, s: &str) {
-            let ss = String::from(s);
-            self.vec.borrow_mut().push(ss);
-        }
-
-        fn get_registry_jdk(&self) -> Option<std::path::PathBuf> {
-            None
-        }
-
-        fn spawn_java_process(&self, _jre_dir: &std::path::PathBuf, _args: &Vec<String>) -> std::process::Child {
-            panic!("not implemented");
-        }
-
-        fn get_system_config_javadir(&self) -> Option<std::path::PathBuf> {
-            panic!("not implemented");
-        }
-
-        fn get_user_config_dir(&self) -> Option<std::path::PathBuf> {
-            panic!("not implemented");
-        }
-
-        fn get_legacy_system_config_javadir(&self) -> Option<std::path::PathBuf> {
-            panic!("not implemented");
-        }
-
-        fn get_legacy_user_config_dir(&self) -> Option<std::path::PathBuf> {
-            panic!("not implemented");
-        }
-
-        fn get_home(&self) -> Option<std::path::PathBuf> {
-            panic!("not implemented");
-        }
-    }
-
     fn try_jdk_from_properties_files(logger: &os_access::Os, array: &[Option<std::path::PathBuf>]) -> Option<String> {
         super::try_key_from_properties_files(logger, &array, property_from_file::JRE_PROPERTY_NAME, &property_from_file::JreValidator {})
     }
@@ -137,7 +85,7 @@
             None,
             None
         ];
-        let os = TestLogger { vec: RefCell::new(Vec::new()) };
+        let os = tu::TestLogger::create_new();
         let r = try_jdk_from_properties_files(&os, &array);
         println!("{}", &os.get_log());
         assert_eq!(None, r);
@@ -151,7 +99,7 @@
             Some(std::path::PathBuf::from("Nonexisting file 3")),
             Some(std::path::PathBuf::from("Nonexisting file 4")),
         ];
-        let os = TestLogger { vec: RefCell::new(Vec::new()) };
+        let os = tu::TestLogger::create_new();
         let r = try_jdk_from_properties_files(&os, &array);
         println!("{}", &os.get_log());
         assert_eq!(None, r);
@@ -180,7 +128,7 @@
             Some(std::path::PathBuf::from(tu::create_tmp_file())),
             Some(std::path::PathBuf::from(tu::create_tmp_file())),
         ];
-        let os = TestLogger { vec: RefCell::new(Vec::new()) };
+        let os = tu::TestLogger::create_new();
         let r = try_jdk_from_properties_files(&os, &array);
         println!("{}", &os.get_log());
         clean_fake_files(&array);
@@ -195,7 +143,7 @@
             Some(std::path::PathBuf::from(tu::create_tmp_propfile_with_custom_jre_content("non/existing/jre3"))),
             Some(std::path::PathBuf::from(tu::create_tmp_propfile_with_custom_jre_content("non/existing/jre4"))),
         ];
-        let os = TestLogger { vec: RefCell::new(Vec::new()) };
+        let os = tu::TestLogger::create_new();
         let r = try_jdk_from_properties_files(&os, &array);
         println!("{}", &os.get_log());
         clean_fake_files(&array);
@@ -216,7 +164,7 @@
             Some(std::path::PathBuf::from(tu::create_tmp_propfile_with_custom_jre_content("non/existing/jre3"))),
             Some(std::path::PathBuf::from(tu::create_tmp_propfile_with_custom_jre_content("non/existing/jre4"))),
         ];
-        let os = TestLogger { vec: RefCell::new(Vec::new()) };
+        let os = tu::TestLogger::create_new();
         let r = try_jdk_from_properties_files(&os, &array);
         println!("{}", &os.get_log());
         clean_fake_files(&array);
@@ -237,7 +185,7 @@
             Some(std::path::PathBuf::from(tu::create_tmp_file())),
             Some(std::path::PathBuf::from(tu::create_tmp_propfile_with_custom_jre_content(&master_dir2.display().to_string()))),
         ];
-        let os = TestLogger { vec: RefCell::new(Vec::new()) };
+        let os = tu::TestLogger::create_new();
         let r = try_jdk_from_properties_files(&os, &array);
         println!("{}", &os.get_log());
         clean_fake_files(&array);
--- a/rust-launcher/src/utils.rs	Thu Dec 13 10:51:17 2018 +0100
+++ b/rust-launcher/src/utils.rs	Wed Jan 09 16:16:54 2019 +0100
@@ -8,6 +8,66 @@
     use std::io::Write;
     use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
     use property_from_file;
+    use os_access;
+    use std::cell::RefCell;
+    use dirs_paths_helper;
+
+    pub struct TestLogger {
+        vec: RefCell<Vec<String>>,
+    }
+
+    impl TestLogger {
+        pub fn create_new() -> TestLogger {
+            TestLogger { vec: RefCell::new(Vec::new()) }
+        }
+
+        pub fn get_log(&self) -> String {
+            let joined = self.vec.borrow_mut().join("; ");
+            joined
+        }
+    }
+
+    impl os_access::Os for TestLogger {
+        fn log(&self, s: &str) {
+            let ss = String::from(s);
+            self.vec.borrow_mut().push(ss);
+        }
+
+        fn info(&self, s: &str) {
+            let ss = String::from(s);
+            self.vec.borrow_mut().push(ss);
+        }
+
+        fn get_registry_jdk(&self) -> Option<std::path::PathBuf> {
+            None
+        }
+
+        fn spawn_java_process(&self, _jre_dir: &std::path::PathBuf, _args: &Vec<String>) -> std::process::Child {
+            panic!("not implemented");
+        }
+
+        fn get_system_config_javadir(&self) -> Option<std::path::PathBuf> {
+            panic!("not implemented");
+        }
+
+        fn get_user_config_dir(&self) -> Option<std::path::PathBuf> {
+            panic!("not implemented");
+        }
+
+        fn get_legacy_system_config_javadir(&self) -> Option<std::path::PathBuf> {
+            panic!("not implemented");
+        }
+
+        fn get_legacy_user_config_dir(&self) -> Option<std::path::PathBuf> {
+            panic!("not implemented");
+        }
+
+        fn get_home(&self) -> Option<std::path::PathBuf> {
+            panic!("not implemented");
+        }
+        fn get_classpath_separator(&self) -> char { ':' }
+    }
+
 
     // rand is in separate crate, so using atomic increment instead
     static TMP_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
@@ -49,10 +109,9 @@
     }
 
     pub fn create_scratch_dir() -> std::path::PathBuf {
-        let exepath = std::env::current_exe().expect("Current exe path not accessible");
-        let mut project_dir = exepath.parent().expect("Cannot get parent");
+        let mut project_dir = dirs_paths_helper::current_program_parent();
         while !project_dir.to_str().expect("Cannot get path name").ends_with("rust-launcher") {
-            project_dir = project_dir.parent().expect("Cannot get parent");
+            project_dir = project_dir.parent().expect("Cannot get parent").to_path_buf();
         }
         let mut scratch_dir = std::path::PathBuf::new();
         scratch_dir.push(project_dir);