Sublime Text 3 with Javatar

So we in the Bulgarian Java User Group wanted to build Valhalla, and no IDE (Eclipse, Intellij Idea) supports it. We needed some simple text editor with some java support. And Sublime Text 3 (with Javatar) is the one we chose.

Sublime is a fancy editor written in C and Python. Javatar is a plugin that adds some Java support.

Installing Sublime Text 3 beta is straight forward. Installing Javatar is:

[openjdk@localhost valhalla]$ cd ~/.config/sublime-text-3/Packages/
[openjdk@localhost Packages]$ git clone git://github.com/spywhere/Javatar.git

Setting up the correct java is: Ctrl+Shift+P --> "javatar" --> Javatar Settings - Default

Then change the javac and java locations:

Creating projects is a bit uneasy - create new project is actually called "Project -> Save as".

And then we can run some code (fist compile, then run):

3 thoughts on “Sublime Text 3 with Javatar”

  1. Thank you for putting this together, because the javatar site is not friendly about installation. I wasted around an hour to get it right.

    Some points, so that others could save time,

    1) For ubuntu users, If jdk is installed in a folder, don't give full path.
    For example, i have installed jdk here, at /home/dbabu/jdk1.8.0_40.
    So in the Javatar config file, give only /home/dbabu.
    2) Don't use a slash at the end, so its just /home/dbabu and not /home/dbabu/

  2. I got this error message every time i try to build :
    javac: invalid flag:
    Usage: javac
    use -help for a list of possible options
    [Finished in 0.1s with exit code 2]
    [shell_cmd: javac ""]
    [dir: /opt/sublime_text]
    [path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin]

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.