Eclipse jre 1.5 > 1.8 : <p>Can anybody convert these lines from jre 1.5 to 1.8?</p>

<p>Even tho if i put my eclipse project version to 1.5 my jar breaks.</p>

<pre><code>  Map&lt;String, byte[]&gt; resources = new HashMap&lt;&gt;();
        Enumeration&lt;JarEntry&gt; enumeration = jar.entries();




   Class&lt;?&gt; clazz = loader.loadClass("com.kit.Application");
        Method main = clazz.getMethod("main", String[].class);




 if (main != null) {
            main.invoke(null, (Object) new String[]{});


Class&lt;?&gt; applicationClass = applicationObject.getClass();

                Method setDockIconImage = applicationClass.getDeclaredMethod("setDockIconImage", new Class[]{Image.class});
                setDockIconImage.invoke(applicationObject, (Object) ICON_IMAGE);`
</code></pre>
