#Added jar to project as library but i cannot use it

1 messages · Page 1 of 1 (latest)

ocean wolf
#

I added a jar to my project as a library and it doesnt give any errors in the ide, like i can also just view it and it finds all classes, but when i run it does not compile because it cannot import or something.

radiant kilnBOT
#

<@&987246652869971988> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#
TJ-Bot
I added a jar to my project as a library and it doesnt give any errors in the ide, like i can also just view it and it finds all classes, but when i run it does not compile because it cannot import or something.

try to use the classes from the jar in my code, it gives me an error saying the class cannot be resolved.

First, make sure that the jar file is added to your build path correctly. In Eclipse, you can do this by right-clicking on your project, selecting Build Path -> Configure Build Path, and then adding the jar file under the Libraries tab.

If the jar file is already added to your build path, try refreshing your project or restarting your IDE to see if that resolves the issue.

Additionally, check if there are any dependencies that the classes in the jar file rely on. You may need to add these dependencies to your project as well.

If you're still experiencing issues, try cleaning and rebuilding your project to make sure everything is properly compiled.

Lastly, double-check that you are importing the classes from the jar file correctly in your code. The import statement should match the package structure of the classes in the jar file.

If you've tried all of these steps and are still facing issues, consider reaching out to the creator of the jar file for further assistance or checking online forums for similar issues with using that specific library.

ocean wolf
#

its in there

#

and i added it to the modules too

#

it says compile

#

so idk why it doesnt compile

#

i havent tried doing it through my build.gradle ill try

#

well that seemed to work

#

💀

#

ok idk why this didnt work but its fixed then ig

#

idk why i didnt try it