【发布时间】:2011-02-12 18:45:21
【问题描述】:
我想在我的摇摆应用程序中使用一些第三方主题(例如 synthena http://www.javasoft.de/synthetica/themes/)。我正在使用eclipse ide,获取了主题的jar文件并在我的代码中进行了以下修改(根据主题的自述文件)
try
{
UIManager.setLookAndFeel(new SyntheticaBlackMoonLookAndFeel());
}
catch (Exception e)
{
e.printStackTrace();
}
但修改后显示如下错误
The type de.javasoft.plaf.synthetica.SyntheticaLookAndFeel cannot be resolved. It is indirectly referenced from required .class files
这是什么意思?我尝试在网上搜索,但找不到任何有用的答案
Readme 文件的内容:
System Requirements
===================
Java SE 5 (JRE 1.5.0) or above
Synthetica V2.2.0 or above
Integration
===========
1. Ensure that your classpath contains all Synthetica libraries (including
Synthetica's core library 'synthetica.jar').
2. Enable the Synthetica Look and Feel at startup time in your application:
import de.javasoft.plaf.synthetica.SyntheticaBlackMoonLookAndFeel;
try
{
UIManager.setLookAndFeel(new SyntheticaBlackMoonLookAndFeel());
}
catch (Exception e)
{
e.printStackTrace();
}
【问题讨论】:
-
您是否将 jar 文件添加到您的类路径中? :)
-
是的,我将它添加到我所有编译的类文件都存在的位置
-
但是你把它添加到类路径了吗?
-
是的,我做到了,但同样的错误。我使用此链接中的步骤来做到这一点wikihow.com/…