classnotfound error? Then this post can help you get rid of trouble:)When using Java-jar Yourjarexe.jar to run a packaged application, you will find out how to set the-classpath parameter application to find the corresponding third-party class, reporting classnotfound errors. This is actually due to the fact that when running with the-jar parameter, the
This article contributed by wo940080073
1. Export the JAR file:
If your program development is nearing completion and you are preparing to generate a desktop executable file but do not know how to operate it, follow these steps: select your project --- Right-click the pop-up Option List --- Select export --- Java --- JAR
Recently started to touch Java and realized that a build tool that seems to work better than Maven is gradle, but you need to build an executable jar package. Check the Internet. The Chinese article is a stereotyped reference to a plugin apply plugin: ' Executable-jar ' (h
function: To talk about how to build a Java Project executable jar package through eclipse, and how to make the jar package into ext file through exe4j;
= "Java Project
1. Java Project build
) builder.build (new file (path));
Element root = Doc.getrootelement (); list6. Play jar package: To make an executable jar package, a lower version of Eclipse may not have this feature.
On the project right-click--export, select runnable jar file instead of jar file, as
directory structure is as follows: Which Test.java source code is as followsPackage Test;public class Test {public static void main (string[] args) {System.out.println ("No Other jar files.");}}the generated jar package name is Testrun.jar. The results of the operation in the CMD window are as follows:With WinRAR lay Testrun.jar, wherein meta-inf/manifest. The MF file reads as follows:Manifest-version:1.0m
Make sure that its Java code is not a problem, which is often done in idea, and then. Follow these steps:Step one: Open File , Project Structure , artifacts, for example, Step Two: Click "+", select "Jar", select Empty or from modules with DependenciesStep three: Set a main function entry main classAfter the above three steps, click Finish.Step four: Come back to the idea main interface. Click Buil
There is no problem in keeping your Java code, and in idea It is OK to run, then, follow the steps below:Step one: Open File , Project Structure , artifacts, asStep Two: Click "+", select "Jar", select Empty or from modules with DependenciesStep three: Set a main function entry main classAfter completing the three steps above, click Finish.Step four: Come back to the idea main interface, click Buil
Creating an executable jarWe can also create an executable jar file that runs in a production environment through a plugin to complete our example.First, the dependency is introduced:Open the cmd command in the project directory and use the MVN Package command as follows: If you want to view the packaged
The tutorial for generating executable jar files-Linux general technology-Linux programming and kernel information. The following is a detailed description. To generate an executable jar file named cal. jar: (the file name can be any legal name)
(I think this is a simple and
In eclipse, an error occurred while using proguard to generate the create obfuscated package:
Cocould not find Jar tool executable. The jar tool requires a full JDK installation. Specify a full JDK installation int the preferences.
Reason cocould not find Jar tool
number" function.The first 4 lines are the valid contents of our configuration, the 5th line is the blank line that our file needs, the 6th line is currently ready to write the character line, at this time we save the file, then our file content is containing the first four lines of characters, plus a blank line, that is, we have a total of 5 lines of files.2) for Main-class, when the package name is not defined in our class, it is only necessary to write the main class name. (Only the default
Technical point: Spring loads the XSD process:http://blog.csdn.net/bluishglc/article/details/7596118Background of the crime:1. A common project using MAVEN management (vcenter-collector: About vcenter Data acquisition)2, the main technology of the project: Java + MyBatis (based on interface form) + other3, the project has a non-MAVEN warehouse jar package: Vijava (for vcenter Data acquisition), in the proje
The jar packages generated by the MVN clean package are not executable by default because the information with the main method is not added to the manifest. When you run the package using Java-jar, the error is as follows:No main manifest attribute, in Original-helloworld-1.0-snapshot.jarIn order to generate the
There was a problem when working with Intellijidea 16 to package a Java program into an executable jar package.Error:invalid or corrupt jarfile project.jar problem, unable to run JAR packageWorkaround:My final requirement is to make the program and external dependencies into a runnable
The executable jar package was used when writing the shell script, and the jar package exported from Eclipse needed to export both the jar file and the Library folder, as follows:(1) Click the Java that the main method resides in, run Ja
Specific steps:
Export ... java-Runnable JAR file
Launch configuration: Select the File/class where the Main method resides
Export Destination: Select or fill in the name of the jar package, such as: D:\a.jar
Library Handling: Choose one (three different types of differences please read the following article)
Click the "Finish" button to
, join the dependency and scope to be set to system
Java code
After the above setup is complete, run the MVN Package command to execute successfully. But the package that is called out does not contain the Lib directory and Fbcds.jar the referenced package, that is, the package is not an executable jar. So personal development words can be used in this way if t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.