Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirecting output from @argfile multiple compiles

 
Graeme Byers
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>javac -verbose @argfile 2> ArgfileLog.doc // Invalid flag:Argfile.doc
Ops !
>javac -verbose @argfile 2> ArgfileLog.doc
// Invalid flag:ArgfileLog.doc
 
Rob Spoor
Sheriff
Pie
Posts: 20510
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Graeme Byers
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic