Jar which
This is a good alternative way to do it! My jar was created using "spring-boot:repackage", so I just can't run other entrance classes by the "-cp" way. I don't know what the spring-boot plugin did to the jar. In this case, a dispatching class helps. This answer is for Spring-boot users: If your JAR was from a Spring-boot project and created using the command mvn package spring-boot:repackage , the above "-cp" method won't work.
You will get: Error: Could not find or load main class your. In this case, run your alternative class by the following command: java -cp yours. PropertiesLauncher As I understood, the Spring-boot's org. Zhou Zhou 3 3 silver badges 12 12 bronze badges. What if your jar is executable. Edit: It seems as if java -jar requires a main class to be specified. Thomas Thomas I did as mentioned here: download.
From that page: "It can be used while creating or updating a jar file. MyJar 1. MF Manifest-Version: 1. Then just run it with java -jar MyJar2. JSub JSub 7 7 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Explaining the semiconductor shortage, and how it might end.
Does ES6 make JavaScript frameworks obsolete? Featured on Meta. Further details on other additions and bug fixes can be found in the release notes file accompanying the release.
Packaging Change users of 1. You will find you will need to add the bcutil jar to the class path if you are using the other BC APIs. Java Version Details With the arrival of Java The jdk15on jars are compiled to work with anything from Java 1. They are also multi-release jars so do support some features that were introduced in Java 9, Java 11, and Java If you have issues with mulit-release jars see the jdk15to18 release jars below.
Change Warning users of 1. See releasenotes for 1. Please also see the porting guide for advice on porting to this release from much earlier ones release 1. Please also note the JCE certificate in the public access versions of Oracle Java 6 6u45 and Oracle Java 7 7u80 is expiring on the 20th April this year Use of the character to recursively interpret files is not supported.
The -J options are not supported because they are passed to the launcher, which does not support argument files. When executing jar, pass in the path and name of each argument file with the leading character.
When jar encounters an argument beginning with the character , it expands the contents of that file into the argument list. For example, you can use a single argument file named classes. If you already have separate subdirectories for images, audio files and classes, you can combine them into a single jar file:.
To add an index file to the jar file for speeding up class loading, use the -i option. Skip to Content.
0コメント