Well to start with, the file names are not the same. In the working case you have ".jpeg" and in the failing case you have ".jpg". So if the file name is actually .jpeg then I expect .jpg to fail.
Also, any changes you make to the contents of \forms\java will require a restart of WLS_FORMS in order for those changes to be seen. This includes add or removing files and making configuration changes.