Assimilating the job of a programmer to coding is reductive. Your goal is not to write code, but to solve a given problem—usually through code, but not only code.
Once you have a set of requirements, you have to do a set of tasks in order to fulfill them. It can consist of writing code, but also doing architecture, writing deployment scripts, setting up and configuring external dependencies (such as Twilio), setting up production environment (such as Amazon AWS), writing tests, documenting stuff, etc.
In big companies, specific tasks are delegated to dedicated people. In small companies, usually the same person has a lot of different responsibilities. But even in large companies, writing a given subset of tests and documentation, doing design and figuring out how to run code on a given environment belongs to programmers. This, by itself, takes usually much more time than writing code.
Think about the goal. The goal is to respond to a need of your customer in a fast and inexpensive manner. Can you do it without running a Java program in the background or without putting a JAR in a JAR? If yes, you're indeed wasting your customer's time and money. If you can't, then by figuring out those two tasks, you are actually doing your job.
If you spent a day figuring it out, you spent your day working and learning, which is a day well spent. It doesn't matter that you wrote zero lines of code—this is one of the reasons why LOC/day metric makes no sense when comparing the productivity of programmers.
But, wait, what if another colleague would have figured out the solution in a matter of minutes instead of spending the whole day on the issue?
This is why experience is important. Knowing a programming language is not enough. You have to know the ecosystem as well, would it be the operating system, the framework or the tools (don't forget the tools!)
An experienced programmer will solve problems faster because he knows both the language and the ecosystem.
A programmer who knows the programming language but recently moved to an operating system he never used before will be less effective.
A programmer who knows the environment but recently started using a new programming language will be less effective too.