I’m trying to start firefox form a Java program, so far i know how to do that with option as well. But i’m interested in send a specific argument so a javascript add-on could obtain it.
For example, i use the command Runtime.getRuntime().exec(“/usr/bin/firefox”) to start firefox, my goal is to use something like Runtime.getRuntime().exec(“/usr/bin/firefox 12345”), where 12345 is my argument and obtain it via a simple add-on.
Is this possible at all? is there another method/way to pass an argument to an add-on on firefox start?
Thanks in advance.
In first thank you all for your answers, all of you help me to get this work done. After some more research and thinking of some security issues, i end up using the Java process builder adding an environment variable with the value i want:
So with this i can run an application and have environment variables on it’s context, now i just want to access them in my JavaScript add-on, simply with this:
where X will have the value in the environment variable VAR (previous defined in the Java code);