[英]Unable to create new Java class in new package on IntelliJ Idea?
[英]How to Build a package with a mix of .java and .class in it in IntelliJ IDEA?
我手上的包只包含 3 個主要 .java 類中的一部分,其余的已經在 .class 文件中預編譯。 當我嘗試編譯它時,IntelliJ IDEA 說它找不到定義,盡管它們顯然在那里。 我該怎么辦?
❯ tree
.
├── cryptoman.iml
├── pom.xml
├── src
│ └── main
│ ├── java (marked as sources)
│ │ └── kanni
│ │ └── grand
│ │ ├── Main.java
│ │ ├── Smthing1.java
│ │ ├── Smthing2.java
│ │ ├── ...
│ │ ├── SendInChanelF.class
│ │ ├── SendMessage.class
│ │ ├── dataUsl.class
│ │ ├── dataVar.class
│ │ ├── db.class
│ │ ├── s40data.class
│ │ └── wAlgo.class
│ └── resources (marked as resources)
│ ├── ...
│ └── ...
└── target
7 directories, 27 files
按原樣編輯我有兩個問題。
1) 在 Main.java 類中,IDE 在例如static SendInChanelF si1;
處大喊“無法解析符號” static SendInChanelF si1;
.
2)試圖編譯它說'java:找不到符號' SendInChanelF
好的。 搜索論壇后,我嘗試將 .class 文件放在不同的文件夾中並將其標記為依賴File -> Project Structure -> modules -> Dependencies -> Add -> JARS or Directory -> Choose the directory
1) 現在在 Main.java 類 IDE 中解析 SendInChanelF。
2)但編譯器仍然拒絕編譯。
試圖使緩存/重啟無效。 沒有幫助 =) 為了防止你不喜歡,遺憾的是我不能使用源代碼。
我通過反編譯源解決了它。 關閉。 謝謝!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.