-
Notifications
You must be signed in to change notification settings - Fork 8
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
java.lang.NoClassDefFoundError: com/sun/jna/platform/win32/Shell32 #2
Comments
Hi @erayerdin ,
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.5.0</version>
</dependency> |
Yeah, I also saw that. I hesitated to try it since the library specifically calls However, I will give it a try and post the results here. |
Update: I was right. The same error occurs. My debug log below:
I will, still again, check my code to see if there is a mistake I've been doing (oddly, it works on Ubuntu even if there is a mistake). |
That error means your application could not find First, please make sure that If If the above does not help, please let me know how you build your JavaFX application (i.e. using IDE? mvn command?, etc.). p.s. |
Project already uses Maven, so it configures the classpath well. The project is here (I didn't push commits, so the lines you might check out in the project are old.). I redefined application data folders manually temporarily, so my problem is kind of solved. These debug logs are all I have, but if I manage to find any further resources (like debug logs, code lines et cetera), I will give further information. EditThese lines where I initialize appdirs threw exception, so I commented it out. |
You seem to be using IntelljiJ as your IDE. |
@erayerdin Probably this should solve your problem: <dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.5.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>4.5.0</version>
</dependency> |
@zak-pawel and @harawata Since I dropped the library, I cannot give you further detail. Yet again, Maven is also a dependency management tool apart from building tool, so the configuration of this project must provide other dependencies and then be updated in Maven repository. Please, don't get me wrong. This is not an advice, this is just a suggestion from a random stranger on the internet. This is the only library in Java and Maven repository utilizing crossplatform application directory management. I hope someone else will have the problem and can give you further details right after implementing your explanations. Thanks again and I am sorry I could not continue using this library and give you enough feedback since I don't have enough time. |
@erayerdin I totally agree that configuration of this project should provide other dependencies and I hope that @harawata fixes this dependency issue. |
No worries. I appreciate you took the time to report this! @zak-pawel is right (thanks for the help!). I checked the dependency and it is Anyway, to make things simpler, I have modified the scope of |
I can confirm that 1.0.1 solves problem. |
@zak-pawel Thank you for verifying it! |
update appdirs library from 1.0.0 to 1.2.0 to avoid the following bug: harawata/appdirs#2
update appdirs library from 1.0.0 to 1.2.0 to avoid the following bug: harawata/appdirs#2
I am using
appdirs
in a JavaFX application. appdirs throws exception in Windows 7 as below:It works in Linux, though. Adding
com.sun.jna
as a Maven dependency does not work as well.Environment
The text was updated successfully, but these errors were encountered: