executable jar - running a .jar file from the start=>run box in Windows 7 -


i've written code , made .jar file out of it, , want able run code start=>run box in start menu. after lot of trial , error, made sure construct .jar file right way, , set proper .jar file type association computer recognizes run .jar file using java.exe.
doing enabled me run .jar command window, typing "java -jar myjar.jar", won't run start=>run box (even when add in .jar's filepath). should do?
also, i'm not sure if run .jar run box takes arguments - possible that?

you'll need tell java class main class. if intend distribute application should make manifest file main-class attribute. see: http://download.oracle.com/javase/1.4.2/docs/guide/jar/jar.html#jar%20manifest

if want damn thing running, command should work...

java -jar myjar.jar myclass 

... analogous how you'd write...

java myclass 

... @ command line.

btw, might worth mentioning javaw command, which works java launches graphical application without showing command prompt, on windows.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -