Added flex and java code