Quantcast
Channel: How do I import jars into my java program? - Stack Overflow
Viewing all articles
Browse latest Browse all 14

Answer by jesellers for How do I import jars into my java program?

$
0
0

I had this same problem. Renfei Wang's solution worked for me (I don't have enough points yet to comment directly on his response).

In Sublime, navigate to Preferences: Browse Packages>JavaC.sublime_build.

Here's what mine looks like:

{"cmd": ["javac", "-cp", "/Users/jason/Documents/lib/*:./","$file"],"file_regex": "^(...*?):([0-9]*):?([0-9]*)","selector": "source.java"}

/Users/jason/Documents/lib/*:/ lets Sublime know the location of the directory that holds my packages, so that now when I build, it loads those packages first.


Viewing all articles
Browse latest Browse all 14

Trending Articles