honestly what would be the best solution is to have logging built into
streamhub, and to create a new package called com.streamhub.Log. This
should be static, and loaded automagically by your main(). Debug should
be off by default, and to turn it on you could do something like
Log.setDebug(true || false). Since thsi would be a static method it
would just toggle log4j on or off. Additional logging methods can be
crafted to handle or trigger certain events for logging, or UID's or
specific publishes....etc.. you get the idea. This i think would make
the app alot faster to config and port around. Im pretty sure you can
include log4j into your app with there current liscense, so that
shouldn't be a problem.
and as far as your liscense is concerned, including it witghin the same
directory of your streamhub-xxx.jar file would be great. Having a name
such as streamhub-xxx.liscense would be more obfuscate then just a
liscense.txt. But since we are on that route, then best possible way for
you to store your liscense key is in a jar file. You then can protect
and encrypt this jar file, it literary can have one two files in it, a
warpping java class which loades a prop file, and the prop file in the
jar which contains your liscense data, the java wrapper then dynamically
loads this prop file.
you can easily create a process to automagically create these jar files.
Then ship those to the customer. Then when the customer loads in the
streamhub-xxx.jar, you also havet hem include the liscense jar as well.
Alot of other well know java APIs do it this was, with great success.
but for now, yes a getResourceAsStream would work fine, a little round
about, but it will work. they just need to be somewhere in your
classpath, playing around with it a little bit should show what and
where you can put em. i cant test this or i could tell you exactly where
to put em. i think it would be faster to create the new package then to
monkey with the resource loaders.
kara