Re: building new tuxguitar with maven

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25 January 2016 at 04:13, Michael Šimáček  wrote:
>
> On 2016-01-25 10:08, Orcan Ogetbil wrote:
>>
>> On 25 January 2016 at 03:40, Michael Šimáček  wrote:
>>>
>>> On 2016-01-24 03:15, Orcan Ogetbil wrote:
>>>>
>>>>
>>>> 2- When the package is built with %mvn_build and installed with
>>>> %mvn_install the jar files get installed into
>>>> /usr/share/java/tuxguitar/. But looking at the launcher script, the
>>>> application expects the jar files to be in /usr/share/tuxguitar/. Is
>>>> there a way to tell maven to install the jar files there instead
>>>> (these are application jars, not shared libraries) ?
>>>>
>>>
>>> There is, but since the launcher script doesn't do much more than finding
>>> system Java, I would suggest not using upstream launcher script, but
>>> generating your own with %jpackage_script, which should look for stuff in
>>> the right directories.
>>> See:
>>>
>>> https://fedorahosted.org/released/javapackages/doc/#_generating_application_shell_scripts
>>>
>>
>> Great. I can certainly give that a shot. How do I tell
>> %jpackage_script that I want to pass some additional flags to java,
>> such as -Xmx512m ?
>>
>
> The second argument of %jpackage_script should be flags for JVM.

Thanks, the documentation for the %jpackage_utils seems quite minimal :)
I tried various combinations, such as

   %jpackage_script org.herac.tuxguitar.app.TGMain "-Xmx512m" ""
swt:tuxguitar tuxguitar true
   %jpackage_script org.herac.tuxguitar.app.TGMain "-Xmx512m" ""
tuxguitar tuxguitar true
or plain simple
   %jpackage_script org.herac.tuxguitar.app.TGMain "" "" tuxguitar
tuxguitar true

They all fail with
   Exception in thread "main" java.lang.NoSuchMethodError:
org.herac.tuxguitar.app.TuxGuitar.getInstance()Lorg/herac/tuxguitar/app/TuxGuitar;
       at org.herac.tuxguitar.app.TGMain.main(TGMain.java:13)

The entry point is correct. The original launcher script uses it, and
I verified that there is a TGMain class with a 'public static void
main(String[] args)' member.
What could be wrong?

Other than this, the original script loads the default .tg file if no
argument is given to the launcher, i.e.

    local arg=""
   [ -z "$1" ] && arg="/usr/share/tuxguitar/tuxguitar.tg"
   ...
   ${JAVA} ${JAVA_FLAGS} ${PACKAGE_MAIN} $arg "$@"

Can we achieve the same with %jpackage_script?

Orcan
--
java-devel mailing list
java-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/java-devel




[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux