Java technology can be used to create both client- and server-side applications. While the server-side implementation is widely accepted, the browser-based client-side applications have been less successful because the file sizes are large and the installation is cumbersome. Flex is a great solution for Java developers because it enables them to utilize the power of Java servers while creating expressive and interactive interfaces with a technology that has almost 100% deployment in browsers.
Java is a virtual machine that can be used to create platform-independent software. Software created in Java can run on any hardware that supports the Java Virtual Machine.
In web development, Java can be used as either a client-side or server-side programming language.
When Java is used on the client side, we're generally talking about Applets, which can run on a browser with Java support.
When Java is used on the server side, we're probably thinking JSP or [???] to create framework-based web applications or to create web services.
How does it compare to Flex?
Java Applets, with their ability to run inside a browser window, are similar to Flex applications. Flex apps, however, are much easier to deploy through the lightweight easy-to-install Flash Player.
Server-side Java can be used to create web services for consumption by a Flex application
The Java language is commonly used with the enterprise edition of the Java platform on the server-side to create the application logic, or "business tier" for multi-tiered applications. The business tier can use various Java technologies to connect to the data tier. And, while you can use Java technologies to write the client-tier, Flex allows you to create more dynamic, interactive, and compelling clients that are viewable on more computers thanks to Flash Player.
The Java language is commonly used with the enterprise edition of the Java platform on the server-side to create the application logic, or "business tier" for multi-tiered applications. The business tier can use various Java technologies to connect to the data tier. And, while you can use Java technologies to write the client-tier, Flex allows you to create more dynamic, interactive, and compelling clients that are viewable on more computers thanks to Flash Player.