Flerry 1.2.0 released!
I’m proud to announce Flerry 1.2.0, which brings following new features and changes:
- Java discovery process has been completely rewritten. Now it looks into default location on given operating system:
- Windows – c:\Windows\System32\javaw.exe (starting from version 6 this is the default Java location)
- Mac – /usr/bin/java if that doesn’t exist it checks /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
- Linux – /usr/bin/java if that doesn’t exist it checks /etc/alternatives/java
- In case any of these default locations fail it tries fallback mechanism, on Windows it is a native code compiled into FindJava.exe utility. This utility checks the registry on users machine and returns path to the location where java is installed. This was contributed by my colleague Serge Jespers; he used it for his Package Assistant Pro application. In case of Mac and Linux it uses native „/usr/bin/whereis java“ command to discover where Java is installed.
- The default location where to place jar files has been renamed to libs as it no longer contains only jar files. Now it also contains FindJava.exe utility. It can be customized by setting libsDirectory property on NativeObject class.
- Adding all jars under libsDirectory folder into the classpath automatically. Specifying it explicitly is no longer required.
- Compiled java code can be placed under classes folder. It is not required to package it into a jar anymore. This makes debugging and testing the application much easier.
- Out-of-the-box support for java code debugging. Flerry Getting Started (part 2) video tutorial covers how this can be used.
- Improved communication from AIR to Java, now it can support large objects transfer. This is due to object splitting into 256 bytes chunks.
- Added basic set of FlexUnit tests.
- Added Ant build script.
- Updated AMF serialization jars from BlazeDS 4.0.
- Removed reference between flerry and flerry-demo projects. Now flerry-demo is a standalone project referenced by flerry.swc.
This time kudos go to Jhonny Everson, Serge Jespers and Erko Bridee for their contributions and support.
Watch getting started video tutorials to get up to speed with Flerry.


Hi Piotr,
Thanks for Flerry, I think it is great and a job well done.
I was just wondering if there is a similar solution or if flerry can be adapted to be a bridge with Python as well.
Do you know of such projects?
regards,
Salim.
Salim
4 Aug 10 at 11:00 am
[...] disponibilizado ontem(03/08/2010) a nova versão da Lib Flerry, com um suporte melhorado para o uso do java e [...]
Flerry 1.2.0 disponível | Erko Bridee
4 Aug 10 at 2:29 pm
But there is already GraniteDS which joins Java SEAM framework or Spring with FLEX.
Why another?
philip andrew
5 Aug 10 at 9:47 am
Flerry is for use with AIR. GDS needs a container/application server to run.
Jhonny Everson
6 Aug 10 at 3:25 pm
Looks like a very useful project. Just out of interest…how did you manage to get it to run? I’ve tried the download using Flashbuilder 4.1 , and both Java 1.6 and 1.5 on OSX with only errors coming back from the serialization referring to bad class version. When I removed both the SWC and the flerry jar replacing them with the source from the download, I still get errors – this time relating to AMF3Output class not found. So I figured out that I need the amf-serializer that’s part of the flerry jar, and tried including that. Then I get the bad class version error again. do we need to compile the exadel component?
Would be great if you could tell me:
version of Flashbuilder plus the flex compiler version
version of java plus JRE version
Many thanks – good effort
andym
11 Aug 10 at 3:08 am
@andym where did you get the version with exadels amf-serializer? We had an idea to move to amf-serializer instead of BlazeDS jars and it is in branches folder but you shouldn’t use that. Use tags/flerry-1.2.0 or trunk instead.
Piotr
Piotr Walczyszyn
11 Aug 10 at 9:10 am
@piotr
yeah I tried – everything. When the basic flerry.jar (from trunk) was obviously the cause of the problem with bad class version messages, then I tried removing the flerry jar completely and trying to include bits of it in my source tree.
Basically that has not worked either. The bad class version thing has compeletely thrown me – it simply should not happen. I’ll try today with the BlazeDS source code and see if I get anywhere.
I’d love to see some very basic info (apart from videos) on the wiki – e.g. this version is known to work with Mac OSX 10.5.2, Java 1.6.xxx and Flex compiler v4.1.xxx
This simple step would save hours of people’s time.
Good job though – I’ve been working with accessing blazeDS via an embedded servlet container, which works fine…but this would obviously be better, if I could get a version that would run.
andym
11 Aug 10 at 11:10 am
I’m having problems as well, I’m on Flex 4.1.0 and when I make a call with flerry I get thrown:
Error: Error deserializing received AMF object: java.lang.NoClassDefFoundError: net/riaspace/flerry/NativeObject
This happens with the example code as well.
Dennis Doan
16 Aug 10 at 7:54 pm
What it means you don’t have flerry-1.2.0.jar file in your classpath. Please check if you have a libs folder with that file under your application directory.
p.
Piotr Walczyszyn
16 Aug 10 at 11:26 pm
Hi Piotr,
Any thoughts on my first comment :
I was just wondering if there is a similar solution or if flerry can be adapted to be a bridge with Python as well.
Do you know of such projects?
Salim
17 Aug 10 at 6:36 am
@Salim, I don’t know of any solution like that for Python but I think it should be simple to port it using the bits and pices from PyAMF (http://pyamf.org/) library. If you want to contribute and do the port I can guide you what should be extended on flerry in order to make it work with another language.
p.
Piotr Walczyszyn
17 Aug 10 at 10:39 pm
Hi Piotr,
This sounds great, I will investigate the pyamf.org and in the meantime if you would please guide me to extend flerry that would be great.
regards,
Salim.
Salim
22 Aug 10 at 6:02 am
Fed up with obtaining low amounts of useless visitors to your site? Well i want to inform you of a new underground tactic that produces myself $900 each day on 100% AUTOPILOT. I really could be here all day and going into detail but why dont you simply check their site out? There is really a great video that explains everything. So if your seriously interested in making simple hard cash this is the website for you. Auto Traffic Avalanche
Jenae Montone
31 Aug 10 at 2:43 am
Hi,
I´m Working with eclipse and flex plugin 4.1, and i can´t found with this error appear any time i test the project:
Error: Error deserializing received AMF object:
SIflex.messaging.messages.ErrorMessageheadersrootCause bodycorrelationIdfaultDetailfaultStringclientIdtimeToLivedestinationtimestampextendedDatafaultCodemessageId
kjava.lang.ClassNotFoundException: com.riaspace.myTest’com.riaspace.myTest
Ivan
4 Sep 10 at 5:09 am
The error is ClassNotFoundException, it means your compiled java classes are not in the classpath. You have to either put it as jar in libs folder or more convenient during debugging to put it into classes folder under bin-debug.
p.
Piotr Walczyszyn
6 Sep 10 at 9:29 am
Can someone tell me how do you deploy the application once it is complete, I try to deploy the flerry-demo-1.2.0 using the export release build, and changing the java build path from bin-debug to bin-release and the demo doesn’t work after it is install, any suggestion.
Jay
17 Sep 10 at 10:55 pm
Make sure that java classes are included in the install package.
p.
Piotr Walczyszyn
20 Sep 10 at 8:15 am
Fantastic library. I works like a champ in my Eclipse IDE, but fails when I create a release version (changed ouput to bin-release, created air install package). Running the app works fine until it tries to “flerry”. First native object call never returns. Then each call after I get a 1009 error. Neither result nor fault handlers are ever called.
All required jar files are in the libs directory that appears under the install dir (I even jar-ed up the classes dir an put that jar)… but no luck. Tried the flerry demo project, and got the same behavior. I’m running the latest version of Adobe Air, 2.5.1.
Any help appreciated. Cheers,
Joe
Piotr, have you ever been able to get a release version working?
Jokichi
11 Dec 10 at 9:41 am
Got it working.. I think I had a version mismatch of the Air runtime.. when I run using the eclipse version of “adl.exe” (to invoke the air app), it worked.
Jokichi
30 Dec 10 at 2:54 am
Hello Piotr Walczyszyn,
I am currently working on a project which requires the native object to be called very often, i.e more than once in a second.
Hence when i run the AIR file i’m getting error in deserializing the object. I guess this is due to the time to live period of the object, i.e i ask for servicing the object while one object is already being serviced…can u suggest me any remedy for enabling me to call the NativeObject more often?
Vichu
7 Jan 11 at 6:06 pm
@Vichu you may want to download the source code and try to add Thread.sleep(100) in sendMessage method on Java side. I know that this helped in such a extreme cases. This is not real solution but a workaround that may work for now. We are investigating new communication protocol that may resolve this kind of issues in the future.
p.
Piotr Walczyszyn
10 Jan 11 at 3:27 pm
I followed these videos exactly and it works perfectly while I am in Eclipse Flash Builder but once I publish it to an AIR file, the Alert does not pop up. Any ideas?
Wade
21 Jan 11 at 8:37 pm
I do not know if this example will work in Flash Builder, but I am using the Flash Builder Plug-in for Eclipse which can be downloaded under the Flash Builder trials on Adobe’s website.
Okay so for anyone who follows the videos exactly and has the demo working properly in Eclipse Flash Builder but it doesn’t work when you publish is probably frustrated like I was. You do NOT have to change the bin-debug to release as the Export Release Build will do that and delete the folder once it is done. When doing the Export Release Build, publish an EXE(or DMG for Mac) and NOT an AIR file and it should work for you. You must do this because the “Extended Desktop” profile(which this application is) requires the AIR application to be installed through a native installer(EXE for Windows/DMG for Mac).
Wade
25 Jan 11 at 3:26 pm
Modifying my previous post. I later discovered you do have to change the bin-debug to bin-release, but only for the Java build path.
Project -> Properties -> Java Build Path -> Default output folder: ProjectName/bin-release/classes
The Flex Build Path will remain bin-debug because Flash Builder will automatically publish the needed files to the bin-release folder. Remember to only change to bin-release when you are ready to create the EXE/DMG installer.
Wade
26 Jan 11 at 2:53 pm
~:’ I am really thankful to this topic because it really gives up to date information ,-,
Nipple Shield
28 Jan 11 at 9:43 pm
Hello,
Very helpful topic ! I just tried this and it worked well. However, I have a problem. I tried to use the flerry:nativeObject from within a Flex Component but it gave me the following error:
Error: Error #3219: The NativeProcess could not be started. ‘Not supported in current profile.’
How can we make Flerry work in Flex component ?
Please reply
Thanks in Advance
Farhan Khan
Farhan Khan
1 Feb 11 at 5:53 pm
Farhan Khan, Im not sure but it sounds like your problem is that you dont have the AIR application descriptor XML file set to extendedDesktop under the tag. It should read like this:
extendedDesktop desktop
From my understanding and testing, you need both extendedDesktop and desktop in that order. Hope that fixes the error.
Wade
9 Feb 11 at 9:08 pm
Just trying this out. I keep getting this error:
1046: Type was not found or was not a compile-time constant: NativeProcessStartupInfo.
Any thoughts.
Thanks.
Steve
14 Feb 11 at 9:40 pm
Helpful blog, saved your site for interest to read more information!
Mickey Letko
14 Feb 11 at 11:03 pm
This is a great page, and exactly what I needed. But I am having trouble getting the application find my java .jar files. Everything works if I put ALL the classes I need (including the ones from flex-messaging-common.jar and flex-messaging-core.jar) in the classes folder under bin-debug. Then the system seems to find all the java classes it needs. However, if I try to reference my .jar files by setting them up in the JavaBuild propery, the application cannot find them. How exactly do you set the CLASSPATH for an AIR application that is set up like this? I just cannot figure it out. Thanks!
Kent
18 Mar 11 at 1:59 pm
I was able to build an application in Eclipse that works great, but I am still confused about EXACTLY how to build/export my project so that others can install it. It is easy to build the “AIR” part of the project; that works just fine. But how do I build the “java” part of the project so the AIR part can make java calls? Do I need to use ADT, or take some manual steps? If somebody could give me a detailed description of exactly what I need to do to make this build, I would really appreciate it; thanks.
Kent
2 May 11 at 4:56 pm
I put a bunch of log statements in the code and I found out where the problem was. On my installed code, when I do a NativeProcess.isSupported check I find that it is set to FALSE, so that is the problem. But when I run it in Eclipse this is set to true. Has anybody ever gotten this to work on Windows 7? Is there some trick to getting the native process functionality to be supported?
Kent
4 May 11 at 4:01 pm
I figured out the problem, and I wanted to let others know about it. In order to allow your AIR install to access native objects (i.e., call your Java classes) you MUST use a native installer, which is built by the ADP application. The installer that is built in Eclipse does NOT support calls to native objects.
Kent
5 May 11 at 7:15 pm
Many thanks for the clear hands-on you provided with this vid.
I’m trying to use flerry in a pure AS project.
I can get it to talk to my java and receive objects etc. I created a NativeMethod and added it to the method array of my NativeObject, but it doesn’t seem to work.
The result always comes in the NativeObject ResultHandler and never in the NativeMethod resultHandler.
I couldn’t find documentation or a forum so i asked it here, hope you don’t mind
Regards,
Egbert
Egbert
16 May 11 at 9:51 am
I found the solution to the above problem.
The problem was that i added it to the method array as a numbered element. I had to add it to the method array with the method.name as identifier.
Example:
var no:NativeObject = new NativeObject();
[..]
var nm:NativeMethod = new NativeMethod();
nm.name = “someMethod”;
nm.addEventListener(ResultEvent.RESULT, customResultHandler);
no.methods[nm.name] = nm;
no.someMethode();
This works!
Egbert
16 May 11 at 10:22 am
[...] http://www.riaspace.com/2010/08/flerry-1-2-0-released/ http://www.riaspace.com/2010/08/nativeapplicationupdater-updater-for-air-apps-packaged-with-native-installers/ [...]
AIR + JAVA = Flerry » Bruno bg + ADOBE FLEX
15 Sep 11 at 4:16 am