I have a java project that preform some algorithm and in the end of that program I want it to initiate a web app. The web app is been written in nodejs and angularjs and I'm using Grunt as a task manager.
The only thing I would like is that the java program would execute the command "Grunt serve" from the web app project directory.
When using Runtime.getRuntime().exec command its simply doesn't do anything.
I also tried to write some shell script code which execute Grunt serve and to run it from the java code but it also didn't outcome nothing.
Thanks
You should make sure the grunt is installed in global, and other packages are installed too. Then you also need to set working dir as the root of angular app. If there is still some error, you can redirect the std out and std error to some place and check the log.
Related
I'm using a system which runs various Java programs from a cloud server. The programs use external command line tools. Our programs build up commands and send them to another java program, an application server, to further process and execute the command.
I'm working on something which involves editing the application server. I make changes, package it as a jar, deploy it to the server, and then run a script which executes the application server. The script uses the location of the jar file on the server as the path of the executable. However, none of my changes appear after running and deploying.
To make matters more confusing, even DELETING the jar on the server and stopping the process does not make any changes, i.e. running a request from one of the programs is still successful. Deleting this jar ought to break things, right?
I'm sure the jar path that the script is pointing to is correct. I guess my question is, is there anything further that needs to be done to edit an application server program running on a server?
I have a windows service running a java application. When I install this application on a share drive it takes ages to start. I decided i want to copy all the application jars and libs to a local path, and run it from there.
The problem is I can't find a clean way to do it. I understand i cannot run a batch script (to copy the files before starting the app) as a service. I don't want to create two services with dependancies on them and creating another java app just for copying the jars sounds and overkill for the problem.
Can you think if a nice way to do it? I thought maybe downloading a template of a generic windows service (I don't care what language, preferablly C\C++) and make it copy the jars\libs to local disk and then execute the regular service to run from there. If this is the write way, is there an equivilant of the exec linux system call in Windows? i don't want the startup executable to stay alive while the app is running.
Thanks in advance
I made a java program which runs unit test on my website.
I need the unit test to keep running during the day while I watch the log.
For this, I search a java platform on which I can run my soft. Openshift will be the best because it's easy to install and maintain.
However I will often modify this soft and if the java project could be built whenever I made a commit it will be the best. That's why I think to Jenkins, but I don't know if it is a good way to run a jar from a jenkins server whereas it is made to do build.
I tried JBoss and tomcat by wrapping my programs into an Enterprise Application Client but I can not run and check the log of the program from a web interface.
Currently my project is a Java Application, using MySQL, hibernate, maven and git.
What would be the best option for you ?
Thanks.
Florian C.
Finally, here is my soluce.
I use Jenkins.
When I push on Jenkins, my project is automatically built and ran using a shell script.
If the build or the run fails Jenkins sends me the command output by mail.
Else, every day, the project is run (using the cron of jenkins) and the console output is sent to me by mail, so I can check the result of my test.
Question
Is there a plugin (or built-in feature) for Eclipse that will allow you to build and upload a compiled program (C++ .so or Java .jar) via SSH in one click or command without running? I know you can use Apache Ant for this, but I am looking for an Eclipse built-in solution, so I can still use Eclipse's auto build features.
Context
I am building an application for an embedded ARM computer connected via SSH. My test cycle is currently to build (cross-compilation), upload, and run in three separate steps. I would like to consolidate this into two steps, build and upload, then run.
My binaries are a .so library (which cannot be run, therefore C++ Remote Application does not work) and a .jar, which Eclipse will not handle the upload by default.
You could write a shell script with build and upload command lines, then create a build target that invokes the script. You would still need to manually invoke the build (doubleclick the build target, Build All or something); I am not sure if that fits your goal of "auto build".
Am trying to execute a complete Jython project using java eclipse 3.4.. I have configured Jython environment in my eclipse..I went through certain tutorials which described about Building a factory.. But i guess that method can be used to execute applications that are specific to a particular Jython module.. What I exactly need is::
To run the entire Jython project as a java application, by using the .class file created in the Jython project..
Not sure if this is feasible.. Suggestions please..
One Java class with an embedded PythonInterpreter is capable of kicking off an entire Jython application. May need to play around with setting the appropriate python.home and library paths, look in the PyServletInitializer and PyFilter for examples of how this is done.
Another option is use PyDev and just run a Jython script to start the application, bypassing the need for a Java application all together.