简体   繁体   中英

Why won't Eclipse allow me to export a .jar?

I am trying to export a runnable .jar file, but every time I do so it says, "VM arguments will not be part of the runnable JAR. Arguments can be passed on the command line when launching the JAR."

Anyone know how to fix it?

That's not a bug. You have defined arguments on your developed app (Run -> Run Configurations -> Arguments), but they can't be exported to the runnable jar.

They must will be specified through command line when you run your app outside Eclipse.

An example would be when you are setting more memory to run the app, but if you execute the runnable jar file with those parameters, you should run the app with command line, like:

java [your arguments] -jar yourjarfile.jar

Those arguments are for the Java Virtual Machine (MV).

在此处输入图片说明

It is just a warning because you have set some VM arguments in the launch configuration you have selected in the menu for export as runnable jar. You will need to pass those arguments in the command line if your program relies on them.

So just ignore it, it is not relevant for the export itself.

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