Java 实例 - 如何执行指定class文件目录(classpath)

Java 教程 · 2019-02-10 05:56:50

如果我们 Java 编译后的class文件不在当前目录,我们可以使用 -classpath 来指定class文件目录:

C:> java -classpath C:\java\DemoClasses HelloWorld

以上命令中我们使用了 -classpath 参数指定了 HelloWorld 的 class 文件所在目录。

如果class文件在jar文件中,则命令如下:

c:> java -classpath C:\java\myclasses.jar

点击查看所有 Java 教程 文章: https://codercto.com/courses/l/12.html

查看所有标签

Visual Thinking

Visual Thinking

Colin Ware / Morgan Kaufmann / 2008-4-18 / USD 49.95

Increasingly, designers need to present information in ways that aid their audiences thinking process. Fortunately, results from the relatively new science of human visual perception provide valuable ......一起来看看 《Visual Thinking》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

SHA 加密
SHA 加密

SHA 加密工具

html转js在线工具
html转js在线工具

html转js在线工具