aboutsummaryrefslogtreecommitdiffstats
path: root/launcher
diff options
context:
space:
mode:
authorOmair Majid <[email protected]>2011-02-22 11:47:44 -0500
committerOmair Majid <[email protected]>2011-02-22 11:47:44 -0500
commit1f1820c7adbe3b1c52f3bdf6c64cd9fad6ad8721 (patch)
treeba45ae0bf92844a4ba5027ff7669703cf1bba55e /launcher
parentdcc4fbb95625aa3fb714def9f950d203414fd495 (diff)
Install icedtea-web into a FHS-compliant location
2011-02-22 Omair Majid <[email protected]> * Makefile.am: Add new vars JRE, LAUNCHER_BOOTCLASSPATH and PLUGIN_BOOTCLASSPATH. (install-exec-local): Install files to FHS-compliant location; do not create links. (install-data-local): Likewise. (uninstall-local): Update file paths to delete. ($(PLUGIN_DIR)/%.o): Pass PLUGIN_BOOTCLASSPATH and ICEDTEA_WEB_JRE. ($(NETX_DIR)/launcher/%.o): Pass LAUNCHER_BOOTCLASSPATH and ICEDTEA_WEB_JRE. ($(NETX_DIR)/launcher/controlpanel/%.o): Likewise. * launcher/java_md.c (GetIcedTeaWebJREPath): New method. (CreateExecutionEnvironment): Call GetIcedTeaWebJREPath. * plugin/icedteanp/IcedTeaNPPlugin.cc (plugin_start_appletviewer): Add PLUGIN_BOOTCLASSPATH to the command. (NP_Initialize): Use ICEDTEA_WEB_JRE to initialize filename.
Diffstat (limited to 'launcher')
-rw-r--r--launcher/java_md.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/launcher/java_md.c b/launcher/java_md.c
index 2e0e96b..b44114d 100644
--- a/launcher/java_md.c
+++ b/launcher/java_md.c
@@ -158,6 +158,7 @@ static char * GetExecname();
static jboolean GetJVMPath(const char *jrepath, const char *jvmtype,
char *jvmpath, jint jvmpathsize, char * arch);
static jboolean GetJREPath(char *path, jint pathsize, char * arch, jboolean speculative);
+static jboolean GetIcedTeaWebJREPath(char *path, jint pathsize, char * arch, jboolean speculative);
const char *
GetArch()
@@ -280,7 +281,7 @@ CreateExecutionEnvironment(int *_argcp,
jvmpath does not exist */
if (wanted == running) {
/* Find out where the JRE is that we will be using. */
- if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) {
+ if (!GetIcedTeaWebJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) {
fprintf(stderr, "Error: could not find Java 2 Runtime Environment.\n");
exit(2);
}
@@ -606,6 +607,33 @@ GetJVMPath(const char *jrepath, const char *jvmtype,
}
/*
+ * Find path to the JRE based on the the compile flag ICEDTEA_WEB_JRE
+ */
+static jboolean
+GetIcedTeaWebJREPath(char* path, jint pathsize, char* arch, jboolean speculative)
+{
+ char libjava[MAXPATHLEN];
+ snprintf(libjava, MAXPATHLEN, ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL, arch);
+
+ if (_launcher_debug) {
+ printf(ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL "\n", arch);
+ printf("libjava is %s\n", libjava);
+ }
+
+ if (access(libjava, F_OK) == 0) {
+ strncpy(path, ICEDTEA_WEB_JRE, pathsize);
+ goto found;
+ }
+
+ return JNI_FALSE;
+
+ found:
+ if (_launcher_debug)
+ printf("JRE path is %s\n", path);
+ return JNI_TRUE;
+}
+
+/*
* Find path to JRE based on .exe's location or registry settings.
*/
static jboolean