Run onos-local with Bazel-provided remote JDK

That's it, no need to have a JDK installed in your host system.

Unfortunately the Bazel remote JDK targets don't expose some files
required by Karaf at runtime (conf/security). The workaround for
now is to check them in here, but we should consider fixing the Bazel
rules upstream.

Change-Id: Ib003b1589d326655c1cf5f329ebe48b0c946743f
diff --git a/BUILD b/BUILD
index b1cd400..1226cc2 100644
--- a/BUILD
+++ b/BUILD
@@ -122,10 +122,13 @@
     name = "onos-local",
     srcs = [
         ":onos-package",
+        "//tools/build/jdk:default_jdk_tar",
         "tools/package/onos-run-karaf",
     ] + glob(["tools/package/config/**"]),
     outs = ["onos-runner"],
-    cmd = "sed \"s#ONOS_TAR=#ONOS_TAR=$(location :onos-package)#\" $(location tools/package/onos-run-karaf) > $(location onos-runner); chmod +x $(location onos-runner)",
+    cmd = "sed \"s#ONOS_TAR=#ONOS_TAR=$(location :onos-package)#\" $(location tools/package/onos-run-karaf) > foo; " +
+          "sed \"s#JDK_TAR=#JDK_TAR=$(location //tools/build/jdk:default_jdk_tar)#\" foo > $(location onos-runner); " +
+          "chmod +x $(location onos-runner)",
     executable = True,
     output_to_bindir = True,
     visibility = ["//visibility:public"],