Checking for valid (and working) host name/ip
hi
i have posted this in other topic, but i think it was the wrong forum... so if you wanna try to help me...
http://forum.java.sun.com/thread.jspa?threadID=603987
no that was the right forum, although it gets low traffic. This is not the right forum for that quesiotn. Your best bet is the "Java Programming" or "New To Java" forums.
Similar Messages
-
Checking for valid (and working) address
(sorry if i posted in the wrong forum... i didn't found any that suits better my problem)
that's the question: i have a string and need to check if it's a valid host name/ip address and also check if it's up and running at the moment. to solve the host name, i have the following code:
try {
URL url = new URL(sURL);
HttpURLConnection uc = (HttpURLConnection) url.openConnection() ;
uc.setRequestMethod("GET") ;
uc.connect();
uc.getResponseMessage();
catch (IOException ioe) {
//wrong url/not working
but it doesn't work with ip addresses. Someone suggested me to use InetAddress.isReachable(int), but it's only avaliable since Java 1.5, and i must use 1.4. Another way around would be to use InetAddress.get(Canonical)HostName(), but it may fail even with a valid ip address, and i can't allow that.
can someone give me a hand?
thanks!(sorry if i posted in the wrong forum... i didn't
found any that suits better my problem)
that's the question: i have a string and need to
check if it's a valid host name/ip address and also
check if it's up and running at the moment. to solve
the host name, i have the following code:Easy - it isn't possible at all.
If and only if you were to use ICMP (which you can't in 1.4 using just java) and if and only if the target computer responded to ICMP then you could use that.
That is seldom very useful because generally one doesn't care if a computer responds to ICMP. What they need to know is if the computer is actually doing what it is supposed.
For example if you have an http server, what you care about is if it is actually handling http requests. (The computer can be up and not handling http requests.)
Not to mention of course that a host name requires that the DNS server respond to it first. And just because the DNS server is failing it doesn't mean that the target PC is failiing.
But if you really want to do nothing but ICMP then you can use Runtime.exec() and an OS specific command (usually 'ping') to do just that. -
TS3899 email was working then all of a sudden its "checking for updates" and wont update
My Iphone 4s was working fine and now I can't get the email to update. I have deleted my account and it still isn't working. Everything else internet wise is working, just not the email. Any ideas?
I can send emails, but when it is "checking for mail" and the circle is moving, it never stops, just keeps searching. I checked my email from my computer and I had 10 new emails, so I know they are waiting for me, I can't even retrieve emails that I have read and are still on my account. It won't bring up the accounts at all
-
The download of icloud control panel v2.0 does not work. I habe no box to check for calendar and contacts. Whats wrong?
Thanks ChrisHi, I came across the same problem and was not able to open any iCloud folders on Outlook, and iCloud was continusly asking to repair the iCloud Control Panel. Got the issue fixed by following the steps on the link http://somanytips.com/fix-icloud-error-repair-the-icloud-control-panel-to-use-ic loud-with-outlook/
-
Check for null and empty - Arraylist
Hello all,
Can anyone tell me the best procedure to check for null and empty for an arraylist in a jsp using JSTL. I'm trying something like this;
<c:if test="${!empty sampleList}">
</c:if>
Help is greatly appreciated.
Thanks,
Greeshma...A null check might not be you best option. If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
In the C# method, first check if either is an empty string, if so return an empty string.
If not, TryParse the data, if successful, return a valid data string for EventDate. If not, error or return empty string, whichever satsifies the requirement. -
Why yahoo/gmail retrieval and facebook app so so slow when in WIFI. But using the internet to check for emails and facebook is fast using the same WIFI connection??
Hi SandyS_VZW,
Yes tried resetting the wifi connection and problem still persist.
Here it is...to make it clear. Connected thru the same wifi at home...
-> emails (yahoo/gmail) and facebook WEBSITES are working fine and fast when using/accessing thru a browser (chrome/samsung browser) - no problem with this.
-> emails (yahoo/gmail) and facebook APP is soooooo sloooww (thru the App). Slow I mean comparing it to using their browser/websites... news feeds/emails refreshing so quickly but not when using the APP installed in Samsung Galaxy Note 4. Slow like - It will take around 5-10minutes just to get your emails and news feed refreshed.
THIS HAPPENS ONLY WHEN CONNECTED THRU A WIFI which has a speed of 10-20mb. It is not happening when connected to the network data/plan.
My wife has the same Samsung Galaxy Note 4 (coming from different provider at&t) - same setup (emails, fb app), same wifi connection, but she's not experiencing anything like it.
Not sure why, I dont want to believe that while connected to a WIFI, Verizon is restricting anything and ******* me off to make me switch to my data plan connection everytime - which is Unfair!
Was there a known issue similar about this case?
thanks, -
What do I do to check for viruses and or remove them if there is one? I have never had a problem with my mac until now. It is running VERY slow
This is what it came up with.... any ideas?
EtreCheck version: 1.9.11 (43) - report generated May 27, 2014 at 11:07:36 PM CDT
Hardware Information:
MacBook Pro (15-inch, 2.53GHz, Mid 2009)
MacBook Pro - model: MacBookPro5,4
1 2.53 GHz Intel Core 2 Duo CPU: 2 cores
4 GB RAM
Video Information:
NVIDIA GeForce 9400M - VRAM: 256 MB
System Software:
OS X 10.9.3 (13D65) - Uptime: 1 day 23:26:50
Disk Information:
Hitachi HTS545025B9SA02 disk0 : (250.06 GB)
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) / [Startup]: 249.2 GB (20.75 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
MATSHITADVD-R UJ-868
USB Information:
Apple Inc. Built-in iSight
Apple Internal Memory Card Reader
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Computer, Inc. IR Receiver
Apple Inc. BRCM2046 Hub
Apple Inc. Bluetooth USB Host Controller
Gatekeeper:
Anywhere
Kernel Extensions:
[not loaded] com.rim.driver.BlackBerryUSBDriverInt (0.0.39) Support
[not loaded] com.rim.driver.BlackBerryUSBDriverVSP (0.0.39) Support
Problem System Launch Daemons:
[failed] com.apple.wdhelper.plist
Launch Daemons:
[loaded] com.adobe.fpsaud.plist Support
User Launch Agents:
[loaded] com.adobe.ARM.[...].plist Support
[loaded] com.macpaw.CleanMyMac.helperTool.plist Support
[loaded] com.macpaw.CleanMyMac.trashSizeWatcher.plist Support
[loaded] com.macpaw.CleanMyMac.volumeWatcher.plist Support
[running] com.whitesmoke.uploader.plist Support
User Login Items:
iTunesHelper
AdobeResourceSynchronizer
Internet Plug-ins:
JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
FlashPlayer-10.6: Version: 13.0.0.214 - SDK 10.6 Support
Default Browser: Version: 537 - SDK 10.9
AdobePDFViewerNPAPI: Version: 11.0.06 - SDK 10.6 Support
AdobePDFViewer: Version: 11.0.06 - SDK 10.6 Support
Flash Player: Version: 13.0.0.214 - SDK 10.6 Support
QuickTime Plugin: Version: 7.7.3
Silverlight: Version: 5.1.10411.0 - SDK 10.6 Support
iPhotoPhotocast: Version: 7.0
Safari Extensions:
WhiteSmoke: Version: 1.0.0.1
Vidx: Version: 2.0
DivX Plus Web Player HTML5 <video>: Version: 2.1.2.145
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 2.0 - SDK 10.9
AppleAVBAudio: Version: 203.2 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins:
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
User Internet Plug-ins:
Move-Media-Player: Version: npmnqmp 071801000001 Support
fbplugin_1_0_1: Version: (null) Support
3rd Party Preference Panes:
Flash Player Support
Time Machine:
Time Machine not configured!
Top Processes by CPU:
12% DashboardClient
6% coreaudiod
6% WindowServer
5% repair_packages
3% VLC
Top Processes by Memory:
549 MB repair_packages
143 MB com.apple.WebKit.WebContent
131 MB Safari
119 MB installd
94 MB mds_stores
Virtual Memory Information:
809 MB Free RAM
1.82 GB Active RAM
224 MB Inactive RAM
630 MB Wired RAM
3.66 GB Page-ins
207 MB Page-outs -
I don't know why whenever i choose " check for updates " and download itunes 11.1 on my desktop , it never shows any downloads .. even when i tried downloading it from the website, and i need itunes 11.1 so i can restore my iphone again .. help please
When you see a beachball cursor or the slowness is especially bad, note the exact time: hour, minute, second.
These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
Launch the Console application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad and start typing the name.
The title of the Console window should be All Messages. If it isn't, select
SYSTEM LOG QUERIES ▹ All Messages
from the log list on the left. If you don't see that list, select
View ▹ Show Log List
from the menu bar at the top of the screen.
Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
Please don't indiscriminately dump thousands of lines from the log into this discussion.
Please don't post screenshots of log messages—post the text.
Some private information, such as your name, may appear in the log. Anonymize before posting. -
Patch 1.1.3 - check for updates not working?
Hi all;
I can't get the check for updates to work.
Help/About shows I am running version 1.1.2.25, build main 25.79
Help/check for updates has the "Official Oracle extensions and Updates" and the "Oracle SQL Developer" boxes checked
When I search, it says no updates available. Do I need need to add another Update Center?
I'm running it on Windows XP, SP2
Thanks
AlTry Help -> About -> Extensions and check the version
of Oracle SQL Developer. If this shows 1.1.3.27.66,
then you have already upgraded to 1.1.3.
Unfortunately, the version details on Help -> About
-> About are the details of the last full install -
they are not updated when upgrading via Check for
Updates.That is it. Thank you very much for your help
Al -
I have installed itunes 10.7 several times, all goes well. After reeboot, I go to check for updates and it still wants to update to version 10.7! I cant sync to my iphone4 because I get an error message saying I need version 10.6.3 or later. Help
Thank you for getting me started on the track by mentioning "Revo" Uninstaller. The results of "Revo" spoke volumns on why a successful install of ITunes is so difficult to achieve. It is the evil "BONJOUR".
I then tripped upon the following site by Apple and the detailed directions (I read, printed, re-read and followed the instructions. It was intense) brought a successful ITunes, Quick Time and the lovely Bonjour home. Thank you for the start JD42.
http://support.apple.com/kb/HT1923 -
Duplication check for Lead and Contact
Hi,
Can i confirm that, there is no duplication check for Lead and Contact during the new reacord adding?
I also realise that during the Lead convertion, CRMOD also never check for duplication even i have existing contact available?
Is there anyway for us to activate the duplication check during the Lead convertion?
Regards,
SKSK,
System can check duplicate if you add external id for record (Lead and Contact).
For more information please refer topic 'About record duplicates and external ids' on page no.1303 of OnDemand help.
Hope this helps.
Santosh -
When firefox checking for updates and updates found but due to proxy restrictions it unable to download the updates then it continue trying to download that and this time it creating problem on executing javascript and raising errors.
What are the error messages you are seeing?
-
Why won't my iMac print consistantly to my compatible HP 6500A? I've checked for updates and downloaded the lasted software...still can't print. All my other Mac devices find the printer but the iMac is hit and miss. I'm operating the Mac OS X Lion 10.7.
When you say hit and miss do you mean sometimes you print a whole document with no problems, or do you mean each document has problems? This is from HP's website for your printer:
Your sig says 10.6.7 but your message says 10.7. So if it's really Lion, this printer isn't officially supported. Elsewhere on HP's site it says updated drivers will be available on your Mac via Software Update. Have you run that recently? -
I purchased a song but when downloading it says it is corrupted. So I go to store and check for downloads and it does the same thing
I'd report the problem to the iTunes Store.
Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
Find the item that is not downloading properly. If you can't see "Report a Problem" next to the entry, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.
(Not entirely sure what happens after you click that link, but fingers crossed it should be relatively straightforward.) -
I try to open mozilla this last week and it will not open it for me. It sais it is open already but there is nothing on my computer. I had mcafee check for viruses and said there was none. I tryed uninstalling and reinstalling but it did not help.
See
* http://support.mozilla.com/en-US/kb/Firefox%20will%20not%20start
Maybe you are looking for
-
Hello, I have a text field which can display up to 4 lines in Arial, size 9. I want to change the font size when there are more than 4 lines in it. Is there a way to count carriage returns in a field? e.g. IF string.count(:RECIPES, "<cr><lf>") > 3 TH
-
How much space is required in order to install the SCCM client via SCCM 2012 Server.
-
Hi. When I look under bookmarks, there used to be something I could click on that said show all tags, so I could find things. Now all I see is recent tags. Where can I find ALL my tags? I have spent so much time clicking on things and looking, but th
-
Hi, I was looking to create a new report, all I want to do is to run a report that shows a users activities so if they have updated a record, or created/modified notes. I tried the followingbut I got an error of The report cannot be displayed. (rsPr
-
Hi! I'm replicating the PPOMA from ECC6 to SRM, after process the idoc's, everything is being creating correctly except that SRM does not assign an business partner number to the users. Do you have any idea ? Is there any infotype required in the use