July 19, 2009 at 11:05 am (Java, Linux)
Tags: code, command, command line, console, exec, input stream, Java, jstack, Linux, output, pid, process, runtime, sample, stack trace, thread dump
Of course; I was trying to get a thread dump using jstack here. You would need to change the command that Runtime.exec() executes to your liking.
Process threadDump=Runtime.getRuntime().exec("jstack -l "+pid);
BufferedReader br=new BufferedReader(new InputStreamReader(threadDump.getInputStream()));
//Do whatever you want
June 5, 2009 at 11:00 am (Mobile, Mobile Platforms, Windows)
Tags: command line, executable, full path, parameter, run dialog, windows mobile
I learned this very neat trick last summer; however, a couple of months ago I couldn’t find the information again. Now that’ I’ve found it again, I wanted to share it here so that I do not lose it
By using a key combination, you can actually make the Run dialog which we are all accustomed to, to show up on Windows Mobile too.
It is really like the one on Windows, and you can add command-line parameters too. (like the one in the picture; you can open IE with a predefined address)
Hold the Action hardware button and then tap and hold the time display at the top right of the screen. When you release the stylus, a menu will popup. Select the Run option and there it is! Enter the full path of any executable on the device with any parameters you may like to give.
January 14, 2009 at 4:56 pm (Windows)
Tags: command line, services, Windows
For some reason, I just needed to do something like this, so here is a quick how-to:
There is a tool named sc.exe in the Win 2K Resource Kit, however I believe it also exists in Windows XP, as I did not have to do anything, and was able to access it from command-line.
Using this tool, you can see the list of the services that are currently running, add, delete, create or stop services.
The syntax for creating a service is like this:
Read the rest of this entry »