在IntelliJ Java Project中引用.class文件 [英] Referencing a .class file in IntelliJ Java Project

查看:178
本文介绍了在IntelliJ Java Project中引用.class文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用IntelliJ。我需要从我下载的类文件中调用一个函数,所以我需要在我的项目中引用一个.class文件。无法弄清楚如何将其添加到我的项目中。如果有人可以指导我,我将不胜感激。

I just started playing around with IntelliJ. I need to call a function from a class file I downloaded, so I need to reference a .class file in my project. Can't figure out how to add it to my project. Would appreciate it if someone could guide me.

推荐答案

在项目结构对话框的依赖关系选项卡上,您可以添加类路径类文件的根目录。当然,类文件必须位于与类的包对应的正确目录结构中,否则它将无法工作。

On the "Dependencies" tab of the project structure dialog you can add the classpath root directory of your class file. Of course the class file has to be in the right directory structure corresponding to the package of the class, otherwise it will not work.

这篇关于在IntelliJ Java Project中引用.class文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆