| Summary: | Cannot show images inside the jar file | ||
|---|---|---|---|
| Product: | Slot Machine | Reporter: | josephccs0917 |
| Component: | slot machine | Assignee: | 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
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. |