Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm pretty new to Java and I'm trying to figure out how to import external libraries into my project. I'm using visual studio code for my project.

More specifically I'm trying to use joinery.

But I'm having trouble importing it.

Any help would be great, thanks!

What I have tried:

Following the visual studio code docs I first downloaded joinery and then went to Reference Library in vs code, I tried selecting the jar file but it didn't seem to let me select it and when I clicked select jar file nothing happened.

I'm also getting this error when I try to open the jar file:
Quote:
joinery-dataframe-1.9-jar-with-dependencies.jar' is not marked as executable. If this was downloaded or copied from an untrusted source, it may be dangerous to run. For more details, read about the executable bit.
Posted
Updated 1-Oct-20 20:49pm
v2

1 solution

Given you have followed VSCode docs[^], would lean on jar being marked unsafe the reason here.

If using windows:
Right click on it and go properties, then select permissions and check "Allow executing file as program"

If using Mac, in terminal:
PERL
sudo chmod +x /home/xxxx/Downloads/joinery-dataframe-1.9-jar

Ps: Be sure to make sure you got it from a trusted source.

OR

for any OS, try in terminal/cmd:
PERL
java -jar /home/xxxx/Downloads/joinery-dataframe-1.9-jar



You can also do it manually if for some reason GUI is still not allowing (like this reported issue[^]):
1. Open .vscode/settings.json file (if not present, you can create one)
2. add required jar file there as shown below. (mostly all the jar files present in lib directory will be included + your new jar located outside the project directory)
JavaScript
{
    "java.project.referencedLibraries": [
        "lib/**/*.jar",
        "/home/xxxx/Downloads/joinery-dataframe-1.9-jar"
    ]
}
 
Share this answer
 
Comments
ynjay 2-Oct-20 9:46am    
Thanks so much! I'm actually using linux ubuntu, I ran in the terminal to allow executing the file but was still unable to click on it in Reference Library in vs code, possibly similar to the issue you linked to.
I tried adding to settings.json but I'm getting "Unknown configuration setting" error for "java.project.referencedLibraries".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900