I want to test my middleware (written in Java) on a single PC. That middleware runs on one virtual device (that has JAVA SE) and the same middleware runs on second virtual device (that has Java SE). I have a single PC with single operating system.
Would it be possible to simulate two instances of Java SE on a single PC with single operating system ?
The cleanest way to setup that type of test is using virtual machines.
Depending on your operating system, there are several options.
VirtualBox is easy to setup, works on many host operating systems, and is free.