Search code examples
javavisual-studio-codeclasspathprojectderby

How to load a jar file in my program vscode?


Hello Stackoverflow. I cannot use these .jar files in my code...I need those files to manage a local database managed by derby.

I tried to add the lib folder to the classpath, but it didn't work.

When I try to '''org.apache.derby.jdbc.EmbeddedDriver''' it does not find it. I use VSCode as my main editor. I cannot change VSCode, but for the future, I will consider other options. I leave this screenshot here regarding my folder structure. enter image description here


Solution

  • try to define the path like this in your .classpath file :

    <classpathentry kind="lib" path="lib/derby.jar"/> 
    <classpathentry kind="lib" path="lib/derbyclient.jar"/>
    

    refer to add jar