简体   繁体   中英

Best Way to Export Java

So what I want to export is a normal I/O or similar program (no GUIs and such) and what I am doing it for is in the Java BPA Competition. Recently, I have handed in my project as an runnable jar file (and also provided a copy of the source code), however, I was marked down for the runnable jar file and received no points in the Program Execution part with the only note back being "check executable .jar." The runnable jar file was fine (I think) since it seemed to work fine on my Windows computer when I ran it from the cmd. (Should also add I used the IDE Eclipse)

Any suggestions for a better export method for Java projects or why the runnable jar may have not worked are very appreciated!

I would check documentation for the competition or ask those involved, but more is always better in my experience.

A folder with separate packages for the executable .jar, the compiled classes and source code (if applicable for being turned in) would probably be better - or maybe they were looking for an .exe that would act as a wrapper and launch the Java program - like what Minecraft has.

Without more information its hard to help you, on looking at what you were marked, IE "Check Executable .jar" implies that it did not actually run easily and first time for your instructor. Perhaps it ran on your machine and not theirs because of some dependency that they had to manually install, something thats very easy with Eclipse as it will often link to sources in Eclipse that are not exported, its always best to test your compiled jar on a "clean" machine or VM without eclipse just a stock windows machine with a JRE. Other possible options are they were expecting a complete build containing the target JRE compiled into the build or an executable thus requiring no specific JRE on the target system?

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