diff options
author | Jiri Vanek <[email protected]> | 2013-04-17 09:45:53 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2013-04-17 09:45:53 +0200 |
commit | 8b462c07f200a80028ffc59027a291837fcf2f1b (patch) | |
tree | 7b214b620be5267029fd54a0272a2d49705d89fe | |
parent | 792944d591f4973d2e493e1df7ab83ce5a9c5d25 (diff) |
removed java call to obtain jvm args for plugin
* /plugin/icedteanp/IcedTeaNPPlugin.cc: (get_jvm_args)
Java call replaced by call to recently added read_deploy_property_value
function.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | plugin/icedteanp/IcedTeaNPPlugin.cc | 42 |
2 files changed, 12 insertions, 37 deletions
@@ -1,3 +1,10 @@ +2013-04-17 Jiri Vanek <[email protected]> + + removed java call to obtain jvm args for plugin + * /plugin/icedteanp/IcedTeaNPPlugin.cc: (get_jvm_args) + Java call replaced by call to recently added read_deploy_property_value + function. + 2013-04-12 Adam Domurad <[email protected]> * netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExtendedAppletSecurityHelp.java: diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc b/plugin/icedteanp/IcedTeaNPPlugin.cc index 1484982..0c39670 100644 --- a/plugin/icedteanp/IcedTeaNPPlugin.cc +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc @@ -1472,45 +1472,13 @@ plugin_start_appletviewer (ITNPPluginData* data) std::vector<std::string*>* get_jvm_args() { - std::vector < std::string> commands; - gchar *output = NULL; + std::string output; std::vector<std::string*>* tokenOutput = NULL; - - commands.push_back(get_plugin_executable()); - commands.push_back(PLUGIN_BOOTCLASSPATH); - commands.push_back("-classpath"); - commands.push_back(get_plugin_rt_jar()); - commands.push_back("net.sourceforge.jnlp.controlpanel.CommandLine"); - commands.push_back("get"); - commands.push_back("deployment.plugin.jvm.arguments"); - - std::vector<gchar*> vector_gchar = IcedTeaPluginUtilities::vectorStringToVectorGchar(&commands); - gchar **command_line_args = &vector_gchar[0]; - - if (!g_spawn_sync(NULL, command_line_args, NULL, - (GSpawnFlags) G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, &output, NULL, NULL, - &channel_error)) - { - PLUGIN_ERROR("Failed to get JVM arguments set for plugin."); - output = NULL; - return NULL; + bool args_defined = read_deploy_property_value("deployment.plugin.jvm.arguments", output); + if (!args_defined){ + return new std::vector<std::string*>(); } - - tokenOutput = IcedTeaPluginUtilities::strSplit(output, " \n"); - - //If deployment.plugin.jvm.arguments is undefined, the output will simply be 'null' - //We remove this so it's not mistakenly used as a jvm argument. - if (!tokenOutput->empty() && *tokenOutput->at(0) =="null") - { - delete tokenOutput->at(0); - tokenOutput->erase(tokenOutput->begin()); - } - - //Free memory - g_free(output); - output = NULL; - command_line_args = NULL; - + tokenOutput = IcedTeaPluginUtilities::strSplit(output.c_str(), " \n"); return tokenOutput; } |