You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference-manual/native-image/BuildOutput.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -277,14 +277,28 @@ Unassociated types are displayed when certain types (such as classes, interfaces
277
277
If these types contain vulnerabilities, SBOM scanning will not detect them.
278
278
To fix this, ensure that proper GAV coordinates (Group ID, Artifact ID, and Version) are defined in the project POM's properties or in _MANIFEST.MF_ using standard formats.
279
279
280
+
Use the [build report](BuildReport.md) to view included components, their dependencies, and any unassociated types.
280
281
For more information, see [Software Bill of Materials](../../security/native-image.md).
This section indicates whether obfuscation was applied and provides related statistics.
284
-
Obfuscation is applied to your application code and third-party dependencies, but not to the JDK or [Substrate VM](https://github.com/oracle/graal/tree/master/substratevm) code.
285
-
The following elements are obfuscated: module, package, and class names; method and source file names in stack traces; and field names in heap dumps.
286
-
The following elements are not obfuscated: symbols affected by registrations in reachability metadata; modules and packages that contain a class which loads a resource; annotations; lambdas; and proxies.
287
-
Use `-H:EnableObfuscation=export-mapping` to export a build artifact containing the mappings from original to obfuscated names.
This section indicates whether advanced obfuscation was applied.
285
+
Advanced obfuscation is applied to your application code and third-party dependencies, but not to the JDK or [Substrate VM](https://github.com/oracle/graal/tree/master/substratevm) code.
286
+
287
+
**Obfuscated elements include:**
288
+
* Module, package, and class names
289
+
* Method and source file names (as seen in stack traces)
290
+
* Field names (as seen in heap dumps)
291
+
292
+
**Elements that are _not_ obfuscated:**
293
+
* Names affected by registrations in reachability metadata
294
+
* Names in preserved code (via `-H:Preserve`)
295
+
* Module and package names containing a class that loads a resource
296
+
* Names of annotations, lambdas, and proxies
297
+
298
+
To export a mapping from original to obfuscated names, use `-H:AdvancedObfuscation=export-mapping`.
299
+
See the [build report](BuildReport.md) for summary statistics, such as the percentage of class and method names that were obfuscated.
300
+
301
+
> Native Image obfuscates binaries by removing class files, applying aggressive optimizations, and eliminating dead code. The advanced obfuscation feature also obfuscates symbol names.
VMError.guarantee(!includeConfigSealed, "This method should be executed only once.");
292
314
293
-
if (preserveAll) {
315
+
if (preserveAll()) {
294
316
Stringmsg = """
295
317
This image build includes all classes from the classpath and the JDK via the %s option. This will lead to noticeably bigger images and increased startup times.
296
318
If you notice '--initialize-at-build-time' related errors during the build, this is because unanticipated types ended up in the image heap.\
@@ -1154,8 +1176,6 @@ public Set<String> getClassNamesToPreserve() {
0 commit comments