Starting with Java


    This guide is going to help you start coding your Java programs at SourceLair and make the most out of SourceLair's capabilities.

    This guide assumes that you already have a SourceLair account .


    In order to start coding in Java all you have to do is start a Generic project. Generic projects provide you with a fully featured Linux terminal and pre-installed the Java 1.7 version. SourceLair supports Java only for command line applications at the moment.

    If you need some help in starting a Generic project you can read this help article.

    Code your first "Hello World"

    Firstly, create a new file in your file explorer. Create-java-file

    Secondly, write the relevant code in your editor. Hello-World

    Run Files

    In order to run your file you press "Run File" button, after saving your last changes. Run hello world in java

    If you desire more advanced options to compile and run your Java files, you can compile and execute them in your terminal, just like you would do locally.

    Tips to code faster

    SourceLair provides you with some great features in order to help you develop faster your website being focused on the creative part of programming.

    Command Palette

    Command Palette is a free text search tool which helps you use most of SourceLair's features really fast. You can open it by pressing Ctrl/Cmd + Shift + P.


    Quickopen is a fast and time saving way to navigate through your filesystem in order to find and open any file you want using your keyboard.

    There are 2 ways to open the Quickopen prompt:

    • using its shortcut Ctrl/Cmd + Shift + O
    • finding the Quickopen: Open a file command from Command Palette (Ctrl/Cmd + Shift + P)

    Find in files

    Find in files is a simple and easy way to search for something in your entire project at once, with quick file navigation from the results. There are 2 ways to trigger this feature:

    • finding the Project:Find in files command from Command Palette
    • using its shortcut Ctrl/Cmd + Shift + F