She spent six hours trying to mimic the JNLP's environment. She set up a Windows XP virtual machine. She installed Java 6 update 21. She disabled all security updates. She copied the exact JARs from the old server's cache. Still, the application would launch, show a gray window, and crash with a NullPointerException at a line that simply read: String s = null; s.length(); .
Then, the application would take that XML, run it through a series of XSLT transformations (the apache-xerces JAR), feed the result into the pdf-generator-2009.jar (which was a thin wrapper over iText 2.1.7, a version so old it predated PDF/A standards), and finally spit out a byte array that was written to C:\legacy_reports\output.pdf .
For 95% of users searching for this term, the solution is not a converter—it is the button built into your operating system.
If you are an IT manager dealing with hundreds of legacy JNLP reports, consider hiring a Java developer to rewrite the legacy app as a modern web application (HTML/JavaScript) that has native PDF export. Alternatively, use an automation tool like (Windows) to script the process of launching the JNLP, clicking "Print," and saving the PDF.
If you are building an application and want it to generate PDFs directly:
Her first instinct was brute force. She tried to run the JNLP with OpenWebStart, an open-source resurrection of Java Web Start. It failed. The old JARs had dependencies on Sun's proprietary imaging libraries that no longer existed. She tried to decompile the actuarial-core.jar using JD-GUI. The code looked like it had been written by a traumatized Perl programmer in 2005: Vector v = new Vector(); Enumeration e = v.elements(); No comments. Method names like doTheThing() .
To use one of these tools, simply:
<?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="http://legacyserver:8080/app"> <information> <title>Legacy Invoice Tool</title> <vendor>Old Corp</vendor> </information> <resources> <jar href="app.jar"/> </resources> <application-desc main-class="com.oldcorp.Main"/> </jnlp>