Write java code in command prompt?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
13 views
Decided to suffer garbage, and in General here. Like me in the batch file to write java code and run it. How to make a batch file to run each time after turning on the PC how to prevent closing the batch file using (ctrl-alt-del), and how to hide the batch file after its first run.
by | 13 views

2 Answers

0 like 0 dislike
1.The batch file you can create a text file with JAVA code:
echo Is a JAVA code>>file.txt
Every line of Java code precede the echo command and at the end of the redirection operators to a file.

2.How to compile the created by FAI do not know, Java is not involved, I think that the JAVA SDK is the command line compiler, learn its settings and just add the appropriate command at the end of the batch file. But JAVA SDK is not included in the JAVA JRE, which usually is the users computer.

3.For the startup is to place in startup. In Windows several options startup, Google it and see what suits you best.
The easiest way is to put the batch file in the startup directory of the current user, but you may not need it.

4.About the closure - apparently you need to prevent the closure of the batch file, and closing an executing java code. In any case, it is quite not trivial and any method can be circumvented.
The easiest option is to start the second process will monitor whether it is running first and if not start. But there is no guarantee, because first, can kill second, then first.
Perhaps you are satisfied with the option, for example, hiding the progress dialog of the batch file, but the standard method does not exist, there is not a standard type options utilities cmdow, nircmd - they know (but, for example cmdow antiviruses don't like though is and not virus), you can also hide the window by using a simple script in vbs/js - Google.

5.On account of the launch from under the administrator - there is a runas command, but it asks for a password which you can enter the hands. There are third-party options such tools - Google.

PS: Your wishlist together rather suspicious look. And they are not solved easily.
by
0 like 0 dislike
1) Google how to run the compiled jar from the command line and write a batch file
2) Google how does windows task scheduler, trying to create a basic task
3) please note that tasks can run as a system administrator and draw conclusions.

success in your endeavors!
by

Related questions

0 like 0 dislike
1 answer
asked May 22, 2019 by GregorySysoev
0 like 0 dislike
4 answers
0 like 0 dislike
1 answer
asked Apr 14, 2019 by leo9797
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
35,430 users