在我的java项目中,我使用了look n feel jar文件。
try {
UIManager.setLookAndFeel("de.javasoft.plaf.synthetica.SyntheticaBlackEyeLookAndFeel");
} catch (Exception ex) {
}因此,当我为我的项目创建jar文件时,它会生成jar和一个包含那些look n feel jar的lib文件夹。当我将这两个文件夹复制到新位置时,它工作得很好
但当我只复制jar时,它会以默认的外观和感觉方式打开
有没有办法解决这个问题?
发布于 2014-03-29 02:21:23
检查您的build.xml文件--您可能需要编辑build.xml文件以将这些JAR文件合并到您的JAR中。
<!-- Change the value of this property to be the name of your JAR,
minus the .jar extension. It should not have spaces.
<property name="store.jar.name" value="MyJarName"/>
-->
<property name="SOR.jar.name" value="MarsRoverViewer"/>
<!-- don't edit below this line -->
<property name="store.dir" value="store"/>
<property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/>
<echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/>
<delete dir="${store.dir}"/>
<mkdir dir="${store.dir}"/>
<jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip">
<zipgroupfileset dir="dist" includes="*.jar"/>
<zipgroupfileset dir="dist/lib" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
<zip destfile="${store.jar}">
<zipfileset src="${store.dir}/temp_final.jar"
excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
</zip>
<delete file="${store.dir}/temp_final.jar"/>
</target>https://stackoverflow.com/questions/22720124
复制相似问题