aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/gui/machine
diff options
context:
space:
mode:
author‭huajijam <strhuaji@gmail.com>2019-03-18 20:52:30 +0800
committer‭huajijam <strhuaji@gmail.com>2019-03-18 20:52:30 +0800
commit8b090e1fd20eb4c301996b5e1dfeb78353e595e4 (patch)
tree52152dd767d195c76baa8fd8bacb14b105aaa146 /src/Java/gtPlusPlus/core/gui/machine
parent40d7e5da9f5b84213e2c3e4596fdc69b94bd523e (diff)
downloadGT5-Unofficial-8b090e1fd20eb4c301996b5e1dfeb78353e595e4.tar.gz
GT5-Unofficial-8b090e1fd20eb4c301996b5e1dfeb78353e595e4.tar.bz2
GT5-Unofficial-8b090e1fd20eb4c301996b5e1dfeb78353e595e4.zip
fix a bug
Diffstat (limited to 'src/Java/gtPlusPlus/core/gui/machine')
-rw-r--r--src/Java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java b/src/Java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java
index 7a3a01b27c..8a1f7c3fe9 100644
--- a/src/Java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java
+++ b/src/Java/gtPlusPlus/core/gui/machine/GUI_ScrollTest.java
@@ -16,6 +16,7 @@ import com.google.common.collect.Lists;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiOptionButton;
import net.minecraft.client.gui.GuiResourcePackAvailable;
@@ -145,9 +146,9 @@ public class GUI_ScrollTest extends GuiScreen
try
{
- Class<?> oclass = Class.forName("java.awt.Desktop");
- Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
- oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new Object[] {file1.toURI()});
+ Class<?> oclass = ReflectionUtils.getClass("java.awt.Desktop");
+ Object object = ReflectionUtils.getMethod(oclass, "getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
+ ReflectionUtils.getMethod(oclass, "browse", new Class[] {URI.class}).invoke(object, new Object[] {file1.toURI()});
}
catch (Throwable throwable)
{