Reprint: Http://hxraid.iteye.com/blog/483115?page=3#commentsWe often read some resource files in the code (compared to slices, music, text, etc.). These simple processes are of course not problematic when running alone. However, if we make the code into a jar package, even if the resource files are packaged together, these things will not be found. Take a look at the following code://Source code 1: PackageEdu.hxraid;ImportJava.io.*; Public classResour
Original: Android Project Combat (33): As under get get dependent on the three-party jar file, AAR to jarUsing the Android Studio development project, there are several ways to reference the three-party code: Jar package, class library, Gradle.build compile dependency.You'll find that many of the projects on GitHub offer only compile dependencies, but what happen
Although there are now a variety of intelligent IDE can generate for us jar package, war package, ear package, even with automatic replacement, deployment features. But there will be times when you need to modify or replace a jar package, a war package, a file in the ear package instead of a whole rebuild. For example, you have an ear pack that has been deployed
Reprint: Http://hxraid.iteye.com/blog/483115?page=3#commentsWe often read some resource files in the code (compared to slices, music, text, etc.). These simple processes are of course not problematic when running alone. However, if we make the code into a jar package, even if the resource files are packaged together, these things will not be found. Take a look at the following code://Source Code 1:Package Edu.hxraid; import java.io.*;class Resource {
See also: http://www.cnblogs.com/lanxuezaipiao/p/3291641.htmlFat Jar Eclipse Plug-in is a gadget that can package all the resources of Eclipse Java project into an executable jar file, so that you can easily complete a variety of packaging tasks, and we often come to the jar package, But Eclipse's own packaged
Summary
This article shows you how to make a jar that is not available to run and not manipulate the manifest file directly. You will learn to develop a short program so that any jar file can be run using the Java-jar command or by double-clicking on Windows like.
You can
The reason to export the runnable JAR. is because we want to export the referenced jar package with this project, so do not select the Jar fileChoose File/export ... Then java/runnable the jar file and select the class with main (
We often read some resource files in the code (compared to slices, music, text, etc.). These simple processes are of course not problematic when running alone. However, if we make the code into a jar package, even if the resource files are packaged together, these things will not be found. Take a look at the following code://Source code 1: PackageEdu.hxraid;ImportJava.io.*; Public classResource { Public voidGetResource ()throwsioexception{
Use the Eclipse plug-in fat jar
1. download and install the plug-in fat jar
:Http://fjep.sourceforge.net/
If you install the Eclipse plug-in, I believe everyone is familiar with it.
If the installation is successful, you can see the fat jar preferences option in window-preferences in the eclipse option bar.
2. Right-click-export-other-fat
1. Use jar to packageCode
Jar-cvfm my. Jar myframe. config myframe
Explanation: My. jar is the JAR file to be generated in the current directory. Its name can be obtained by itself, but its suffix must be
One way to do this is to set the classpath in the Mainfest file in the jar file you want to execute. It's easy to write the wrong name. Add the. jar file in the delete Lib folder at any time because you need to modify the Mainfest file
1, we need to increase the configuration file jar needs, select the project's src directory, right mouse button, select [New]-select [Folder].2. Enter Meta-inf as the directory name and click [Finish].3, select the directory you just created, right mouse button, select [New], select [File].4, input MANIFEST. MF, select [Finish].5, edit the
1. Import into Eclipse, modify and then export the jar2.jar CF File.jar *.class package all class files in the current directory into a new jar file3. For patches. There have been jars for example: a bug was found. Then, to modify one of the classes, you need to package it in a second, for this case, just put the corresponding class in the specified directory for example: File.jar has a class demo fix bug n
The reason to export the runnable jar is because we want to export the referenced jar package with this project, so do not select the Jar fileChoose File/export ... Then java/runnable the jar file and select the class with main ()
First, preparatory work
Tools: Jd-gui anti-compiler toolDownload Address: https://github.com/java-decompiler/jd-gui/releasesHere I use the Mac, so directly download the latest version of Jd-gui-osx-1.4.0.tar as a demo, window system can download Jd-gui-windows-1.4.0.zip Two, operation steps
1, will download the finished tar file double-click Decompression Open, and then double-click Jd-gui.app Open Software, the interface is as follows
2, click on th
Use aspectjweaver to report "agent library failed to init: instrument" "Error opening zip file or JAR manifest m, aspectjweaver. jar"
This is just a small experience. I do not know why. When I added the Kieker monitoring feature in Ant build. xml today, I encountered this problem several times, and it was inexplicable:
Generally, an error is similar to this:
Erro
This script was found on GitHub stub.sh :#!/bin/shMyself= ' which"$" 2>/dev/null ' [$?-GT 0 -A - F "$"] myself="./$"Java=javaifTest-n"$JAVA _home"; ThenJava="$JAVA _home/bin/java"fiexec "$java" $java _args-jar$MYSELF "[email protected]"Exit 1For example, if you have a java -jar jar package that you can execute app.jar , just execute:cat stub.sh app.jar > app.ru
in the development process, we often encounter the situation of reading the configuration file, for the configuration file read, depending on the environment and so on, and so on, in general, if the use of relative/path from a non-jar package, relatively simple, it is not a statement, and in manycase, we need to pack our class into a
Java javacsv. jar application for csv file operations, csvjavacsv. jar
Csv files are separated files. If you use java I/O streams for writing, it is troublesome. Here we provide you with a jar package of javacsv, which is very convenient for you to operate csv files.
: Https://pan.baidu.com/s/1i46ErFB
So how to use it?
Now almost all development projects are used by MAVEN projects, but sometimes you can use the diff gate or the new jar may not be able to search the Web in the Pom file configuration should be how to write, so write down this blog.For example, I now want to join the Aaa.jar this package open cmd, enter the command inside MVN install:install-file-dfile= want to ad
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.