casweed.blogg.se

How to make a computer program run automatically on bluej
How to make a computer program run automatically on bluej












how to make a computer program run automatically on bluej

This also affects the hints provided by the IDE, and in this way, the programmer can receive immediate feedback on any errors. When a program is compiled before execution, the compiler can search for errors in it. This compile process affects how and when errors occur.

how to make a computer program run automatically on bluej

Following that, the program gets executed, meaning the commands are executed one-by-one by a Java-interpreter that is able to read Java bytecode. This compilation process is done by Java's compiler, which itself is a program. When a program is run, the source code is first compiled into Java bytecode. You can do the same thing using an executable JAR, so the window will stay open you open a console window and type "javaw -jar Shelf.jar" provided your executable JAR file is called Shelf.jar or just double click on the JAR file from file browser and it's going, but like I said it will close the window as soon as your program is done.You can run a program in TMC by pressing the green play button, or by selecting "Run project" from the TMC menu.Įven though running the program is straightforward, a lot is happenings behind the scenes. Also you will need to be in the folder where your Shelf.class file is located. You can run the class file by itself "javaw Shelf" or possibly "javaw Shelf.class" this has to be done at a console window and javaw.exe has to be in the path statement of the local machine.

how to make a computer program run automatically on bluej

This is probably an option in BluJ, but be advised if you make an executable JAR and he has the JRE installed locally, he will run the file alright, but when the program is done, it will exit and close the console window immediately, so he will not be able to sit and look at the result of your program. Your program looks fine at a glance, as you have never said it does not run I will assume that it does. I have never used BluJ, but use NetBeans all the time-at this point many of the IDE's have executable JAR options.














How to make a computer program run automatically on bluej