I want to run java console application on windows enivornment...
how can i do this...
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
I want to run java console application on windows enivornment...
how can i do this...
Compile you code as an executable jar then you can just run java -jar MyJar
how can run this jar file without any command on cmd....
Actually this is console application ... and i want to run this just single click of mouse like a exe file of c++...
jar files on the Windows OS will be executed by double clicking in the jar file if there is a JRE installed and there is an entry in the registry that associates .jar files with a commandline containing the java command with the -jar option.
If the application needs a console window, create a batch file that will open the window and start the program in the jar file.
If you don't understand my answer, don't ignore it, ask a question.
run-> jar -cvf jarname.jar *.*; *.* is used to include the all file inside the folder like c://..//desktop/test: it means we include the all file inside the test folder.
And then after we put the main class path inside manifest.ml file.
if you're using eclipse, do this:
right click your project, export, select as executable jar file, select where you want to save it. done.