Running your code

Run executes the file you have open, not a fixed entry point. Here is when that changes, and what the stored entry is still for.

View as .md

Press Run and Revquix executes the file you are looking at. Not a fixed entry point chosen when the project was created - whatever is open in the editor right now.

This surprises people who expect the usual behaviour, so it is worth saying plainly: if you open TwoSum.java and hit Run, it runs TwoSum.java. Open MergeSort.java, hit Run, and it runs that. You do not have to tell the project which file matters.

Why it works this way#

A project is usually a folder of independent programs - a set of DSA solutions, each with its own main, each meant to be run on its own.

Pinning a single entry point would mean every one of those runs Main.java, and the only way to run the file in front of you would be a trip to the file tree's context menu before every single run. That is not a preference setting; it is the feature not working.

When Run falls back to the stored entry#

Every project keeps a stored entry file, marked in the file tree. Run uses it in two situations:

  1. Nothing is open. Running from a project list row, where there is no editor and therefore no open file.

  2. The open file is not runnable. A header, a README, a .json fixture, a stylesheet - Run falls back to the entry rather than refusing.

Both files stay visible: the stored entry is marked in the tree, so you can always see which file Run would fall back to.

What counts as "runnable"#

The extension, and only the extension. The list of runnable extensions comes from the server per project type, so it is one table rather than a rule duplicated in the editor.

Web projects are the exception#

A Web project has no Run button at all - the preview pane renders it live, and the preview is the run. Following the open file there was a real bug rather than a feature, and web projects and preview covers why.

Changing the stored entry#

Right-click any runnable file in the file tree and set it as the entry. It changes the fallback - what runs when nothing relevant is open - and never overrides the file you currently have open.

When a run is refused#

A run can be rejected before it starts. The two you are most likely to meet:

  • A file is over the run ceiling. A file can be stored at up to 100 KiB but only run at 64 KiB, and the message names the file. See project limits.
  • The runner is unavailable. The sandbox is a separate service and can be down. Nothing is lost and your files are untouched.

When something goes wrong lists the rest.

Was this page helpful?

Last checked against the product on . Behaviour changes are listed in the changelog.