executable-jar

java/shellscript code to find out if a jar file is already running on current machine

可紊 提交于 2019-11-30 15:16:38
How do I find out if a specific JAR file is running on my machine or not? I just want to ensure that a specific JAR is only executed once at any time-- so if another request to execute the same jar comes in then I should not again invoke that jar. I can use code for the above either as java code (which I will add to that JAR itself) or as shellscript (which I will use to invoke the jar file). The machine will be a Linux machine-- either CentOS, or Debian or Ubuntu or Amazon Linux. jps is a simple command-line tool that prints out the currently running JVMs and what they're running. You can

SpringBoot fully executable jar without dependencies inside

旧街凉风 提交于 2019-11-30 14:06:33
问题 NOTE: Please, before marking this question as a duplicate make sure you know the difference between executable JAR and fully executable SpringBoot JAR. The official Spring Boot documentation describes how to build fully executable JAR. Then generated JAR file can be linked from /etc/init.d/ and started/stopped/restarted/statused as a normal unix service without additional scripts or tools like JSVC. But the generated JAR contains all libraries and can be big enough in size (in my case 70Mb+).

How to make a executable file of java fx 2.0 project

女生的网名这么多〃 提交于 2019-11-30 11:23:03
问题 I want to make a executable file of my project which I made in Java fx 2.0. Can anyone help me on this? 回答1: The JavaFX team implemented support for this in the tools bundled with the JavaFX 2.2 SDK (included in Java7 from update 6). The JavaFX packaging toolset for packaging executables is documented in self-contained application section of the JavaFX deployment guide. See RT-19446 "Add ability to co-bundle Java + JavaFX + App into a single native executable" for more information (anybody

How do I package up an applet with multiple .jar libraries?

牧云@^-^@ 提交于 2019-11-30 09:03:10
I'm creating a Java applet from a large scale pre-existing project (Vizster). I am using NetBeans 6.7.1 with JDK 1.5 on Mac OS X. I am attempting to run the applet from it's single output .jar file, but when I do this, it says "applet loaded" at the bottom of screen in Firefox, and there is nothing in the java console, but nothing shows up in the window for the applet. I have had different errors in Firefox previous to this, including errors such as "appletNotLoaded:ClassDefNotFoundError" and also security errors, but there is never any output in my java console. Here is the html file for the

JAR hidden inside EXE?

青春壹個敷衍的年華 提交于 2019-11-30 08:13:47
问题 Minecraft, a Java game, is free this weekend. The Windows version downloads as an exe file. I was curious what the EXE file is doing and where it's unpacking and running the actual game JAR from. So using a command, I found the command-line arguments to the running javaw.exe process; and oddly enough, it was launched with a classpath pointing to the executable! (meaning, the .exe file was acting as a jar). Indeed, after renaming Minecraft.exe to Minecraft.jar, I was able to open it and see

Eclipse cannot create runnable jar - No resources selected

被刻印的时光 ゝ 提交于 2019-11-30 05:43:18
When I try to export my project as a runnable jar Eclise gives me the following error: No resources selected. The project runs fine within Eclipse, I already tried to clean the project before exporting, but that didn´t work. Any ideas on how to fix this. The problem is most likely with your run configuration. Go to your Class that contains the main(String[] args) method you wish to automatically run when the jar is called from the command line Right-click->Run As...->Application Make sure it runs to your satisfaction Now go through the export process as before, selecting the newly created

Modify Executing Jar file

a 夏天 提交于 2019-11-30 03:39:43
问题 Hello Stack Overflow friends. I have a simple problem which i fear doesnt have a simple solution and i need advice as to how to proceed. I am developing a java application packaged as and executable JAR but it requires to modify some of its JAR file contents during execution. At this stage i hit a problem because some OS lock the file preventing writes to it. It is essential that the user sees an updated version of the jar file by the time the application exits allthough i can be pretty

Packaging a Jython program in an executable jar

一世执手 提交于 2019-11-30 01:21:21
I am trying to package a jython program into an executable jar which the user can simply double-click to run without installing jython ahead of time. Ultimately, I would like to include an additional library which I wrote with the jar, but at the moment I am just trying to package a simple program and have it run from the jar. I have tried following the jar instructions in the "Using the Jar Method" section here: Jython FAQ: Using the Jar Method I have also looked at slides 25-28 here: Jython Update 2012 slides And finally here: stackoverflow Question: Distributing My Python Scripts as Jars

How to make a executable file of java fx 2.0 project

我怕爱的太早我们不能终老 提交于 2019-11-29 23:13:48
I want to make a executable file of my project which I made in Java fx 2.0. Can anyone help me on this? The JavaFX team implemented support for this in the tools bundled with the JavaFX 2.2 SDK (included in Java7 from update 6). The JavaFX packaging toolset for packaging executables is documented in self-contained application section of the JavaFX deployment guide. See RT-19446 "Add ability to co-bundle Java + JavaFX + App into a single native executable" for more information (anybody can sign up to view the jira). 3rd party tools such as the JavaFX maven plugin or the JavaFX gradle plugin ,

java/shellscript code to find out if a jar file is already running on current machine

随声附和 提交于 2019-11-29 21:32:59
问题 How do I find out if a specific JAR file is running on my machine or not? I just want to ensure that a specific JAR is only executed once at any time-- so if another request to execute the same jar comes in then I should not again invoke that jar. I can use code for the above either as java code (which I will add to that JAR itself) or as shellscript (which I will use to invoke the jar file). The machine will be a Linux machine-- either CentOS, or Debian or Ubuntu or Amazon Linux. 回答1: jps is