English 中文(简体)
将用户- Made Java 类用于所有剪贴板工程
原标题:Making User-Made Java Classes Available To All Eclipse Projects

这让我有点不爽

做所有用户都需要做的事,应该是一个直截了当的、老练的程序,只是一个直截了当的程序。

I made the Java class I want to add to all new Java projects into a JAR file. And I got it into the JRE folder using Window > Prefs > Java > Installed JREs, etc. But come runtime, the Java interpreter just doesn t see this class as attached to my projects.

有谁知道这个傻瓜是怎么修好的吗?

我使用日圆3.6.2太阳和JRE7。

问题回答

JRE并非真正打算以这种方式扩展。 如果您必须将共享的图书馆存储在 JRE 中, 应该使用 < code> ext 文件夹, 而不是顶级 JRE 文件夹 。 但是, 即使这通常也是一种不良的做法 : < a href=" https://stackoverflow.com/ questions/20689661/is- putting- ext-jars- in- the-java- home-lib-ext- directory- a- bad-ting > 是否在 JAVA_HOME/lib/ext目录中放外罐是坏事? < / a > 。

要在您的 Eclipse 工程中添加依赖性, 请使用项目 s 构建路径。 要在运行时添加依赖性, 请使用 Java 类路径 。

我会创建一个用户图书馆, 并在项目设置中添加lib。 http://goo. gl/pEoto

考虑使用马文管理您的依赖关系 。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签