IntelliJ — Where is the “New Class” Button?

Batuhan Kök
Oct 12, 2021

--

You have created a new project or opened an existing project…

You want to create a new Kotlin or Java class…

You right-click on a package as always…

However, there is no “New Java Class” or “New Kotlin Class” option…

Let’s Fix This

  1. Go to root package/folder of your project.
  2. Right-click on it.
  3. Select “Mark Directory as” → “Sources Root”
  4. Now, you can create a new classes as you want.
How to mark directory as “sources root” on IntelliJ

Have a great day 👋

--

--

Batuhan Kök
Batuhan Kök

Written by Batuhan Kök

full-stack developer @luxoft • web3/smart-contract

No responses yet