Search code examples
notepad++javajavac

How to compile java with external libraries in notepad++?


I'm using Notepad++ to learn Java. I have it set it up to compile and run Java from the Run menu, only that I have been coding small exercises without external libraries, I know I have to use -classpath to tell the compiler what library to use, but I was wondering if there is any way to tell the compiler to "use" the libraries in the lib directory of my current project.

Thanks.


Solution

  • Turns out that you can put any jar file into the ext folder (C:\Program Files\java\jdk1.6.0_21\jre\lib\ext and C:\Program Files\java\jre6\lib\ext) and java will automatically considered it part of the classpath, check it out: ext directory: Java Glossary

    Dirty but it does what I need.