Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWT ERR #29360

Closed
TheBlindM opened this issue Nov 19, 2022 · 6 comments
Closed

AWT ERR #29360

TheBlindM opened this issue Nov 19, 2022 · 6 comments
Labels
env/windows Impacts Windows machines kind/bug Something isn't working triage/invalid This doesn't seem right

Comments

@TheBlindM
Copy link

Describe the bug

Compilation exception after adding quarkus-awt

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-awt</artifactId>
        </dependency>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  16.840 s
[INFO] Finished at: 2022-11-19T10:42:42+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.14.0.Final:build (default) on project demo1: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] 	[error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR] 	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:285)
[ERROR] 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[ERROR] 	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
[ERROR] 	at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
[ERROR] 	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR] 	at java.base/java.lang.Thread.run(Thread.java:1589)
[ERROR] 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.lang.UnsupportedOperationException: Windows AWT integration is not ready in native-image and would result in java.lang.UnsatisfiedLinkError: no awt in java.library.path.
[ERROR] 	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep$NativeImageInvokerInfo$Builder.build(NativeImageBuildStep.java:888)
[ERROR] 	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:253)
[ERROR] 	... 9 more
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:

Expected behavior

How to use DaskTop in quarkus

Desktop.getDesktop().browse(uri);

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

19

GraalVM version (if different from Java)

22.3

Quarkus version or git rev

2.14

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@TheBlindM TheBlindM added the kind/bug Something isn't working label Nov 19, 2022
@quarkus-bot quarkus-bot bot added env/windows Impacts Windows machines triage/needs-triage labels Nov 19, 2022
@TheBlindM
Copy link
Author

anyone there? Help

@geoand
Copy link
Contributor

geoand commented Nov 21, 2022

@zakkak @Karm is this a known limitation of GraalVM?

@zakkak
Copy link
Contributor

zakkak commented Nov 21, 2022

@zakkak @Karm is this a known limitation of GraalVM?

It looks like oracle/graal#5372. @Karm might be able to help a bit more.

@Karm
Copy link
Member

Karm commented Nov 21, 2022

@TheBlindM my reply from oracle/graal#5445 (comment) stands.

We are operating in a headless mode. Your usage:

I need to use dasktop related, such as browser jump, or open file, Desktop.getDesktop().open(new File(savePath));

is not in the scope of what we support in Quarkus native at the moment. You can do a text user interface though, e.g. spit a link to to terminal the user can click on and have a browser started. You can leverage Picoli to have a quite rich text user interface experience... Opening a file can be done via a web form on that locally served page.

You can submit a feature request and we can follow up eventually alongside GraalVM's rich gui capabilities developments.

@geoand
Copy link
Contributor

geoand commented Nov 21, 2022

@Karm so I guess we should close this issue?

@Karm Karm closed this as completed Nov 21, 2022
@TheBlindM
Copy link
Author

Ok, I understand

@geoand geoand added the triage/invalid This doesn't seem right label Nov 22, 2022
@zakkak zakkak mentioned this issue Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
env/windows Impacts Windows machines kind/bug Something isn't working triage/invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants