Java scratch file unable to execute in intellij 2016

1k Views Asked by At

Previously i was using Intellij15 where the scratch file feature introduced and it was successfully execute java code there. But after upgrading to intellij16 i unable to execute scrach file of type java. Can someone tell me a way to work in intellij16

1

There are 1 best solutions below

0
On BEST ANSWER

Scratch files run fine for me on Intellij IDEA 2016.3

Steps followed:

  1. Notice that there are Scratch files and Scratch buffers but only the former are runnable and is created via :

enter image description here

  1. Then choose the language:

enter image description here

  1. Add then create and execute the desired code, for example:
class Blah{
    public static void main(String[] args){
        System.out.println("Blah");
    }
}

See this in action below:

enter image description here