I wrote a Java class, let A, which must be compiled once and saved in several directories (let Y, and Z). Therefore, the compiled files would have the same SerialVersionUID (I need it), in any directory (Y and Z).
I tried to make use of javac A.java -d Y -d Z
but it doesn't work.
By the way, I can't make a first compilation and then a copy (i.e. : javac A.java -d Y; cp Y/A.class Z
), because the SerialVersionUID will be different...
How could I solve this problem ?
EDIT : an ultimate solution would be to set the SerialVersionUID definitively in the .java files, but I would want to avoid it.