I'm trying to create a wrapper for a java application (kmttg). I need to have the application jar file and helper files/scripts in /usr/share/kmttg.
I've tried:
%jpackage_script com.tivo.kmttg.main.kmttg '-Djava.net.preferIPv4Stack=true' '-Xmx256m' Chart2D:jmdns:swingx:%{_datadir}/%{name}/%{name}.jar %{name} true
But that doesn't work because build-classpath can't handle full paths to jars. Is their a better way to achieve this? The application appears to look for its helper files in the directory relative to its jar file. I suppose I could install into /usr/share/java/kmttg, but that doesn't feel quite right.
On 12/10/2012 12:53 AM, Orion Poplawski wrote:
I'm trying to create a wrapper for a java application (kmttg). I need to have the application jar file and helper files/scripts in /usr/share/kmttg.
I've tried:
%jpackage_script com.tivo.kmttg.main.kmttg '-Djava.net.preferIPv4Stack=true' '-Xmx256m' Chart2D:jmdns:swingx:%{_datadir}/%{name}/%{name}.jar %{name} true
But that doesn't work because build-classpath can't handle full paths to jars. Is their a better way to achieve this? The application appears to look for its helper files in the directory relative to its jar file. I suppose I could install into /usr/share/java/kmttg, but that doesn't feel quite right.
Jut put the jars in %{_javadir} as they should be. Is there something preventing this?
You can keep the other files in %{_datadir}/%{name} like you have them (this seems correct to me).
If you want to mimic the upstream layout, just symlink the jars from %{_javadir} into %{_datadir}/%{name}. Of course, the script will use the ones in %{_javadir} to setup the classpath, but that should not be a problem.
On 12/09/2012 10:58 PM, David Walluck wrote:
On 12/10/2012 12:53 AM, Orion Poplawski wrote:
I'm trying to create a wrapper for a java application (kmttg). I need to have the application jar file and helper files/scripts in /usr/share/kmttg.
I've tried:
%jpackage_script com.tivo.kmttg.main.kmttg '-Djava.net.preferIPv4Stack=true' '-Xmx256m' Chart2D:jmdns:swingx:%{_datadir}/%{name}/%{name}.jar %{name} true
But that doesn't work because build-classpath can't handle full paths to jars. Is their a better way to achieve this? The application appears to look for its helper files in the directory relative to its jar file. I suppose I could install into /usr/share/java/kmttg, but that doesn't feel quite right.
Jut put the jars in %{_javadir} as they should be. Is there something preventing this?
Yes. The application expects to find all of its helper files in the same directory as the jar file. It also expects to be able to write to this directory, which I'm going to have to fix. So perhaps I'll just have to fix this in the code or some other way.
You can keep the other files in %{_datadir}/%{name} like you have them (this seems correct to me).
If you want to mimic the upstream layout, just symlink the jars from %{_javadir} into %{_datadir}/%{name}. Of course, the script will use the ones in %{_javadir} to setup the classpath, but that should not be a problem.
-- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel
java-devel@lists.fedoraproject.org