P.E.I Weather from examples.telnet.WeatherTelnet.java

Q

How to get P.E.I weather forecast from examples.telnet.WeatherTelnet.java?

✍: FYIcenter.com

A

If you want to get weather forecast on P.E.I (Prince Edward Island) from examples.telnet.WeatherTelnet.java, you need to go to the main menu and select "Canadian forecasts" as shown below:

C:\fyicenter>\local\jdk-1.8.0\bin\java 
   -cp .;C:\local\commons-net-3.5\commons-net-3.5.jar
        ;C:\local\commons-net-3.5\commons-net-examples-3.5.jar 
   examples.telnet.WeatherTelnet

Press Return to continue: <Enter>

Press Return for menu 
or enter 3 letter forecast city code-- <Enter>

                 WEATHER UNDERGROUND MAIN MENU
                ******************************
                 1) U.S. forecasts and climate data
                 2) Canadian forecasts
                 3) Current weather observations
                 4) Ski conditions
                 5) Long-range forecasts
                 6) Latest earthquake reports
                 7) Severe weather
                 8) Hurricane advisories
                 9) Weather summary for the past month
                10) International data
                11) Marine forecasts and observations
                12) Ultraviolet light forecast
                 X) Exit program
                 C) Change scrolling to screen
                 H) Help and information for new users
                 ?) Answers to all your questions
                 
                  Selection:2

                         CANADIAN FORECASTS
       --------------------------------------------------------
      1) Southern Alberta             12) Southern Ontario
      2) Northern Alberta             13) Northern Ontario
      3) Coastal British Columbia     14) Northwest Ontario
      4) Interior British Columbia    15) Southern Saskatchewan
      5) Southern Manitoba            16) Northern Saskatchewan
      6) Northern Manitoba            17) Yukon
      7) Nova Scotia                  18) Western Quebec
      8) Prince Edward Island         19) Central Quebec
      9) New Brunswick                20) Northwest Territories
     10) Labrador                     21) Ottawa, SE Ontario
     11) Newfoundland
      M) Return to main menu
      X) Exit program

         Selection: 8

000
FPCN15 CWHX 191445
FORECASTS FOR PRINCE EDWARD ISLAND ISSUED BY ENVIRONMENT CANADA AT
11.00 AM AST SATURDAY 19 NOVEMBER 2016 FOR TODAY AND SUNDAY.
THE NEXT SCHEDULED FORECAST WILL BE ISSUED AT 4.00 PM.

PRINCE EDWARD ISLAND.
TODAY..CLOUDY. PERIODS OF RAIN BEGINNING NEAR NOON. AMOUNT 2 TO 4 MM.
 FOG PATCHES. WIND NORTHEAST 30 KM/H GUSTING TO 50. HIGH 9.
TONIGHT..PERIODS OF RAIN ENDING AFTER MIDNIGHT THEN CLOUDY. AMOUNT 10
 TO 15 MM. FOG PATCHES. WIND NORTHEAST 20 KM/H BECOMING LIGHT LATE
 THIS EVENING. TEMPERATURE STEADY NEAR 8.
SUNDAY..CLOUDY WITH 30 PERCENT CHANCE OF SHOWERS. FOG PATCHES.
 HIGH 11.

END

000
FPCN54 CWHX 191435
EXTENDED FORECASTS FROM SUNDAY NIGHT 20 NOVEMBER TO FRIDAY 25
NOVEMBER FOR NEW BRUNSWICK ISSUED BY ENVIRONMENT CANADA AT
11.00 AM AST SATURDAY 19 NOVEMBER 2016.

   Press Return to continue, M to return to menu, X to exit: X

 

Using commons-net.jar in Java Programs

⇒⇒FAQ for Apache commons-net.jar

2017-05-05, 357👍, 0💬