Skip to content

Tag: javac

What is the use of the “dup2_x2” instruction in JVM bytecode?

Java has a dup2_x2 instruction which, according to the documentation, has the following behavior: Duplicate the top one or two values on the operand stack and insert the duplicated values, in the original order, into the operand stack. Does javac produce bytecode with this instruction? What are its potential use cases? Answer For example, the following code compiles to See,

IntelliJ 2021.2.2 gives error ‘java: error: invalid source release: 18’ when compiling program

I’ve looked trough many answers here on so but haven’t found anything helpful. I am using java version 16.0.1 My program doesn’t use maven or gradle. The program worked fine until I updated my ij earlier today. Full error: Here are the files from .idea and the .iml file:!AoGu278qdPOWgm-D3ns61-gqA4Ts?e=OWg0NB Please tell if you need any more information (: Answer

Javac – plugin not found

I am trying to make my own Javac plugin but things aren’t going so well already 🙁 I am following this tutorial: and when I want to test the first …