views:

794

answers:

7

I have never been a fan of the windows command line. I have tried tools like powercmd and liked them, but most are not distributed for free and I don't relish the thought of paying for something that I think I could write myself. I want to write my own command line wrapper similar to powercmd that allows for these properties:

  • Custom fonts and colors
  • Opacity of windows
  • Multiple windows opened at same time in a panel (maybe like tabbed browsing)
  • Ability to resize windows

I am reaching out to you guys now to help me decide on whether I should attempt this with C# in visual studio or whether I should do it in Java with Swing. I am comfortable with both. Has anyone ever done a command line wrapper like this? If so what language did you use and what was your experience? Thanks for any feedback.

Grant-

+5  A: 

If you want to do a windows command line, I would recommend C#. Java's enforced platform independence will make you fight too much to pass along commands to the underlying OS.

Yishai
+1  A: 

C# has several benefits over Java for this type of project, not the least of which is better integration with Windows, which is (presumably) the only platform you're developing this for. The Java Swing library is not nearly as fine-tuned looking on windows machines as C# forms tend to be, and with the ability to use WPF, C# seems the clear winner to me.

Mike Trpcic
Why would someone use C# form for a command line wrapper?
OscarRyz
@Oscar: They could use the C# form as the form that holds the console, and it would handle the tabbing, etc. Take a look at the Gnome Terminal.
Mike Trpcic
A: 

I would not use Java and Swing for this. C# will let you communicate directly with the .Net framework and allow you the ability to build a more powerful command line tool. IT will be a hassle to get Java access to some Windows System calls.

Molex
+4  A: 

There's already Console2 that hits the big bullet points - resizable, opacity, tabs, modifiable fonts.

It's written in C++ and under the hood it wraps cmd.exe (or whichever command shell you tell it to use) so those may be two strikes against it if you're really interested in developing your own shell in a managed language.

48klocs
I don't know why I have never seen Console2 before. It looks very promising. Thanks for the tip.
cozmokramer8
+1  A: 

Since you asked, I wrote one myself in C# - the Process class is just too useful. The main thing here is I/O redirection. While I never managed it fully myself, you need this so that subprocess output doesn't appear in another console window. You can also kill programs, find existing ones, etc.

Also, C#'s Console manipulation is very handy.

While I am not a Java programmer, I can imagine that both of those important features would be quite hard to use, considering that Java is platform-independent.

Lucas Jones
Thanks for the info. I think this is the route I am going to take. You guys are right i think C# is the better of the two for what I am trying to do. In the meantime I will use Console 2 (posted above). Thanks again everyone for the feedback.
cozmokramer8
No problem ;). I like what you're doing - if it turns out OK (:D), post a link or something if you can.
Lucas Jones
Just a nice plug here - http://stackoverflow.com/questions/473839/help-me-make-my-windows-cmd-exe-console-work-more-like-a-linux-terminal/473852#473852 :)
Lucas Jones
A: 

Just wanted to let you all know that I did end up writing a command line wrapper with C#. It turned out really well. I have a couple more little things I want to add and then I will put up the source code as well as a place to download the .exe. I posted a video of it in action in case anyone wanted to provide feedback or ideas. Thanks for the help.

http://www.youtube.com/watch?v=-NM-XcYwLDc

cozmokramer8
A: 

As mentioned above, the Process class in C# also exists in VB.net it appears to work pretty slick.

Carlson Technology