The import command allows you to load other classes into your code so that you can use their methods, for example:
Code:
import java.applet.Applet;
This code finds the Applet class int the JRE library, and imports it. This allows you to make an Applet object, extend the Applet class, use Applet methods, etc.
This time images will not load when the game is run from a Jar, neither in Applet nor Application form (It however works perfectly fine in Eclipse). The entire screen is just black, however the size of the window is correct so clearly some part of the code is working. I figured that the images or xml files were not being loaded, however the Java console does not give me any errors at all (normally...
Nevermind, moving my library and config folders into the "/bin" folder makes the game function both within Eclipse and within a Jar, slightly annoying but it works, thanks for the help!
3rd Edit: Eureka! The JAR functions now, however it required me placing the library and config folders inside the same folder as my source code. However, this looks absolutely ugly in the Eclipse file explorer (as it treats all folders inside the source folder as packages). Is there a way to work around this?
Leave a comment: