• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javac-includesfile problem.

 
Sudarsan Raman
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to compile java files in batches. For this I'm trying out this following example.

- I have a directory "code" which contains around 1071 java files
- I need the classes to get generated in "output" directory.
- I have a "javac.tmp" file that has only one line "myBean.java"
(This myBean.java is part of the "code" directory)

- I need to compile only this particular file.
- I want to use only includesfile and not includes attribute

The reason for not using includes is that the list of files that has to be compiled will grow (I don't know the limit includes, what if the the file list is around 500 ??). Includesfile is supposed to take just a filename and this file should contain list of files.

What I'm trying :

<project name ="project" default ="init" >
<target name="init" >
<echo>compiling</echo>
<javac srcdir="./code" destdir="./output" includes="*.java" includesfile="./javac.tmp" />
</target>
</project>

Output :

Buildfile: build.xml

init:
[echo] compiling
[javac] Compiling 1071 source files to /users7/e46011/javafile/output

Problem : It tries to compile all the files in the directory "code". Does the includesfile file require to have the filenames in some format (anything other than filenames on different lines) - Something like package name etc ??

Thanks,

Sudarsan.
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't used includesfile, but you problem is likely because you have also used includes="*.java". Remove that if you don't want *.java included.
 
hasan khan
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am also facing the same problem.

none of the files are getting compiled.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic