Questions tagged [scratch-file]

Use this tag for all issues related to temporary files, otherwise known as scratch files.

Scratch files refer to (very) temporary files used by programs in the course of their execution.

For example, they may provide temporary data structures that are stored outside of main memory, temporary reports sent to a text file for viewing, and so on.

Basically, if the data in the file is not needed in the long term, you can consider it a scratch file.

30 questions
54
votes
3 answers

How do I create a scratch file in IntelliJ 14?

Scratch files are mentioned in the release announcement for IntelliJ 14 but it does not mention how to create or use them. Any links to documentation would be extremely helpful. What I Have Already Tried I have already performed several web…
Rylander
  • 19,449
  • 25
  • 93
  • 144
41
votes
7 answers

Where are IntelliJ scratch files located?

In IntelliJ IDEA 14, we can create scratch files from Tools > New Scratch File... Are they stored in some temporary files? If the answer is yes, where are they? Attempts: 1) I pressed right click > Copy Reference and I pasted…
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
19
votes
5 answers

how to force stop Intellij on linux

I am using a scratch file for some Kotlin work. I accidentally created an endless loop in one of my functions and ran the file, so Intellij is not responding. There is no button for stopping the execution of the scratch file and even if there…
salyela
  • 1,325
  • 3
  • 14
  • 26
17
votes
1 answer

Android Studio could not find or load main class of "Scratch" file

Update: Below problem is remained until Android Studio 3.4.2. I use Android Studio 3.3 and created a scratch file (File > new > Scratch File > Java). The IDE created scratch.java in ~/.AndroidStudio3.3/config/scratches: class Scratch { public…
hasanghaforian
  • 13,858
  • 11
  • 76
  • 167
13
votes
3 answers

Open a new scratch file in PyCharm?

In PyCharm 4.5, one of the new features is listed as "Temporary Python Scratch Files". How do I create these? I've searched through the "New" menu and haven't been able to find it. When I select "New...", I am given the option to create permanent…
PythonLover
  • 133
  • 1
  • 5
12
votes
1 answer

Scratch file not running on IntelliJ IDEA

I am trying to run a Kotlin scratch file in IntelliJ just like you would run a Java scratch file, but it doesn't work. I created a new Kotlin scratch file, but can't run the code even after attempting the following: Create a main function and print…
spuente
  • 314
  • 5
  • 16
12
votes
4 answers

How to add a custom library to a scratch file

In PhpStorm/WebStorm how can I add a custom library so that the file compiles? In my case it would be Lodash? I tried to add lodash to global libs but it did not help...
Amio.io
  • 20,677
  • 15
  • 82
  • 117
11
votes
1 answer

How do I run the code from a scratch file in IntelliJ 14?

I've created a simple Java scratch file containing a class named "TestGenerics" containing some code and a main method. The code seems to be fine, however when I try to run it (by right clicking > Run 'TestGenerics.main()', I get this error:…
danielgpm
  • 1,609
  • 12
  • 26
3
votes
1 answer

Kotlin Scratch File Android Studio readline()

Can I use readline() in a Scratch File of Android Studio? Where to enter input?
3
votes
1 answer

How to run Scratch file in PyCharm?

I am working on a project called "banana" and now I wanna run the Scratch file I already wrote, but I can only find the green triangle which would say "run banana" when you hover over it, but no way to run my scratch file?
Severin Spörri
  • 100
  • 1
  • 10
2
votes
0 answers

How to import android.net.Uri in an Android Studio scratch file?

I tried to run the following program in an Android Studio scratch file: import android.net.Uri println (Uri.encode("?")) But it fails with the following error: Unresolved reference: android But this seems to work: import…
ceving
  • 21,900
  • 13
  • 104
  • 178
2
votes
1 answer

Unable to run Scratch file in Android studio

I am trying to run Scratch files in Android studio 3.4.1 and unable to see the output. I have created two files one with .kts extension and other with .java extension. Below mentioned is the .kts file class Check { fun main(args: Array) { …
Harry Sharma
  • 2,190
  • 2
  • 15
  • 41
1
vote
0 answers

Naming Python scratch files during creation in Pycharm?

Is it possible to get Pycharm to prompt for a scratch file name when making a new scratch file as opposed to having to rename the file after it's been made? This is purely for a smoother workflow experience and/or organization of my scratch…
Anup Jonchhe
  • 101
  • 1
  • 5
1
vote
1 answer

Is it possible to use templates when creating a scratch file in PyCharm?

I created a custom template file and I can use it from the "File"->"New..." menu option. But I was expecting to see it also when creating a new scratch file using "File"->"New Scratch File" Is this even possible? (I am using PyCharm 2017.1.2)
1
vote
1 answer

Import shortcut in IDEA Scratch files

I really like the possibility to write Java Scratch files with IntelliJ, what I don't understand, is why the auto import feature does not work? On a project's .java file, if I want to use something that is not imported, I write it's name, like…
szab.kel
  • 2,356
  • 5
  • 40
  • 74
1
2