Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我学习java已经有一段时间了,我还是个新手。我写了一些对我非常有用的类,我想知道是否有任何方法可以在其他项目中使用它们的方法。任何帮助将不胜感激。
更新
我创建了 jar 文件,但我无法导入它。我读了这个,但由于某种原因它没有用。我用日食
规范的方法是将这些类放在一个 jar 文件中,并将其包含在您的其他项目中。
考虑以下创建 XML 文档并显示它的简单代码。
XmlDocument xml = new XmlDocument(); XmlElement root = xml.CreateElement("root"); xml.AppendChild(root); XmlComment comment = xml.CreateComment("Co