I have a web based app that I need to launch from time to time using Java. The app only runs in a browser window so I need to get that running. I used OS X for my development and it runs fine on my laptop running the server on localhost. But when I deploy (in an oc4j container in a Solaris environment), the browser launch always fails. I think it is a DISPLAY issue but my UNIX is so rusty that I'm not confident about that. Here is the command I'm using to launch the browser in Java:
current error message looks like this:
Thanks for any help you can offer!
I don't think java's exec() is a shell; it interprets "DISPLAY=:5" as a file name then fails to find it. You can instead give the environment variable to the new process as the second parameter to exec(), it expects an array of strings, see here for details.
You might want to give it a PATH value too at the very least, since it inherits nothing from the Java process when you specify it that way. In fact you should do that anyway, there's no telling what bizzare PATH settings a java virtual machine has.
Hmm... For some reason the above command stopped working. To be honest, even when it did work, the spawned process did not update the files I wanted it to properly. So I went back to trying it as a straight process instead of running it in a frame buffer. But it is again complaining that it can't open the display. Since it's headless, how do I set the environment variable? I thought I was setting it to the frame buffer running on display 5. But now that isn't working. So I guess I have two questions.
1. Is it possible to get this to work without a frame buffer?
2. If not, how can I check to see if the frame buffer is running? (because it seems to not be working anymore)
Ok, I'm convinced that this is some sort of configuration problem. I can get the browser to launch when written as a simple java program compiled at the command line:
The output is just to show the environment variables and it looks like this:
I decided to output the env vars in hopes that it would show what needs to be reset. But if I use the *exact* same code in my deployment, it fails and I get the following env settings:
Does anyone know how I can get the deployed version (running in the server container) to work exactly in the same way as the version run from a simple command line?
How do I install a LAMP server on a new installation of Debian 9 using the lalest versions of
AMP?
Here is what I have.
Corrections please.
MYSQL
apt-get install mysql-server mysql-client
You can verify the MySQL server status using command:
systemctl status mysql
-------
PHP7... (0 Replies)
Hello All,
Wasn't sure if I was supposed to post this under Hardware so posting here...
Device: CuBox-i
OS: OpenSuSE 13.1
Uname: Linux CuBox-PC 3.14.14-cubox-i #1 SMP Sat Sep 13 03:48:24 UTC 2014 armv7l armv7l armv7l GNU/Linux
Window Manager: XFCE
Display Manager: lightdm (*XDM?)
I... (2 Replies)
Hello,
I pretend create a machine headless for only run scripts! I think use Ubuntu Server, but this is the best option? Exist another system more light? Because the purpose is run script which do mathematical calculations. Sum, Division and Modules!
My knowledge about word gnu/linux is on... (0 Replies)
I want to install executable file(Demo.bin) on vMA4.0 virtual machine using ssh. Same can be installed on all other Linux/Unix box. but when I am trying to run it on vMA,I am getting the following error--
Could you please advise me how to approch this problem and how to resolve it? (4 Replies)
Hi ,
I am working on AIx server which is connected to another network which is a stock market via leased line ,
From my side I connect to the server locally but what i need is to know the ip whic the server connect to the stock market how I can Know this ????
Thanks (1 Reply)
Guys,
I want to run a script located on a different server from my pc.
Let say the server has an IP of 1.1.10.2/16 and the script path is:
/home/user/bin/check.sh
The script scans for all available devices on the lan.
My pc has an IP of 1.1.15.4/16 and I can ping the sever and can... (3 Replies)