Bug 362

Summary: Cannot show images inside the jar file
Product: Slot Machine Reporter: josephccs0917
Component: slot machineAssignee: billy777 <cfyeung27-c>
Status: CONFIRMED ---    
Severity: critical CC: cfyeung27-c, josephccs0917
Priority: High    
Version: 2.0 release   
Hardware: PC   
OS: Mac OS   

Description josephccs0917 2019-12-08 19:20:03 HKT
After I opened the jar file released, all the images are not able to display, including the slot items and membership. The game cannot be played completely with the jar version.
Comment 1 billy777 2019-12-08 21:10:58 HKT
The program worked well in the IDE environment, but cannot show images after exported as a jar file. The problem arose because we are not including the images when exporting the jar file. The problem is solved by marking the images folder as resource and we use getClass().getResourceAsStream(image) to get the input stream of image from resources. After configuration, the jar file now works well.