[solved]Intellij not importing jars/ reading inside jars
Hi, let me start off by saying I'm not terribly experienced, I'm taking a course in java and am about halfway through. I'm having trouble dealing with jars in any manner, as it seems that on my computer(and my computer alone) intellij cannot properly import jars. I've attempted to do so with jars I made(via project structure>artifacts>new>from modules with dependencies>build>build artifact) and third party jars. I've double checked that the files are not read only and that I am following the correct procedure(this has been verified more times than I've had patience for but if you know of a common mistake I'm more than happy to hear of it, although I believe my error is unlikely due to something stated further on).
Furthermore I attempted the same exact thing with a fresh install of intellij on a separate computer and it worked without a hitch. I also downloaded and figured out how to import jars using eclipse and the same jars that I could not import on intellij worked fine as far as importing and usage as libraries or what have you on eclipse. I can create them fine, the one I used for eclipse was created using intellij. I have attempted to reinstall intellij several times(I am a student so I am using the full edition) as well as changing where the projects are stored in case there were any conflicts there(although I have administrative privileges so that should not be an issue).
I've attached a link to a video where I attempt the aforementioned process with a simple class containing one method on a fresh install of IntelliJ's newest version.
I'm running on a 64bit version of windows 10
Specs:
Asrock z97 pro4
intel i5 4690k 3.5Ghz
2x4gb DDR3 corsair vengeance
Any help would be greatly appreciated, I've practically exhausted all other resources(to my knowledge).
https://youtu.be/KlQROnNMOZQ
Solution: My user folder contained exclamation points which triggered an issue between intellij and the target jars(currently a bug to my knowledge). Moving the target jar out of that folder path will fix the issue.
Please sign in to leave a comment.
I've noticed that your path with the jar contains exclamation marks, there is an open bug which is caused by it, please see https://youtrack.jetbrains.com/issue/IDEA-160951 for details.
If you move the project/jar to some other directory without the exclamation marks (!), it should work fine and you will be able to add the jars to the dependencies.
For some reason the library was not added. Are there any exceptions in idea.log (https://intellij-support.jetbrains.com/hc/articles/207241085) at that point?
Please also note that the library must be added to the module dependencies, it's not enough to add it only to the Libraries, see https://www.jetbrains.com/help/idea/2017.1/working-with-module-dependencies.html.
You are a gentleman and a scholar, that fixed it. Now to create a new user because I can see that causing all manner of problem. Thank you.