Skip to content

Commit

Permalink
AWT Extension, Decoders, Encoders, Geometry and Fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
Karm committed Oct 18, 2021
1 parent c0abc9e commit 8b93680
Show file tree
Hide file tree
Showing 69 changed files with 2,693 additions and 461 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ public class NativeConfig {
@ConfigItem(defaultValue = "true")
public boolean enableJni;

/**
* The default value for java.awt.headless JVM option.
* Switching this option affects linking of awt libraries.
*/
@ConfigItem(defaultValue = "true")
public boolean headless;

/**
* Defines the user language used for building the native executable.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ private static NativeImageBuildLocalRunner getNativeImageBuildLocalRunner(Native
// try system property first - it will be the JAVA_HOME used by the current JVM
String home = System.getProperty(JAVA_HOME_SYS);
if (home == null) {
// No luck, somewhat a odd JVM not enforcing this property
// No luck, somewhat an odd JVM not enforcing this property
// try with the JAVA_HOME environment variable
home = System.getenv(JAVA_HOME_ENV);
}
Expand Down Expand Up @@ -584,6 +584,10 @@ public NativeImageInvokerInfo build() {
nativeImageArgs.add("-H:+JNI");
nativeImageArgs.add("-H:+AllowFoldMethods");

if (nativeConfig.headless) {
nativeImageArgs.add("-J-Djava.awt.headless=true");
}

if (nativeConfig.enableFallbackImages) {
nativeImageArgs.add("-H:FallbackThreshold=5");
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
*
* So, as long as JAXB graphics code has not been excluded completely from JAXB,
* it is safer to define all image related packages to be runtime initialized directly in core.
*
* Note that this initialization s not enough if user wants to deserialize actual images
* from XML. AWT Extension must be loaded for decoding JDK supported image formats.
*/
@AutomaticFeature
public class AwtFeature implements Feature {
Expand Down

This file was deleted.

This file was deleted.

88 changes: 47 additions & 41 deletions extensions/awt/deployment/pom.xml
Original file line number Diff line number Diff line change
@@ -1,43 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-awt-parent</artifactId>
<version>999-SNAPSHOT</version>
</parent>
<artifactId>quarkus-awt-deployment</artifactId>
<name>Quarkus - Awt - Deployment</name>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-awt</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-internal</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${project.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-awt-parent</artifactId>
<version>999-SNAPSHOT</version>
</parent>
<artifactId>quarkus-awt-deployment</artifactId>
<name>Quarkus - Awt - Deployment</name>
<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-arc-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-awt</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-internal</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core-deployment</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${project.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit 8b93680

Please sign in to comment.