Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run a java program in backend

Hi all i want to run a java application as backend process.that is like tomcat server.For that i had developed one application.and made one class as main class and calling from one script file .i.e(startup.sh) file.in startup.sh file i was calling one class.that is MainMethodClass.In main method class i had written my business logic.when i am running this app in linux server from using putty is is working until putty window is not closed.As closed after putty window it is also stopped.but i need to run this app even i closed also.How can i achieve this.

like image 538
java tech Avatar asked Feb 17 '12 06:02

java tech


People also ask

Can you use Java for backend?

As the most popular programming language for over 20 years, Java has a whole host of backend frameworks, but their reliability and versatility vary widely.

Is it possible to run Java code using node JS?

Node. js is an event-driven JavaScript runtime platform that is built using the Chrome's V8 JavaScript engine. Node is mainly used for building large-scale applications. In this article, we will see how to run a Java code in Node.


1 Answers

You should be able to do something like:

nohup java -jar MyApplication.jar &
like image 149
mikera Avatar answered Oct 13 '22 16:10

mikera