• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Litarvan/OpenLauncherLib: A simple modern java launching library with minecraft ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Litarvan/OpenLauncherLib

开源软件地址(OpenSource Url):

https://github.com/Litarvan/OpenLauncherLib

开源编程语言(OpenSource Language):

Java 100.0%

开源软件介绍(OpenSource Introduction):

OpenLauncherLib logo

Say Thanks!

Launch everything you want

Internal Java Launching

You can launch a Java program using the internal system. It loads some given jars, then it can launch any method from any class you want, it can be non-static, so it will use the constructor you want.

List classpath = Explorer.dir("libs").files().match("^(.*\.((jar)$))*$").get();
InternalLaunchProfile profile = new InternalLaunchProfile("fr.theshark34.MyMainClass", classpath);
profile.launch();

This will launches the main(String[] args) method of the fr.theshark34.MyMainClass class, after loading all the jars in the libs folder. You can add a ClassInitializer, an object that will initialize the main class. You can also choose the method to invoke, and its parameters.

External Java Launching

You can launch a Java program using the external system. It launches directly the java program, to run a simple runnable jar with its librairies.

ClasspathConstructor constructor = new ClasspathConstructor();
constructor.add(new File("mymainjar.jar"));
constructor.add(Explorer.dir("libs").files());

ExternalLaunchProfile profile = new ExternalLaunchProfile("fr.theshark34.MyClass", classpath.make());
ExternalLauncher launcher = new ExternalLauncher(profile);

Process p = launcher.launch(); // throws LaunchException

This will launch a java process with in classpath: mymainjar.jar and all the files of the libs folder. You can also add program/vm parameters, and a LaunchingEvent to customize the ProcessBuilder just before launching.

Any Program Launching

You can run any executable or command, and then use the OpenLauncherLib tools with it.

Coming soon

Tools

There are a lot of tools that can be used before or after the program launching.

The Single Saver

The Saver uses Java Properties to save or load some data. It is useful if your launch has authentication by exemple to save the user name, or things like this.

Saver saver = new Saver(new File("myfile.properties"));
saver.set("username", "jack");
String age = saver.get("age");

The data is automatically saved when you do set()

The Logger

You can use the Logger to activate logging for any program you want.

Coming soon

The Process Log Manager

You can use the Log Saver to save the logs to a file.

Coming soon

The Splash Screen

The Splash Screen can be used to display a simple splash that you can personalize.

SplashScreen splash = new SplashScreen("MySplashTitle", mySplashImage);
splash.add(new JProgressBar());
splash.displayFor(5000L);

The Ram Selector

The Ram Selector can be used to display a Ram Choosing Frame easily

RamSelector selector = new RamSelector(new File("ram.txt"));
selector.display();

// Then when your launching
String[] ramArguments = selector.getRamArguments();

Minecraft

There is a support for Minecraft launching, you can use these tools to create a Minecraft Launcher:

Minecraft Launcher

You can use the Minecraft Launcher to create internal/external launch profile for Minecraft

GameInfos infos = new GameInfos("MyMinecraft", new GameVersion("1.7.2", GameType.V1_7_2_LOWER), new GameTweak[] {GameTweak.FORGE});
AuthInfos authInfos = new AuthInfos("PlayerUsername", "token", "uuid");

InternalLaunchProfile profile = MinecraftLauncher.createInternalProfile(infos, GameFolder.BASIC, authInfos);
InternalLauncher launcher = new InternalLauncher(profile);

launcher.launch();

Minecraft Crash Detector

The Crash Detector detects the common Minecraft crashes

Coming soon



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap