Skip to content

Commit 965f6c7

Browse files
Create Main.java
1 parent 52b52c4 commit 965f6c7

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

  • src/main/java/org/CreadoresProgram/ViaProxyPterodactyl
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.CreadoresProgram.ViaProxyPterodactyl;
2+
import java.io.File;
3+
import java.net.URL;
4+
import java.net.URLClassLoader;
5+
import java.lang.reflect.Method;
6+
public class Main{
7+
public static void main(String[] args){
8+
try{
9+
File file = new File(System.getProperty("user.dir") + "/ViaProxy.jar");
10+
URL url = file.toURI().toURL();
11+
URLClassLoader child = new URLClassLoader(new URL[] { url }, JarLoader.class.getClassLoader());
12+
Class<?> classToLoad = Class.forName("net.raphimc.viaproxy.ViaProxy", true, child);
13+
Method method = classToLoad.getDeclaredMethod("main", String[].class);
14+
method.invoke(null, (Object) getArgsVP());
15+
}catch(Exception ex){
16+
ex.printStackTrace();
17+
}
18+
}
19+
public static String[] getArgsVP(){
20+
//if config or not
21+
}
22+
}

0 commit comments

Comments
 (0)