Good afternoon, I'm trying to change the icon in the jar file. For this I use this design
public class Main extends JFrame { public static void main(String[] args){ Main.setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getClassLoader().getResource("src/resources/imagesi/mylogo.png"))); } but for some reason it constantly underlines with red this. and writes
Can not use this in a static context