Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f329e21

Browse files
committed
Fix getting resources on Java 10
Thanks Oracle /s
1 parent 0b59e63 commit f329e21

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

‎src/main/java/club/bytecode/the/jda/Resources.java‎

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,35 @@
1515
*/
1616

1717
public class Resources {
18-
public static ImageIcon nextIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/nextIcon.png"));
19-
public static ImageIcon prevIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/prevIcon.png"));
20-
public static ImageIcon busyIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/1.gif"));
21-
public static ImageIcon busyB64Icon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/busyIcon2.gif"));
22-
public static ImageIcon batIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/bat.png"));
23-
public static ImageIcon shIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/sh.png"));
24-
public static ImageIcon csharpIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/c#.png"));
25-
public static ImageIcon cplusplusIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/c++.png"));
26-
public static ImageIcon configIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/config.png"));
27-
public static ImageIcon jarIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/jar.png"));
28-
public static ImageIcon zipIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/zip.png"));
29-
public static ImageIcon packagesIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/package.png"));
30-
public static ImageIcon folderIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/folder.png"));
31-
public static ImageIcon fileIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/file.png"));
32-
public static ImageIcon textIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/text.png"));
33-
public static ImageIcon classIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/class.png"));
34-
public static ImageIcon imageIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/image.png"));
35-
public static ImageIcon decodedIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/decoded.png"));
36-
public static ImageIcon javaIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/java.png"));
37-
38-
public static ImageIcon fileNavigatorIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/icon.png"));
39-
public static ImageIcon fileViewerIcon = new ImageIcon(Resources.class.getClass().getResource("/club/bytecode/the/jda/images/icon.png"));
18+
public static ImageIcon nextIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/nextIcon.png"));
19+
public static ImageIcon prevIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/prevIcon.png"));
20+
public static ImageIcon busyIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/1.gif"));
21+
public static ImageIcon busyB64Icon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/busyIcon2.gif"));
22+
public static ImageIcon batIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/bat.png"));
23+
public static ImageIcon shIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/sh.png"));
24+
public static ImageIcon csharpIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/c#.png"));
25+
public static ImageIcon cplusplusIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/c++.png"));
26+
public static ImageIcon configIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/config.png"));
27+
public static ImageIcon jarIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/jar.png"));
28+
public static ImageIcon zipIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/zip.png"));
29+
public static ImageIcon packagesIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/package.png"));
30+
public static ImageIcon folderIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/folder.png"));
31+
public static ImageIcon fileIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/file.png"));
32+
public static ImageIcon textIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/text.png"));
33+
public static ImageIcon classIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/class.png"));
34+
public static ImageIcon imageIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/image.png"));
35+
public static ImageIcon decodedIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/decoded.png"));
36+
public static ImageIcon javaIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/java.png"));
37+
38+
public static ImageIcon fileNavigatorIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/icon.png"));
39+
public static ImageIcon fileViewerIcon = new ImageIcon(Resources.class.getResource("/club/bytecode/the/jda/images/icon.png"));
4040

4141
public static ArrayList<BufferedImage> iconList;
4242
public static BufferedImage icon;
4343

4444
static {
4545
try {
46-
icon = ImageIO.read(Resources.class.getClass().getResourceAsStream("/club/bytecode/the/jda/images/icon.png"));
46+
icon = ImageIO.read(Resources.class.getResourceAsStream("/club/bytecode/the/jda/images/icon.png"));
4747
} catch (IOException e) {
4848
System.err.println("Failed to load program icon:");
4949
e.printStackTrace();

‎src/main/java/club/bytecode/the/jda/gui/dialogs/AboutWindow.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public AboutWindow() {
3838
try {
3939
String text = IOUtils.toString(Resources.class.getResourceAsStream("/club/bytecode/the/jda/html/about.html"), "UTF-8");
4040
text = text.replace("$JDA_VERSION$", JDA.version);
41-
text = text.replace("$JDA_ICON$", Resources.class.getClass().getResource("/club/bytecode/the/jda/images/icon.png").toString());
41+
text = text.replace("$JDA_ICON$", Resources.class.getResource("/club/bytecode/the/jda/images/icon.png").toString());
4242
editorPane.setText(text);
4343
} catch (IOException e) {
4444
System.err.println("Couldn't load about html:");

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /