J2ME in a strange bug and its solution

xiaoxiao2021-03-06  93

When I did a game yesterday, oh, forgot to say that I used Eclipse 3.0 EclipseMe0.4.6, in Eclipse simulation

When the debug is called, there is no problem, but when I pack it into a JAR file, I will throw Null Pointer when I run in the simulator.

abnormal. Depressed in most hours, there is still no way. Later, just use system.out.println, then packed test, finally find

To reasons.

When you create an image, I use image.createImage ("/ forebomb.png"), but the actual name of the file is

Forebomb.png. Note that only the difference between case. This is no problem when debugging in Eclipse, and the program can run normally.

There is no mistake, but when you pack it into JAR, it will not run normally. Null Pointer, haha, everyone should pay attention to

.

转载请注明原文地址:https://www.9cbs.com/read-122374.html

New Post(0)