I have been using fantom for about a year. It's just great.I have made some projects (web, database access) using Fantom.
I made a simple app that I want to distribute as a jar.I used JarDist but I get an error because my main method has arguments.
I checked JarDist code and obviously when main has arguments an exception is thrown.
Is there any way to use JarDist with arguments???
Thanks in advance, Panagiotis
brianSun 17 Apr 2011
Hi Pani83,
The simplest work around is to just get your args from sys::Env.arg - they will be available there.
I can take a look at beefing up JarDist task, in the meantime you can probably hack up your own build script to fix it pretty easily. The code is here.
Pani83Sun 17 Apr 2011
Hi Brian,
I had made it using sys::Env.arg, I just asked if there is another way.
I will try to make my own build script.
Thanks for your quick reply!
brianTue 15 Nov 2011
Renamed from JarDist - main having params to JarDist - support for main(Str[]) params
Pani83 Sun 17 Apr 2011
Hello guys,
I have been using fantom for about a year. It's just great.I have made some projects (web, database access) using Fantom.
I made a simple app that I want to distribute as a jar.I used JarDist but I get an error because my main method has arguments.
I checked JarDist code and obviously when main has arguments an exception is thrown.
Is there any way to use JarDist with arguments???
Thanks in advance, Panagiotis
brian Sun 17 Apr 2011
Hi Pani83,
The simplest work around is to just get your args from sys::Env.arg - they will be available there.
I can take a look at beefing up JarDist task, in the meantime you can probably hack up your own build script to fix it pretty easily. The code is here.
Pani83 Sun 17 Apr 2011
Hi Brian,
I had made it using sys::Env.arg, I just asked if there is another way.
I will try to make my own build script.
Thanks for your quick reply!
brian Tue 15 Nov 2011
Renamed from JarDist - main having params to JarDist - support for main(Str[]) params
brian Tue 15 Nov 2011
Promoted to ticket #1494 and assigned to brian
brian Tue 15 Nov 2011
Ticket resolved in 1.0.61