最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - Cannot find an exist class in IDEA 2024.1.4 - Stack Overflow

programmeradmin4浏览0评论

A JAR introduced via POM can also be seen in the external library.

    <dependency>
        <groupId>com.formdev</groupId>
        <artifactId>flatlaf-extras</artifactId>
        <version>3.5.2</version>
    </dependency>

    <dependency>
        <groupId>com.formdev</groupId>
        <artifactId>flatlaf-intellij-themes</artifactId>
        <version>3.5.2</version>
    </dependency>

Usage:

import com.master.frank.projects.ascatch.Application;   
import com.master.frank.projects.ascatch.ui.Init;  
import com.master.frank.projects.ascatch.uiponent.TopMenuBar;   
import com.master.frank.projects.ascatch.ui.form.LoadingForm;   
import com.master.frank.projects.ascatch.ui.form.MainWindow;   
import com.master.frank.projects.ascatch.ui.listener.FrameListener;   
import com.master.frank.projects.ascatch.util.ComponentUtil;   
import com.master.frank.projects.ascatch.util.SystemUtil;   
import com.master.frank.projects.ascatch.util.UpgradeUtil;   
import com.formdev.flatlaf.extras.FlatSVGUtils;    
***import com.formdev.flatlaf.util.SystemInfo;*    //This line shows a prompt indicating that the referenced class cannot be found in IDEA 2024.**    
import com.master.frank.projects.ascatch.ui.UiConsts;   

import javax.swing.*;
import java.awt.*;

/**
 * Main Frame
 *
 * @author
 * @since 2024/12/28.
 */
public class MainFrame extends JFrame {
    private JPanel loadingPanel;
    public void beforeLogin() {
        this.setName(UiConsts.APP_NAME);
        this.setTitle(UiConsts.APP_NAME);
//        FrameUtil.setFrameIcon(this);
        setIconImages(FlatSVGUtils.createWindowIconImages("/icons/asyun.svg"));
        TopMenuBar topMenuBar = TopMenuBar.getInstance();
        topMenuBar.init();
        setJMenuBar(topMenuBar);
        ComponentUtil.setPreferSizeAndLocateToCenter(this, 0.6, 0.8);

        if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
            this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
            this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
            this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
            this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
        }

        FrameListener.addListeners();

        loadingPanel = new LoadingForm().getLoadingPanel();
        add(loadingPanel);
        pack();
        setVisible(false);
    }
}

However, in the normally imported classes, the SystemInfo class always prompts as not found.

This phenomenon in the project only occurred on two specific computers, while it was normal on other computers. I have also tried the following methods to solve this problem, but none of them worked:

  1. Invalidate Caches.
  2. Repair IDE.
  3. Clean Project and Rebuild.
  4. Clean Maven and Reinstall.
  5. Remove IDEA 2024 and Re - install.

All tries don't work. Thank you in advance for your help.

The capture is attached below:

发布评论

评论列表(0)

  1. 暂无评论