简体   繁体   中英

I cannot run the code with external jar in Terminal but I can run it in any IDE

So I am new to the java.

I have these external two jar files. I properly imported them into my IDE: exclips. When I use the IDE the code, it is running and using the external jars. However, when I am trying to use the terminal of MAC, it is giving a mistake of no two jars like this

testten.java:3: error: package stdlib does not exist import

In my IDE the testten.java is running and I have the testten.class. but in Terminal

How can I solve it ??

Try exporting the program as a runnable jar file. Then on PC navigate to the location of the jar file in CMD and type "java -jar {Name of jar file}.jar". On a mac navigate to the location of the file in Terminal and type "java -jar {Name of jar file}.jar".
Hope this helps :)
if the issue continuous try checking out this: Java Test package does not exist

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