java runtime.exec() not working on tomcat after deployment - command

How to run cmd commands through java? I already tried Runtime.exec() command. It is working local system but it'll not working after Deployment into tomcat server.

Related

Deploy jhipster on server with CentOS 7

I'm trying to deploy my jhipster application on a server.
The server is an basic CentOS 7 distribution.
What should I install before deploying the war?
Apache, Tomcat, mySQL, anything else?
I'm not able to find a complete doc where to find how to set up a server from zero.
Jhipster offers easy docker integration, so just use ist, and install docker on your server.
For docker documentation: https://docs.docker.com/
If not:
For the war file you only need a javaRuntime and run it with java -jar your.jar
mysql only when you need it

Torquebox Jruby Rails Deploy

I have created a Jruby rails application. I am able to deploy the application in windows server by using torquebox deploy and able to run the application using torquebox run. But when I close my command prompt(terminal) my Torquebox server is stopping. How I can able to run the server even after closing the terminal?
Run it as a windows service. In windows a service can be created to run a program in the background, in a similar way to running a daemon in unix.

Remote Tomcat 7 debug issues in Eclipse

I'm able to create a simple Web project in Eclipse that has a simple single HelloWorld servlet. I'm able to debug this fine with the local Tomcat (setting breakpoints in the index.jsp or in the servlet), which land when I try the sample URL:
http://localhost:8080/RemoteDebugTest/HelloWorld
However, when I try to use the Eclipse debug configuration for a remote java application, I am able to connect and see the server threads, but my application does not deploy, and the URL appears as if the web module never deployed. (There are 404 errors for the same URL above.) Help me StackOverflow, you're my only hope.
Things I have tried:
Set environment variables such as JPDA_ADDRESS to 8000, JPDA_TRANSPORT to dt_socket.
Set those in the catalina.sh (on a remote linux Tomcat7 server) or catalina.bat
Run the catalina startup script with jpda run, or with jpda start
I've extensively scoured online resources and noone else seems to have this problem, other than one article that simply recommended Jetty. (I came from a background of never having a problem with this using WAS.)
Other pieces of info:
OS: Windows 7 (64-bit)
Tomcat 7.0.0.28
MyEclipse 10 (based on Eclipse 3.7.2)

How can i run java command as a service Centos 5?

i want to execute java -cp server.jar:mysql.jar server.NithServer this command as linux service how can i do that. & not working. centos 5
What's about using Java Service Wrapper?
It provides cross platform way of running java applications as services and also have a community version that should be enough for your purposes.
A seriously written service must have the bash script that accepts start, stop and restart parameters. Such script can be copied or better linked (original at /etc/init.d) to /etc/rc3.d or /etc/rc5.d and will be maintained by the system, executing shutdown and startup when required. Here there is a tutorial how to wrap Apache Tomcat as a service.

Is the same to leave netbeans running on vps or should I run only glassfish?

I have managed to get my app, up & running in my vps an over the internet, but I have done using this from netbeans, is it the same or I should close netbeans, run glassfish from bin files, deploy and start from admin console and have only glassfish running?
Enviroment: glassfish v3, JSF2.0, netbeans 6.8
Thank you very much
Best regards
Ignacio
The 'standard' way would be to have Glassfish running as a standalone app.
You can still use netbeans to administer it from your machine (by setting up a remote domain GF server in 'services->servers') or you can use the admin console (http://yourhost:4848) or indeed use the asadmin CLI tool.