free hit counter

Monday, October 10, 2005

getting at textfiles that are packaged up in a JAR

I'm trying to get my SQL out of inline code and into individual text files. However, I don't want to distribute these text files to the end user. So, I think a decent solution is to stick them into the JAR and access them using getResouceAsStream().

It would be a bit more overhead, but you could also have an ANT task that calls a script to generate some java code to wrap the SQL statements so you don't have to make your textfiles public in the jar.


Post a Comment

<< Home