IANAL, TINLA, etc.
I thought LGPL was a permissive license, just like MIT, BSD or Apache. But today I read, that only linking to LGPL (libraries etc) is allowed from closed-source code - other than that, it's copyleft - so I have to publish code that is based on an LGPL program.
Yes, the LGPL requires that either you make available the source code to anyone who receives a copy of the work, or you must distribute your work in a form where recipients of the software can replace your version of the LGPL'd work with a new version. In either case, all modifications to the LGPL portion of the work must be available to all recipients of the work.
I created a program for my employer that is based on an LGPL program, but has considerable modifications to it. Of course, I am not allowed to put that modified source code out there. At the same time, I have to, if I distribute it (right?).
Correct. The license mandates that all recipients of the software are to be given access to the source code.
My idea: can I put most functions of the original LGPL app into an external library, write the core executable from scratch, but refer back to the library for all functions that I haven't modified?
That may constitute a derived work, and you'll still be required to distribute all build scripts that strip down the program to a library.
Currently, everything is in a .jar file (it's Java/Swing). if you think my idea is legally/technically feasible - how much effort would it be to seperate what I wrote and what the original is? I'm not the most java savvy.
Java adds a whole slew of new problems to the LGPL, since it's not clear what constitutes "static" and "dynamic" linking. Since the LGPL's exceptions over the GPL rely on that concept, the LGPL is really equivalent to the GPL in most cases. You will need to consult the company's legal team to answer any questions that will raise.
My advice is that if anyone outside your company will have access to the program, scrap it and start over. If you cannot meet the requirements of the license, then you are not permitted to distribute it, at all.
If the program will only be available within the company, then you are only required to make source available to company employees. I'd suggest adding it to your existing company source control. This will satisfy the requirements of the LGPL, so long as no one outside the company will have access.