Questions tagged [meta-inf]

The META-INF directory related to .jar file contain the manifest (list of contents) of a jar and is created when you write a jar file.

125 questions
358
votes
13 answers

What's the purpose of META-INF?

In Java, you often see a META-INF folder containing some meta files. What is the purpose of this folder and what can I put there?
Kristian
  • 6,443
  • 6
  • 27
  • 29
117
votes
2 answers

Use of the MANIFEST.MF file in Java

I noticed that JAR, WAR and EAR files have a MANIFEST.MF file under the META-INF folder. What is the use of the MANIFEST.MF file? What all things can be specified in this file?
Anand
  • 20,708
  • 48
  • 131
  • 198
100
votes
3 answers

How to build an Uber JAR (Fat JAR) using SBT within IntelliJ IDEA?

I'm using SBT (within IntelliJ IDEA) to build a simple Scala project. I would like to know what is the simplest way to build an Uber JAR file (aka Fat JAR, Super JAR). I'm currently using SBT but when I'm submiting my JAR file to Apache Spark I get…
Yves M.
  • 29,855
  • 23
  • 108
  • 144
47
votes
3 answers

Java META-INF/services

What is the purpose of META-INF/services in Java ?
dialloc
  • 471
  • 1
  • 4
  • 4
42
votes
6 answers

Android Studio: Duplicate files copied in APK META-INF/DEPENDENCIES when compile

I exported my project from Eclipse and imported to Android Studio using the instructions in this link: http://developer.android.com/sdk/installing/migrate.html When I build, I have an error: Duplicate files copied in APK META-INF/DEPENDENCIES After…
TrungNVT
  • 671
  • 2
  • 6
  • 8
37
votes
2 answers

Idea to avoid that spring.handlers/spring.schemas get overwritten when merging multiple spring dependencies in a single jar

I got the error Unable to locate NamespaceHandler when using context:annotation-config running (java -jar) a jar assembled by the maven-assembly-plugin and containing my project and all its dependencies. As other people correctly spotted on the…
acorello
  • 4,473
  • 4
  • 31
  • 46
24
votes
10 answers

Problem "Entry name 'META-INF...' collide - Android

I have added some things to my mobile application, such as adds or animation-lists. The thing is that I could generate APKs perfectly some days ago and, since the moment y added those things, Android Studio does not let me generate them. It has the…
Álvaro Sánchez
  • 241
  • 1
  • 2
  • 3
18
votes
4 answers

META-INF/version duplicate error when using Proguard

Gradle : 4.10.1 Gradle Android Plugin version : 3.3.2 Proguard : 6.0.3 JDK - 1.9 Android Studio 3.3.2 When I try to build apk release version along with Proguard. I get the following error - Caused by: java.io.IOException: Please correct the above…
anirudh
  • 424
  • 1
  • 4
  • 12
18
votes
1 answer

Maven war has META-INF folder in two places

I'm working on a project which uses JAAS and unfortunately for me Tomcat requires a file to be put in a META-INF folder in the root of the war app.war |__META-INF | |___context.xml ... I think that it's already weird since the default…
Grasshopper
  • 1,749
  • 1
  • 14
  • 30
16
votes
1 answer

Annotation Processors generated resources not packaged to APK

I've custom annotation processor generating factory classes and META-INF/services/factory.interface.class resource. Annotation processor is used in library project and all generated files are packaged correctly into AAR. When I use annotation…
skyman
  • 2,422
  • 17
  • 16
14
votes
1 answer

What is the correct META-INF directory location for context.xml in Tomcat?

Should a "context.xml" file for deploying application-specific configuration to Tomcat be placed in: src/main/resources/META-INF/context.xml ...or... src/main/webapp/META-INF/context.xml ? Justification for asking: Have seen conflicting advice on…
Steve Chambers
  • 37,270
  • 24
  • 156
  • 208
13
votes
5 answers

Using serviceloader on android

I am very new to java and android development and to learn I am trying to start with an application to gather statistics and information like munin does. I am trying to be able to load "plugins" in my application. These plugins are already in the…
silverchris
  • 139
  • 1
  • 4
13
votes
4 answers

Maven: include files in JAR's META-INF

I'm using Maven to build a Java project, and I've got a couple files, CHANGELOG and LICENSE, that I'd like to copy to the META-INF directory inside the JAR file. So far what I've got working is the following:
Julián Urbano
  • 8,378
  • 1
  • 30
  • 52
12
votes
2 answers

creating META-INF/services folder in Eclipse

I am trying to create an extensible app in Java and chose to use SPI. According to this tutorial I am following, I am supposed to create a specific file in META-INF/services in my jar, but don't know how. I know how to create jar with META-INF, but…
tom
  • 311
  • 3
  • 4
  • 13
11
votes
2 answers

javax.naming.NameNotFoundException: Name [jdbc/rhwebDB] is not bound in this Context. Unable to find [jdbc]

I know there's many questions regarding this exception, however, I believe I've tried everything for many days, without any luck yet. As this is a production server, I can only work on this after midnight :( I have a Tomcat app. Recently, I've…
Sergio
  • 658
  • 1
  • 9
  • 22
1
2 3
8 9