The solution you propose is not supported in the event that you have an issue.
With that out of the way, there are a few ways to accomplish this.
We wrote a stand alone java service that saved packages, installed them, etc. from the command line. It required the use of properties files that set environment variables for transferring code between environment. It was originally written using 4.02 client API.
I have used it for 6.01, but not all of the functionality exists. It took about 2 weeks for the java developer to finish the job from start to finish.
You can call wm.server.packages:packageInstall from your java program to install the package.
Again, this is not supported and you are not guaranteed that the API will be available to you in the future.
If the package has locked elements, there will be no way for the system to communicate this to you. It will not install if there are locked elements, so you will want to unlock everything programatically prior to installing the package.
If I were you, I would stick to the supplied interfaces until you get to a level of HIGH comfort with the platform.
HTH
Ray
#Flow-and-Java-services#Integration-Server-and-ESB#webMethods