Forums Register Login

Java for system adminstration?

+Pie Number of slices to send: Send
Can I use Java for system administration in Linux like the way we
use c or Perl?


best regards,
omi
+Pie Number of slices to send: Send
*nix systems tend to use plain text files for configuration, so at first blush I'd say yes, Java may work. However, depending on your Linux distribution, Java support may be spotty (this should get better now that Sun has released Java on an open-source license).
+Pie Number of slices to send: Send
It all depends on what "system administration" means. Certainly if you are set up to run Tomcat, JBoss or the like as core system services, you're already using Java for system administration.

If you mean for system control and maintenance, certainly - I could, for example, write a crontab maintenance utility in Java either as a standalone app or as a webapp.

The only real restrictions are portability and overhead. You can't reasonably use Java in an environment where a JVM has to be fired up everytime it's needed but the task requires that startup delays be kept minimal (or storage is at a premium). Of course, if you by into the type of stuff that BEA (among others) is playing with, Java is essentially part of the OS, so that overhead mostly goes away.

Portability wouldn't be an issue execpt for the half-baked noncompliant gcj implementations, but thanks to Sun's opening the doors, I expect that incomplete JVMs will join J++ in the dustbin of history before much longer.
+Pie Number of slices to send: Send
thanks bartenders for your replies.

But sir,How about system automation tasks ,for ex. copying registry file,
executing network commands,shell programming,executing asm code.

Can we do that like that we do with perl,c,bash scripts,and python like languages?

I know as a Java programmer it's hard to do low level tasks but just
for ending my curiosity I am asking the above question.

best regards,
omi sharma
[ August 13, 2008: Message edited by: omi sharma ]
+Pie Number of slices to send: Send
Some problems are better suited for scripting languages and some are better suited for object-oriented programming languages. Use the correct tool for the job. Picking the correct tool may take some trial and error until you get a sense of what the strengths and weaknesses of each are.
+Pie Number of slices to send: Send
While you technically can do anything with Java that you can do with any other language, I think this is a serious mistake. If you are the sysadmin, and will always be the sysadmin, then by all means, do what you like. But if there is any chance, however small, that the system will grow and be put in production, and managed by professional sysadims, then you should do it using the "when in Rome, do it the Roman way" approach.

For Linux, the Linux way is perl or bash scripts.

Plus, perl is a useful language to know. You can do many sysadmin things in five lines of perl that would take many times as much in Java.

p.s. you are showing your Windoze biases talking about "registry" as there is no such think in Linux, BSD, etc. All that stuff is kept in ascii text files.
+Pie Number of slices to send: Send
Great replies, thanks for your suggestion and I have known what should I do.
You guys replied very well specially Pat,ending my curiosity ,I am completely satisfied.

I will learn Perl and Python too but after finish some Java stuffs.

best regards,
omi
[ August 13, 2008: Message edited by: omi sharma ]
I didn't say it. I'm just telling you what this tiny ad said.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 3519 times.
Similar Threads
System.out.println equivalent?
Invoke Java from Perl
doubt about a part 1 question
Regarding file and database system
JBOSS SocketException PermissionDenied
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:39:13.