There could be any number of issues to watch out for. Here's a few that just come to the top of my head:
- Flash Player restrictions that do not exist in the JVM, such as the ability to reach "outside" of the Player's bounds rectangle (and myriad others).
- ActionScript 3 has no equivalent of java.lang.reflect.Proxy, unfortunately. This means that (so far) there are no decent mock object frameworks, and limitations with respect to reflection in general.
- I am not aware of any AOP capabilities on the order of what you will find in Java.
- Whether or not the Java application is using libraries that have no equivalent in Flex and which you do not wish to write yourself.
- Java applications can call out to native code with the JNI, whereas this is not yet possible with the Flash Player.
Even if by "Flex" you include the Adobe AIR platform, the environment tends to be much more restricted in general than the JVM. However, don't let that discourage you - you get a lot of benefits from using Flex, such as an ubiquitous runtime, a great language and component development framework, etc. If your Java desktop application is an RIA, then Flex is probably a good candidate for a port.