簡體   English   中英

當我試圖通過“javac”命令編譯一個file.java時,它給了我“找不到文件”錯誤,雖然我已經完成了JDK的路徑和變量

[英]When I am trying to compile a file.java by “javac” command, it gives me “file not found” error, though I have done the path and variable of JDK

這正是出現的情況:

C:\Users\Ammar\Desktop>javac Saad.java

error: file not found: Saad.java

Usage: javac <options> <source files>

use --help for a list of possible options

1-確保您與存儲文件 Saad.java 的路徑相同(您可以使用 dir 命令檢查文件是否存在於當前路徑中)。

2-檢查大小寫(完全按照保存的方式寫)。

我做到了,Yahooooooooooooooooooooooooooooooooooooooooooooooooo!!!!!!!!!

問題是我將我的電腦鏈接到我的 One Drive 帳戶,One Drive 與我的桌面同步並將其路徑更改為 (C:\Users\Ammar\One drive\Desktop。一旦我停止同步,路徑就會返回正常情況下,我找到了我的文件並編譯了它。感謝我的努力.!!!!!! 哈哈哈哈哈希望它可以幫助任何人。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM