-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
cannot find symbol symbol: variable FlatLightLaf location: class xxx #13
Comments
Is this a compiler error? Then this should help: import com.formdev.flatlaf.FlatLightLaf; |
Unfortunately not.
This message is made by Netbeans.
When adding “import com.formdev.flatlaf.FlatLightLaf;” I receive the message
“cannot find symbol
symbol: class FlatLightLaf
location: package com.formdev.flatlaf”
Von: Karl T <notifications@github.com>
Gesendet: Freitag, 18. Oktober 2019 18:56
An: JFormDesigner/FlatLaf <FlatLaf@noreply.github.com>
Cc: Thomas <thomas@familiezimmermann.de>; Author <author@noreply.github.com>
Betreff: Re: [JFormDesigner/FlatLaf] cannot find symbol symbol: variable FlatLightLaf location: class xxx (#13)
Is this a compiler error?
Then this should help:
import com.formdev.flatlaf.FlatLightLaf;
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#13?email_source=notifications&email_token=AAWPMRATGGF52XXKVIA4AOLQPHTA5A5CNFSM4JCJ4VS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBVEFRI#issuecomment-543834821> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAWPMRCTCHE7J5F666JCNIDQPHTA5ANCNFSM4JCJ4VSQ> . <https://github.com/notifications/beacon/AAWPMRCZMAQNBBBPEX6ZED3QPHTA5A5CNFSM4JCJ4VS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBVEFRI.gif>
|
Do you use Java 9 modules? Then you probably have to add following to your requires com.formdev.flatlaf; |
No – I do not use modules.
But I recognized that Netbeans compiles the code despite the message that the symbol could not be found and the FlatLightLaf-theme is used.
I am flabbergasted.
Regards
Thomas
Von: Karl T <notifications@github.com>
Gesendet: Freitag, 18. Oktober 2019 19:26
An: JFormDesigner/FlatLaf <FlatLaf@noreply.github.com>
Cc: Thomas <thomas@familiezimmermann.de>; Author <author@noreply.github.com>
Betreff: Re: [JFormDesigner/FlatLaf] cannot find symbol symbol: variable FlatLightLaf location: class xxx (#13)
Do you use Java 9 modules? Then you probably have to add following to your module-info.java:
requires com.formdev.flatlaf;
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#13?email_source=notifications&email_token=AAWPMRAMPOY3GYH6DVEWWWLQPHWSNA5CNFSM4JCJ4VS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBVHOFQ#issuecomment-543848214> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAWPMRG7SUBXYN2E4MXRFXLQPHWSNANCNFSM4JCJ4VSQ> . <https://github.com/notifications/beacon/AAWPMRFHF2GVE35ST5SLNA3QPHWSNA5CNFSM4JCJ4VS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBVHOFQ.gif>
|
Is the problem still there? Did you try to rebuild project? |
Hello Karl,
the problem is still there.
I am using Netbeans 11.0 without Maven/Gradle.
The needed jar’s are in the classpath.
I am using the import “import com.formdev.flatlaf.FlatLightLaf;” which shows the warning “cannot find symbol, symbol: class FlatLightLaf, location: package com.formdev.flatlaf” and the code-snippet “FlatLightLaf.install();” to install the theme.
The whole project was successfully rebuild without any problems und the jar-file is running with the FlitLightLAF.
Regards
Thomas
Von: Karl T <notifications@github.com>
Gesendet: Dienstag, 22. Oktober 2019 15:26
An: JFormDesigner/FlatLaf <FlatLaf@noreply.github.com>
Cc: Thomas <thomas@familiezimmermann.de>; Author <author@noreply.github.com>
Betreff: Re: [JFormDesigner/FlatLaf] cannot find symbol symbol: variable FlatLightLaf location: class xxx (#13)
Is the problem still there?
Did you try to rebuild project?
Or refresh Maven/Gradle?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#13?email_source=notifications&email_token=AAWPMRFH4AQA4F5SXRC3RU3QP35ONA5CNFSM4JCJ4VS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB5XB6A#issuecomment-544960760> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAWPMRANDIVS4W6X3G2KCJ3QP35ONANCNFSM4JCJ4VSQ> . <https://github.com/notifications/beacon/AAWPMRDD5BWSGMGCYL3VFMTQP35ONA5CNFSM4JCJ4VS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB5XB6A.gif>
|
This seems to be a bug in NetBeans. @AlexFalappa describes the same issue here: http://mail-archives.apache.org/mod_mbox/netbeans-dev/201911.mbox/%3cCADBn96U94y=fBWnsny_R6tAD-m94YgiawcXQz66Z7SbD8pNfFw@mail.gmail.com%3e It occurs because:
@AlexFalappa the difference to When I remove It also works when I remove Very strange... |
@DevCharly thank you for the further investigation. Would you mind answering to that thread in NetBeans dev mailinglist to help the developers troubleshoot the issue? |
…ry format is set to JDK 9 (or later) in NetBeans project (issue #13) flatlaf.jar is no longer a multi-release jar
Hi, I have the same issue - is there something I could do to use FlatLaf? |
@mparusk Hi Maria, are you using a recent FlatLaf version? Because this issue is actually fixed since FlatLaf 0.20. Did you add flatlaf.jar to the project modulepath (in Projects dialog)? module MyApp {
requires com.formdev.flatlaf;
} |
closing because already fixed since FlatLaf 0.20 |
Just hit it myself too : My project is Maven project and it does have flatlaf-0.33.jar dependency included. |
@r-go could you please test whether it works with FlatLaf 0.32? |
Just did it and it works ! (and now all classes are visible to the code completion wizard too) . Thanks for the quick reply ! (and, btw - this is by far the best L&F ever released for Swing) |
@DevCharly just to confirm same issue with NetBeans 12.0-beta3 and Maven project (Ubuntu, Java 11). Downgrading to 0.32 fixes it. Do you know what the change that triggered it was? Thanks! |
@neilcsmith-net the reason is probably that flatlaf-0.33.jar is now again a multi-release JAR (MRJ). This was necessary to support Java 9+ multi-resolution images. When this issue initially came up, flatlaf.jar was also a MRJ for |
@DevCharly Thanks Karl. Just noticed that when diffing the two JARs. So same issue as before? One for the NetBeans side of things then I guess. Maybe that |
@DevCharly fyi, the problem in NetBeans seems to be at https://github.com/apache/netbeans/blob/master/java/java.source.base/src/org/netbeans/modules/java/source/parsing/CachingFileManager.java#L272 This is using the fully qualified name without extension as a map key when parsing multi-release JARs. Just experimenting with a quick fix. |
Just released version 0.34 that includes a workaround for this issue (reorder files in JAR). |
I'm having the same compiler error issue.
Including the statement I'm running the IntelliJ IDE, Java version 8, using gradle build tools. I have this line in my gradle build dependencies Every time I refresh gradle, it shows the package in my list of runtime and test runtime dependencies. I have also tried versions 0.32-0.35 and all produce the same error when compiling. |
@sstephans Use Issue #168 might be also provide useful information. |
Whenn adding the line "FlatLightLaf.install();" to my java-classes, I receiv the error
"cannot find symbol
symbol: variable FlatLightLaf
location: class CarolaHartmannMilesVerlag"
although I addes the jar-file to my classpath.
I am using Netbeans 11.00.
What do I missing?
Kind regards
Thomas
The text was updated successfully, but these errors were encountered: