public final class JarUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
JarUtils.NativeMethodFound |
Modifier and Type | Method and Description |
---|---|
static boolean |
containsNativeCode(java.nio.file.Path jar)
Heuristically try to determine whether given JAR (or WAR, EAR, ...) file contains native (architecture-dependent)
code.
|
static void |
injectManifest(java.nio.file.Path targetJar,
Artifact artifact)
Inject artifact coordinates into manifest of specified JAR (or WAR, EAR, ...) file.
|
static boolean |
usesNativeCode(java.nio.file.Path jar)
Heuristically try to determine whether given JAR (or WAR, EAR, ...) file is using native (architecture-dependent)
code.
|
public static boolean containsNativeCode(java.nio.file.Path jar)
Currently this code only checks only for ELF binaries, but that behavior can change in future.
true
if native code was found inside given JARpublic static boolean usesNativeCode(java.nio.file.Path jar)
Currently this code only checks if any class file declares Java native methods, but that behavior can change in future.
true
given JAR as found inside to use native codepublic static void injectManifest(java.nio.file.Path targetJar, Artifact artifact)
targetJar
- artifact
- Copyright © 2012–2017 Red Hat, Inc.. All rights reserved.