Changes to a java application server not showing after deployment - java

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?

Related

Call the "grunt serve" command from java project

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.

How can I package a Tomcat server into a standalone, double-clickable package?

I have a simple Tomcat Server set up in Eclipse on a Windows 7 machine. Eclipse by default uses metadata to deploy Tomcat server instances without having to take over the Tomcat installation folder (and allowing multiple parallel servers, provided they don't try to use the same ports). In order to start my server up, I have to open Eclipse, build my project, and start the server my project is assigned to in the Servers view.
I would like to start this same server up:
Without having to open Eclipse
With a single action, preferably double-clicking a file on my desktop.
With its own console window
I've looked into making Java programs into standalones, and the most common suggestion is to package it into a runnable .jar file. This uses a Launch configuration, which doesn't really work for my case because the server has no associated Launch configuration; to run it you start a Server rather than clicking run.
Is there a built-in way in Eclipse to make the server equivalent of a runnable .jar? That is, is there a built-in way in Eclipse to package a Tomcat server to run as a stand-alone?

Run a command before windows service starts

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

Have Jar copy to another Directory when Executed

I have a Jar file that when I'm executing I would essentially like it to copy to windows startup, and start on its own.
If this isn't a possibility I'd like to copy the JAR file to another directory and then modify the registry to have it start this file on startup.
I've tried using Files.Copy and using FileStreams without any success for the currently running file, is this going to require me placing the Executable Jar within a jar to essentially copy the file, and then execute it?
Thanks for any insight.
Based on your question. It seems like you want your program to run on startup.
If that is correct, then you could have your java class run as a windows service. Try using a java service wrapper like tanuki software.
Running java application as a windows service
How to create a windows service from java app

Executable jar file won't run on centOS

I want to execute a little java program I wrote on my server running centOS and having the jdk1.7.0_10 running.
When logging onto the server with PuTTy, i navigate into the folder containing my eclipse generated runnable jar file jbtct.jar and try to launch it using the Command java -jar jbtct.jar.
But instead of launching, my putty session would just get stuck with nothing happening and The log files my Program should create won't come up as well.
I have a tomcat with applications running on the same server working quite well, so I guess it's some kind of config error. But what kind?
Alright, I solved the Problem! Eclipse may generated the runnable jar, but the Manifest files weren't set up properly as I was using maven to manage my dependencies.
The Solution was to add some code to the plugin management as described here (Posted by mike)

Categories