Never tryed it, but im sure you can. If you are using RS-232 or any other type of comunication, you will need in the PIC to receive the code and then desifer it. It doesnt matter if you are sending JAVA code or C or C++ or any other type of commands. All of them will have to be decipher by the PIC.
Good luck.