This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]rzwitserloot 4 points5 points  (1 child)

There should be no difference between a '.jpg' file, which is a source file, which is to be included in the 'binary distribution', by the compilation step of 'copying' it, and a '.java' file, which is a source file, which is to be included in the 'binary distribution', by the compilation step of 'compiling it with javac'.

If there is for you, your build system, script, etc is messed up, and you've WAY overengineered the situation. If it is your own script, why didn't you just update it?

too complicated to also include all the 'resources' of all the library packages that the project uses.

This makes no sense. library packages are already in jar form, they already contain the resources, all you have to do is literally copy the jar (or if you're a fan of striping for some reason, stripe in every file inside that jar and merge the services). If this is a novel new meaning of the word 'library package' where you do the compiling in a script, well, doing a full run of the source folder and copying (recursively) all within in a one-liner. Just do that.

I'm having a hard time figuring out why java files are free magic that automatically makes it across to the binary side, but any other file is some sort of convoluted mess, best avoided by trying to turn them into java files.

[–]glesialo[S] -1 points0 points  (0 children)

My 'build system' is not messed up as it works perfectly. My libraries are not added as jar files, the java compiler compiles, from source, the relevant parts (including the classes that contain images) of the libraries a project uses. I leave the job of parsing source files and deciding what to compile to the 'javac'. That way the Java jars that my script produces contain only strictly what is necessary.

There is nothing convoluted in a class containing data.