just finished my beginning java class, and i want to continue on my own. The real problem i am having is thinking of a program idea that can actually be useful to me.
i work in IT, so i am thinking about a GUI with a lot of the tools that i normally use (ping, nslookup,etc). So i have a couple of questions:
1. Are there libraries that integrate with a business domain network?
2. Is is possible to achieve without learning a second language like powershell?
3. Am I biting off more than i can chew?
2) You don't need to learn PowerShell. Java can run operating system commands (think DOS/UNIX command line or wherever you type "pijng" now.)
3) I think this is something you'll be able to do. You'll have to learn about JavaFX or the like to make the GUI. I recommend starting with a command line program to get the logic working before adding a GUI.
well, what i mean for #1 is this:
i have the network admin password at work. a number of command line instructions require you to run cmd as administrator.
also, a lot of things(like moving/creating files) are denied unless you are the administrator.
I was wondering if there are any special things to include to allow that, when writing the program.... i'm not doing a good job
of explaining myself.
Also, a friend told me about swing for gui. would you say javafx is better?
If your want your java program to be able to do things that require administrator privileges then you will have to run it as a user that has those privileges.
Or for example if you are running on Linux then you can get the administrator to configure the sudoers file to give the application the relevant privileges, and then non-root users can run it under sudo.
You can probably do something similar under windows too. This is all system administrator stuff though, not something that you do in Java.
If your program attempts to do something that requires root access but it doesn't have the right permissions then an Exception will probably be thrown. It would be the programmers responsibility to handle exceptions and inform the user of the error.
6. Is JavaFX replacing Swing as the new client UI library for Java SE?
Yes. However, Swing will remain part of the Java SE specification for the foreseeable future, and therefore included in the JRE. While we recommend developers to leverage JavaFX APIs as much as possible when building new applications, it is possible to extend a Swing application with JavaFX, allowing for a smoother transition.
If the past is any indication, it will be a decade (or forever) before they actually remove Swing. But you are learning from scratch, so you might as well learn the new way first!
I have scoured the inter-web, and i return with fresh confusion! Jeanne, you were completely right about starting on the back end first.
It does no good making something pretty if it doesn't actually do anything.
Hessein, thank you for the socket programming tip. The general opinion online is that using ping is a dumb idea, so am trying sockets.
Below is the code I am using. It returns false every time I run it, regardless of what port or address used. Any Ideas on where this approach fails?
So you made a portal in time and started grabbing people. This tiny ad thinks that's rude:
a bit of art, as a gift, the permaculture playing cards