With the release of Confluence 2.6.0, many files have been moved inside the main .jar file, which means they can no longer be edited by simply opening and saving a file.
For those not familiar with the terminology, a .jar file is a Java ARchive file. It's like a Unix .tar file, and is managed by a very similar command-line tool jar which is included with the JDK. Essentially, it takes several files, or an entire directory structure, and compresses them together into a single file. This saves a little space, and makes it much easier to manage that group of files as a single unit. The terms "file" and "archive" can be used interchangeably in this context, as they refer to the same collection of bytes.
To edit a file that exists inside a .jar file, you need to unpack the archive, perform the desired edits, then re-pack the archive. To do this on Unix/Linux, follow these steps:
/tmp/confluence-workingjar xf </path/to/file.jar>. To edit the main confluence .jar: jar xf $CONFLUENCE/confluence/WEB-INF/lib/confluence-2.6.0.jarjar cf </location/of/new/archive/file> * to produce a new archive under /tmp. The asterisk is significant, as that tells jar to include all files and directories within the working directory. E.g. jar cf /tmp/confluence-2.6.0.jar *, in our example here.confluence-2.6.0.jar.original. Make sure the file name does not end with a .jar extension.<confluence-install>/confluence/WEB-INF/lib/These instructions assume a Unix environment, but they also apply to Windows for the most part. If you're working at the command-line, the only real change will be substituting dir for cd.
Installing Patched Class Files