[英]How to use a compiled class in Intellij
I am wondering how to use an existing .class file in my Java Intellij project. 我想知道如何在Java Intellij项目中使用现有的.class文件。 How do you include an existing class in a project? 您如何在项目中包括现有课程? I don't have the .java file, just the .class file. 我没有.java文件,只有.class文件。 IntelliJ lets me paste in the package containing the .class file, but acts as if there is nothing in the package. IntelliJ让我粘贴到包含.class文件的软件包中,但是好像软件包中什么都没有。
I've used existing classes in my projects before by compiling from the command line, but I would like to know how to do it in Intellij. 在通过命令行进行编译之前,我已经在项目中使用了现有的类,但是我想知道如何在Intellij中进行操作。
您可以将此.class文件包含在类路径中,也可以将其添加到项目的依赖项中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.