简体   繁体   中英

Can't run any application with Intellij IDEA

I used to work with Intellij IDEA and at a certain moment something happened that i can't run any application anymore. The problem is that buttons 'Run' and 'Debug' (the ones that are called with Shift+F10 and Shift+F9) are inactive -

在此处观看屏幕截图 .

There are also another pair of this buttons, that are called with Alt+Shift+F10(F9), but after i click on them, i get this -

屏幕截图 .

I tried to reinstall IDE, but that didn't help. Here the code of the application i'm trying to run, though it doesn't work with any application.

PS I'd like to add also a screenshot of the project structure, but i can't post more that 2 links, so i just do this way:

>untitled
  >idea
  >out
  >src
    >(C) WallyFinder
  untitled1.iml
>External Libraries

The code:

import java.util.regex.Pattern;
import java.util.regex.Matcher;

public class WallyFinder {

    public static int wheresWally(String str) {
        Matcher m = Pattern.compile(" Wally\\b").matcher(" " + str);
        return m.find() ? m.start() : -1;
    }

public static void main(String args){
    int a = WallyFinder.wheresWally("aaaaWally");
    System.out.println(a);
}
}

The directory structure is wrong I think. It should be like this

>untitled
  >idea
  >out
  >src
    >main
       >java
         >(C) WallyFinder
  untitled1.iml
>External Libraries

Can you please try this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM