kvarnerexpress 0 Report post Posted November 29, 2005 I have a program that was originally developed on a linux box and had a perl script to compile all the packages and classes, sign it and upload it.I'm now using a Windows machine and obviously the perl script doesn't work and I need a way to compile, sign and upload oll these files.I tried to make a .cmd file that would simply automate runnig commands at a DOS prompt, but it wasn't very flexible and somehow managed to find compile errors as the compiler couldn't find the packages listed in the java files beginning with com...I'm now trying to write a java app that compiles, signs and uploads the other program. At the moment I'm stuck on trying to get the new java app to create and send a command to compile the other program.This all proabably sounds very confusing, but please help if you can. Thanks. Share this post Link to post Share on other sites
slu 0 Report post Posted November 29, 2005 I'm now using a Windows machine and obviously the perl script doesn't work and I need a way to compile, sign and upload oll these files.Why wouldn't the perl script work? Have you tried ActivePerl? Most perl scripts work across platforms. And if ActivePerl doesn't work you could try installing Cygwin, where you get a more complete UNIX/Linux-like environment (including perl) on a Windows-system.I'm now trying to write a java app that compiles, signs and uploads the other program. At the moment I'm stuck on trying to get the new java app to create and send a command to compile the other program.I would suggest using a proper build tool. In the case of Java development Apache Ant is the standard. It has the ability to compile, sign and upload - just what you need... Share this post Link to post Share on other sites
kvkv 0 Report post Posted January 30, 2006 I think your classpath is not set properly. If you set the classpath variable in your cmd file, it should compile.Here is a link to classpath variable documentation. Share this post Link to post Share on other sites
beeseven 0 Report post Posted January 31, 2006 I don't know what exactly you mean by "sign and upload," but you can compile stuff from java like so: String s = JOptionPane.showInputDialog("What file?");Process p;try { p = Runtime.getRuntime().exec("javac "+s);} catch(IOException e) { //you can get the error somehow, check http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Process.html} Share this post Link to post Share on other sites