*
The moose likes Beginning Java and the fly likes Redirecting output from @argfile multiple compiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Redirecting output from @argfile multiple compiles" Watch "Redirecting output from @argfile multiple compiles" New topic
Author

Redirecting output from @argfile multiple compiles

Graeme Byers
Ranch Hand

Joined: Apr 16, 2004
Posts: 127
The reference for @argfiles is :
http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#commandlineargfile

>javac -verbose MyClass.java 2> MyClassLoc.doc // OK
>javac -verbose @argfile // OK
Combining them :
>javac -verbose @argfile 2> ArgfileLog.doc // Invalid flag:Argfile.doc
The last puts a 0kb class file named 2 (as in "2") in the same directory as the last .java source listed in @argfile.
This is not an academic exercise. As a non java programmer I run multiple compiles somewhat like @argfile and I am keen on checking all has worked.
Thank you
Graeme Byers
Ranch Hand

Joined: Apr 16, 2004
Posts: 127
>javac -verbose @argfile 2> ArgfileLog.doc // Invalid flag:Argfile.doc
Ops !
>javac -verbose @argfile 2> ArgfileLog.doc
// Invalid flag:ArgfileLog.doc
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

What happens if you remove the space between the > and ArgfileLog.doc? I've had problems with error redirecting that I could solve by simply removing that single space.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Graeme Byers
Ranch Hand

Joined: Apr 16, 2004
Posts: 127
No Rob, still an invalid flag.
I think this is a case for using a shell script to read each line in argfile and build a line to execute.
Thank you.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Redirecting output from @argfile multiple compiles
 
Similar Threads
JRE version conflict problem
Classpath setting involving java and javac
how to import an API not in jdk ?
Compiling with jar files.
package javax.servlet.http does not exist