I have developed a standard Java J2SE desktop application. I would like to know that how can i convert my java application into an android or Windows 10 app easily without major rewriting of code.
It will always depends what kind of application you want to convert. The visual skeleton have to be recoded because you can not use Swing in the same way.
Methods could be readapted without not so much problems, but you will need to adapt some sentences of your code that are different in Android
Short answer anything you use in the Android SDK that is common to J2SE its direct code.
However note that some of Java 7 and 8 features are not availble.
The graphical part you will have to recode in OpenGLES using an IDE compatible with Android SDK, e.g., Android Studio or you can try using NBAndroid and adapt your code in Netbeans. Note that NBAndroid is no longer being supported so in the long run the project not the app might not work.
Thansk for your reply guys, Ok, So my Application is Swing based simple desktop app, now to convert it into Andriod I will need to recode the GUI parts and can use the standard JAVA IO code. how about other java API like UTIL package classes, hashtable structure, IO operation of reading data from bean classes, do all those have to be recoded or would they work with Andriod studio.
Basically, Swing won't work on Android. So you will need to redo all GUI parts. Android application structure is completely different from Swing application structure, so you should study it in detail. Android currently supports all the basic JVM 7 classes so if you do not use external libraries, everything should work just fine. If you want to use external files, than you will also need to study Android file structure.
I must note, that while I recommend to write Android Apps using Android base SDK, it is possible to convert JavaFX applications to Android like it mentioned here: http://www.infoq.com/articles/Building-JavaFX-Android-Apps .
You can install jvm on windows 10 and run your application like on every other system.