Home Operation and Maintenance Linux Operation and Maintenance How to run jar package in linux system?

How to run jar package in linux system?

Jun 15, 2020 pm 05:37 PM
jar package

How to run jar package in linux system?

When we need to run a Java program developed on Windows on Linux, we need to package the Java program into a jar package and upload it to Linux.

The following are several ways to start jar packages in the background under Linux:

Method 1:

java -jar xxx.jar &
Copy after login

& means running in the background, the ssh window is not locked, but when the window is closed , the program will still exit.

Method 2:

nohup java -jar xxx.jar &
Copy after login

nohup means running the command line without hanging up. When the account exits or closes the terminal, the program will still run.

When a job is executed with the nohup command, all output of the job is redirected to the nohup.out file, unless an output file is otherwise specified.

Method 3:

nohup java -jar xxx.jar >/usr/local/temp.txt &
Copy after login

> /usr/local/temp.txt means recording all startup log information into the temp.txt file.

Recommended tutorial: linux tutorial

The above is the detailed content of How to run jar package in linux system?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to import jar package in eclipse How to import jar package in eclipse Jan 12, 2024 pm 03:45 PM

How to import jar packages in eclipse: 1. Create a new Java project; 2. Create a library folder; 3. Copy the jar package to the library folder; 4. Configure the project build path; 5. Add the jar package to the build path. ; 6. Configure the project build path; 7. Verify the import results; 8. Precautions; 9. Other import methods; 10. Clean and update; 11. Maintain and update the library. Detailed introduction: 1. Create a new Java project, start Eclipse IDE, select the "File" menu in the top menu bar, etc.

How to import jar package in maven How to import jar package in maven Jan 08, 2024 pm 01:59 PM

The steps for maven to import a jar package: 1. Download the jar package; 2. Create a Maven project; 3. Add dependencies; 4. Add dependency elements; 5. Save the pom.xml file; 6. Build the project; 7. Verify the import. Detailed introduction: 1. Download the jar package. First download the required jar package from the relevant website or source code warehouse. Make sure that the downloaded jar package is compatible with your project and meets the required version requirements; 2. Create a Maven project. If There is no Maven project yet, you need to create one first and so on.

Maven Advanced Tutorial: In-depth exploration of various methods of Jar package import Maven Advanced Tutorial: In-depth exploration of various methods of Jar package import Feb 23, 2024 pm 02:57 PM

Title: Maven Advanced Tutorial: In-depth exploration of various methods of Jar package import. As a Java project management tool, Maven is widely used in project construction, dependency management, etc. In the actual development process, we often use Jar packages of various third-party libraries, and how to effectively import Jar packages has become a skill that must be mastered. This article will delve into the methods of importing Jar packages in Maven, including using local Jar packages, remote warehouse Jar packages, and custom Jar packages, and give specific details.

MySQL Jar package usage guide and precautions MySQL Jar package usage guide and precautions Mar 01, 2024 pm 04:21 PM

MySQL Jar package usage guide and precautions MySQL is a commonly used relational database management system. Many Java projects use MySQL as the backend for data storage. In a Java project, to interact with the MySQL database, you need to use the Java driver (i.e. Jar package) provided by MySQL. This article will introduce the usage guidelines and precautions for the MySQL Jar package, and provide specific code examples to help readers better use the MySQL driver. 1. M

Guide on how to correctly import Jar packages into Maven projects Guide on how to correctly import Jar packages into Maven projects Feb 19, 2024 pm 12:00 PM

Maven Getting Started Guide: How to correctly import Jar packages? Maven is a powerful project management tool that can help developers manage project dependencies, build projects, etc. During project development, we often need to import external Jar packages to implement some functions. This article will introduce how to use Maven to correctly import Jar packages and provide specific code examples. First, we need to add dependencies on the required Jar packages in Maven's pom.xml file. In pom.xml, there is a

What is the Jar package of MySQL? Detailed analysis What is the Jar package of MySQL? Detailed analysis Mar 01, 2024 pm 06:33 PM

The Jar package of MySQL refers to the Java driver package used to connect and operate the MySQL database. In Java development, the interaction function with the MySQL database needs to be implemented through the Jar package. MySQL's Jar package provides a series of classes and methods that allow developers to easily connect to the MySQL database, execute SQL statements, obtain query results, and other operations. Under normal circumstances, developers can download the MySQL Jar package through the official website or Maven repository and other channels, and then

Example analysis of remote code execution caused by uploading any jar package in apache flink Example analysis of remote code execution caused by uploading any jar package in apache flink May 15, 2023 pm 01:01 PM

Vulnerability description: On November 11, 2019, security engineer Henry Chen disclosed a vulnerability that allows Apache Flink to upload jar packages without authorization, leading to remote code execution. Since Apache Flink Dashboard can be accessed without authentication by default, a shell can be obtained by uploading a malicious jar package and triggering the execution of malicious code. Scope of influence Export (export) b. Then select java-->RunnableJARfilec. Then select the corresponding java project, export path and export file name image. This will generate a rebound shell jar package msf to generate jar horse: (1) Use msfvenom afterlife

Understand the MySQL Jar package and its functions Understand the MySQL Jar package and its functions Mar 01, 2024 pm 04:30 PM

To understand the MySQL Jar package and its functions, you need specific code examples. MySQL is a popular relational database management system used to store and manage data. To interact with a MySQL database, we usually need to use the MySQL Java Database Connectivity (JDBC) driver, also known as the MySQL Jar package. The MySQL Jar package provides the classes and methods required to connect and operate with the MySQL database. MySQL's Jar package usually ends with mysql-conn

See all articles