Java file outside of source root intelliJ

I have cloned a spring boot project from GitLab having multiple branches in IntelliJ. I checkout to the branch in which I want to work. But I am getting “Java file outside of source root” on …

Intellij Turning Characters into actual Symbols

I noticed with the new IntelliJ update, that it turns symbols like >= into the actual math greater than or equal to sign, along with arrows (->) and things like that. How do i turn this feature …

How to hide variables from Java’s JDI?

I am instrumenting some classes and introducing some new local variables. Now, when the user places a breakpoint in the code, and execution is stopped, the newly introduced local variables can be seen …

Hide “var” type preview in new IntelliJ 2020.2

I just updated to IntelliJ 2020.2 and while some things are good some thing are bad.. When using the Java var feature IntelliJ now shows the type of it right next to the variable name which is …

How can I import a custom package in IntelliJ IDEA (Java)?

There is such term like CLASSPATH which is using that JVM could find custom classes or jar files to import them to another packages (Am I right?). So, I created a few custom classes and placed them …

Error calling method using same data (new data is always generated)

I have the following problem to be solved, could you help me? I have two methods in a class. The first generates a document (calling another class) and stores it in a string. The second one I want to …

parameterized test constructor of junit java error message: Test class should have exactly one public zero-argument constructor

I can really use some help with this parameterized test case I am trying to create. No matter what kind of constructor I create the IDE gives an error message. Here is my code: @RunWith(Parameterized….

Function “onButtonClicked” is never use

I have created a function called “onButtonClicked” and I want the button (bt301_tw) to send me to the activity (MainActivity_04_ReadioGroup). The problem is when I create the function …

package javafx.util does not exist?

I am using openjdk version “1.8.0_252” and I also separately install the javafx and currently the version is javafx.version=11.0.2-internal. I have added the javafx lib path in the intellij. …

Junit test of a class requires objects of other classes

I have a class defined as such: public class Monster { public static final int ARENA_SIZE = 480; public int health; //can be negative since it will then be removed public int speed; …