简体   繁体   English

Eclipse-导入中的我自己的类?

[英]Eclipse - My Own Classes in the Imports?

I have a few classes that I want to use in many applications, so my question is quite straightforward: 我有几个要在许多应用程序中使用的类,所以我的问题很简单:

Q: How can I add my own classes to Eclipse (or to the JDK?) and have them easily / automatically imported like the default Java Libraries? 问:如何将自己的类添加到Eclipse(或JDK?),并像默认的Java库一样轻松/自动地将它们导入?

Thanks in advance. 提前致谢。

您可以使用JAR实用工具打包这些classes (.class文件),然后将该.jar文件(例如sample.jar)添加到您的项目中(Properties + Java Build Path + Add External JARS).

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM