简体   繁体   中英

How to set the main class in JarSplice?

I made a project a while ago and compiled to an executable JAR file. Now I'm using JarSplice to wrap it in native executables. How to I specify that the main class is in my JAR? The only instructions are to tell it the package path to the main class, but it seems like that assumes you are using JarSplice with an unbuilt project.

  1. I added my executable JAR.
  2. The JAR's internal path to the main class is "tproxy.gui.Interface".
  3. Should the class path be something like "JarName/tproxy.gui.Interface"?

EDIT: I need to wrap the JAR in an .app executable for OS X, so Launch4j isn't an option.

Just enter the classpath ( eg. "tproxy.gui.Interface" ) there is no need for JarName/ in front of it. It doesn't assume you are using JarSplice with an unbuilt project. It does assume you do not have the same path in two jars. If you used reasonable unique package names that should not be a problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM