1. This evening, a program was written that, based on a small spring boot site, found that using FileUtils.class.getResource (path) to get the resource files in the jar package was not successful and its path was strangefile:/users/lonecloud/documents/ideacode/git/export/target/export-0.0.1-snapshot.jar!/boot-inf/classes!/temp/ Temp.xlsAfter reviewing the data, and viewing the resource files in the jar pack
Sometimes the development of some gadgets, need to read the configuration file, but the finished jar package will often appear to find no path problem, There are two ways of thinking:
Place the file in the same directory as the jar package, such as the Config/config.properties
Sometimes, we want to provide our Android project to third-party developers. At this time, the most common practice is to provide a jar package and a bunch of resource files. Third-party developers can copy the resource files to the corresponding directory of the Android project, reference the jar package we provide at the same time, you can use the corresponding API we provide.It should be noted that, when
eclipse+android Packaging jar FilesCai Jianliang 2016-3-12Take the Android-slideexpandablelistview open source framework as an example to package the source library into jar files and include R.class.Development environment:1) Eclipse IDE for Java developers Version:mars.2 Release (4.5.2)2) Android plugin: ADT-23.0.4Import the source code:Set the project as library:To export the project as a
When developing a Web application, the class is sometimes updated but not in effect because the class with the same name (including the full path is the same) under the other advertised packages in Jboss/tomcat.And then it started to do a program to check whether the specified folder has repeated classes (through ASM from the class file to take the full path of the Class), and also support the search for repeated files (by
By my machine path,First, the D:/Signature directory is the root directory of the operation.D: The/Signature/src directory is a previously signed JAR file. Now we will use the new key forandever. Key to re-sign these jar files.D:/Signature/Dist directory is used to save the signed JAR
First, the compiled Java in the class file packaging;Eclipse or myeclipse the export selection jar. or use the commandFor example, all the class folders under a directory are packaged and processed;Command used: Jar CVF test.jar-c com/.Where Test.jar is the jar package to be generated; com/. To the specified folder in
For some reason
You need to modify the information in the other person's jar bag.
Configuration file *.properties MANIFEST. MF These things can be opened directly with Notepad to modify and then replace it OK.
Wandering the internet for a long time, did not find the right way
I started by using Jd-gui to decompile the A.class file I needed to modify to save the
The path of the configuration file cannot be obtained after the jar package is created for the project.
Today, I am working on a Java project in development. I want to read the information in the configuration file. when the project is packaged with a jar package, the configuration
The error is as follows:Org.hibernate.hql.ast.QuerySyntaxException:Content is not mapped [select New Content (T.id,t.name,t.values, T.systemtype,t.type,t.sortnumber) from Content t where 1=1 and T.type =? and T.systemtype =? ORDER BY T.sortnumber Desc]At Org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister (sessionfactoryhelper.java:158)At Org.hibernate.hql.ast.tree.FromElementFactory.addFromElement (fromelementfactory.java:87)At Org.hibernate.hql.ast.tree.FromClause.addFromElem
value to the file name we want. This file name should be visible to ClassLoader, that is, under Classpath.Third-party PackagesPass the test. A simple task requires only the following packages: Commons-beanutils.jar, Commons-collections.jar, Commons-logging.jar, Commons-digester.jar, Quartz.jar can
Name
Must/Remarks
Url
Activation.jar
The main JavaMail to use
This problem can be solved in many ways, but the simplest is to use the Export (Explorer) function of Eclipse. The following describes how to generate executable jar.
File ---> export... ----> JAVA ---> JAR file -----> next
In the displayed dialog box, select the project to be exported and select the directory to be
When you double-click the packaged JAR file to run it, the following error occurs: failed to load main-class manifest attribute from..., which is caused by the portal program that has not been set to run.
Right-click your jar file, select Open Method -- WinRAR -- open the META-INF folder, double-click the manifest. af
In general, when using the properties configuration file in the project, the relevant properties files are placed in the SRC directory, after the app is packaged to generate the jar, the corresponding properties configuration file is born ...
Typically, when using the properties profile in a project, the associated properties
The usual way to run a jar file on a Linux server is to: $ Java-jar Test.jar
The feature is that when the SSH window is closed, the program aborts. or the runtime can't cut out to perform other tasks, is there a way to get the jar running in the background:
Method One:
$ nohup Java-
In actual projects, the original large projects need to be split into small functions based on business functions, and deployed independently in the form of services. On this premise, the same code is also used to apply various projects, for convenience. It is introduced as a jar package and used as another project. In an independent JAR package, we set an independent data source
resulting jar file is in the: D:\programmer\eclipse\feedback-service\target folderJava-jar run the jar package toJava-jar using an external configuration file when running the jar pack
resulting jar file is in the: D:\programmer\eclipse\feedback-service\target folderJava-jar run the jar package toJava-jar using an external configuration file when running the jar pack
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.