Thank you i just solved the issue by
installing a new version of the jdk from oracle
Added a new java platform to my netbeans which is the new java 1.8 i just installed
Setup my java FX
and configured my codenameone project to use the new platform i added instead of the java1.7 it was using by default
It works perfectly now.
Thanks again