Reputation: 23
I am new to libgdx, i want to develop an application with libgdx, and supports for all libgdx target platforms(Windows, Linux, Android, iOS...), what classes in Java SE can i use?
I tested with javax.swing.JFrame, and ClassNotFoundException is thrown in Android platform! so, how do I make sure which classes in Java SE is supported for all libgdx target platforms?
Upvotes: 0
Views: 41
Reputation: 38
Java SE is mainly for desktop applications (Windows + Linux) and there you can use everything from SE and it will work if the version of Java is correct.
With other platforms it is a little bit more complicated and specific because android for example can not provide all functionality which Windows can (JFrame, ...). For android there is an API reference and there you can find all packages you can use on android (again, be aware of different API verions).
Libgdx on web browsers uses GWT. Again, you can find available packages for GWT here.
I have no experience with iOS but I am sure you will find somewhere which packages are available on this platform.
If you are creating just a small game, I do not think you will need everything from SE and commonly used classes are often available on every platform. Do not care much about this unless you need something specific which is not available on every platform. (JFrame can be replaced with e.g. Activity on android, but if you want your game to be truly platform independent, then use only classes from libgdx)
Upvotes: 1