I am struggling with java.util.logging: I have a custom ub-logging.properties which works fine when I run the runme.jar from a directory where there's also the ub-logging.properties - using
but I can find no way to make java take it from inside the runme.jar itself
If it was allowed to pack it directly into submission.jar, it could again work after the tester unpacked the submission.jar... But from the instructions I think we are not allowed to put any additional files there...
I'm not sure what to do now - am I overlooking a way to make java read it from inside the jar, or is it just not possible? This would be a pity because I wanted to have a "how to start it with application-specific logging" section in the Guide And of course the standard behaviour of the jdk does not fit too well here...
My advice: it's not needed/required and it gives you problems, simply don't do it. You won't get extra credit for doing it.
It is not allowed to define extra parameters when running the runme.jar
Maybe you can try to create a default logging.properties file in the working directory (from within your code, similar way of working with the suncertify.properties file) and use that to initialize your logging properties.
Regarding your remark you are right: if your program runs without the command line arguments you are just fine. I notice that a lot of people have difficulties with just doing what is expected, nothing more, nothing less And most of the time that extra thing gives them some kind of a problem and they have to spend some time on solving the issue although they won't receive any extra credit for it.
I took a look to your other thread and noticed the great Roberto answered this one already, but I'll post my opinion too.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to read logging.properties from inside jar file?