| Newsgroups |
gmane.comp.web.freemarker.user |
| Message-ID |
<[email protected]> |
As far as I know, Dependency isn't introduced because freemarker need to support GUI, but because swing has some similar datastructure that the developer wanted.
Sudhir NimavatSenior software engineer.
Quick start global PVT LTD.
Baroda - 390007
Gujarat, India
Personally I'm always ready to learn, although I do not always like being taught
________________________________
From: Brian Pontarelli <[email protected]>
To: FreeMarker-user <[email protected]>
Cc: Daniel Dekany <[email protected]>
Sent: Mon, 28 December, 2009 12:46:12 AM
Subject: Re: [FreeMarker-user] Dependeny on javax.swing
Most linux distributions come with a headless JRE. I think that calls into some classes just nicely fail. I would expect that core FreeMarker would not need anything inside Swing or AWT that would have a GUI representation as it would fail on most headless Linux distros.
That being said, I would write my own data structure or provide a supplementary JAR for GUIs that need access to the AST. Seems like everything should be an interface within Freemarker and there can be a Swing implementation of the interface. I haven't looked at the code, but probably best to remove this dependency. Especially with modular Java coming in JDK 7 (if it ever ships), people will have the option to run the JRE and exclude Swing or AWT completely as they will be simply optional modules within the JRE.
-bp
On Dec 27, 2009, at 6:13 AM, Attila Szegedi wrote:
> Well, it will be a PITA for others too, not just FreeMarker users. I sent an e-mail to someone I know within Sun who's one of key Java figures. We are clearly not strong enough to get Google to do anything, but Sun is fairly strict about defending the Java trademark against abuse. Sun *can* get Google to fix this.
>
> Attila.
>
> On 2009.12.27., at 11:13, Daniel Dekany wrote:
>
>> I agree that what GAE provides isn't a JRE, but the important question
>> is if we want FreeMarker to run on GAE (imagine it as a new target if
>> you want), regardless if it can be called "Java" or not. And of course
>> we do since Google is a really big dog, right? Surely the whole issue
>> is a PITA to fix but... do you really belive Google will eventually
>> fix these? /-:
>>
>> --
>> Best regards,
>> Daniel Dekany
>>
>>
>> Friday, December 25, 2009, 6:03:50 PM, Attila Szegedi wrote:
>>
>>> Alright, FWIW here’s my opinion… I’m one of primary developers of
>>> FreeMarker, even if it wasn’t me who created the dependency.
>>>
>>> Jonathan (who introduced it) thought of it as the easiest way to
>>> expose template AST to IDE tooling. Also, note that there’s no
>>> standard tree representation API in java.util.* and
>>> javax.swing.tree.* is the closest to it; lots of classes and
>>> interfaces in it are applicable to any tree data representation, not
>>> just ones suitable for a GUI. As Sun mandates the presence of
>>> “javax.swing” package in every SE runtime engine that wishes to use
>>> the name “Java” it didn’t seem to be a problem.
>>>
>>> Anyway, GAE is not a “Java Runtime Environment, Standard Edition”
>>> if it doesn’t have javax.swing.*. I just sent an e-mail to some of
>>> my contacts at Sun to clarify the matters, and maybe contact the
>>> Google to either stop using the “Java” trademark, or alternatively get their JRE right.
>>>
>>> Google’s decision to not include this package/classes into its App
>>> Engine makes that runtime environment into not being a JRE.
>>> FreeMarker is developed for running on a JRE.
>>>
>>> GAE has other problems as well. I.e. it interjects its own
>>> reflection replacement classes defined in the
>>> “com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect”
>>> package, that unfortunately run with less privileges than the real
>>> “java.lang.reflect” package, so when we use them to, say,
>>> reflectively invoke package-private constructors from within the
>>> same package – something that works nicely in a real JRE – GAE will
>>> throw an exception, since classes in package
>>> “com.google.apphosting.runtime.security.shared.intercept.java.lang.reflect”
>>> have no access to our package private constructor – the classes in
>>> “java.lang.reflect” of course don’t have this limitation as they are subject to no access control.
>>>
>>> I consider all of these to be JRE compliance bugs in the GAE
>>> implementation of the Java-like runtime.
>>>
>>> As I said, I fired off an e-mail to Sun so that they can
>>> investigate whether Google can use the name "Java" for what they
>>> provide in GAE. FreeMarker is made to run in a compliant Java Runtime Environment.
>>>
>>> Attila.
>>>
>>> On 2009.12.25., at 17:02, [email protected] wrote:
>>>
>>>> See this
>>>>
>>>> http://solveme.wordpress.com/2009/12/25/freemarker-sucks-it-has-dependency-on-javax-swing/
>>>>
>>>> Devs, will this be fixed ?
>>>>
>>>> Thanks
>>>> SN
>>>>
>>>> Personally I'm always ready to learn, although I do not always like being taught
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user