[英]Compiling error while compiling two java files in the same package that use each other
[英]Compiling 3 files not in the same package
我有3個* .Java文件。 這三個中的兩個具有語句package com.osama.temp
,而主類則沒有此語句。 它僅導入其他2個類,例如import com.osama.temp.List
。
我不知道如何使用命令行控制台進行編譯..請幫助!
在主類所在的目錄中,創建一個子目錄結構(如com/osama/temp/
,然后在其中放置其他2個.java文件。 然后,您應該可以使用javac Main.java
進行編譯
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.