Need help with opening DatagramSocket

Hello I want to make a socket connection this is my code
public void run()
int s=0;
MakeConnection(s);
In MakeConnection I have thisvoid MakeConnection(int s) throws IOException
int port =1234;
DatagramSocket client = new DatagramSocket(port);
When I compile this code this is said
unreported exception java.io.IOException; must be caught or declared to be thrown.
Can anyone help me with this fault.
And is it possible to get
int s = client;
Because when I do it with c I can do
int s;
s = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
en than s is 10 on my computer and in my java code I need to receive s=10 too.

Do you know what exceptions are? If not, read about them in the Java Tutorial:
http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html
In the method run(), you call the method MakeConnection(), which might throw an IOException.
Since IOException is a checked exception, you must in the method run() specify what you're going to do when an IOException happens. You must either catch the exception (put the call to MakeConnection in a try / catch block) or indicate that run() can throw an IOException by specifying it at the beginning of the method:
public void run() throws IOException { ...
But note that you'll just be moving the problem to the method that calls run(). Somewhere in your program you must catch and handle the exception.

Similar Messages

  • Need help with open hub

    Hi eveybody,
             I was trying to wok with open hub. Created infospoke, destination i gave was a csv file named d:/openmara.csv path, saved and activated the info spoke. I went to d:/ to view the uploaded files, two file was created, when i try to open a file it says "unable to read" , when i tried to open the second one i could open the file and see some datas but not in a correct format, why is that?
    Then i tried to load the data in database, so in the infospoke i selected the option for destination as database,saved and activated the infospoke, now where should i go to see the uploaded datas physically?
    Could anyone help me with this.
    Thanks,
    RR.

    Hi,
    Thanks for the reply. I created a infospoke and destination was database option. Opened the se16 gave the table name which starts with /bic/....(please correct me if i am wrong),then the initial screen of se16 came up with all the fields , but when i executed it, the table is empty.Could you say why it is happening.
    Thanks,
    RR.

  • I need help with opening attachment on email?

    I need help to set  association to open attachment on email?

    First i would suggest update Reader to XI.
    To set the default application you may visit this article: http://windows.microsoft.com/en-in/windows/change-default-programs#1TC=windows-7 this article is for windows 7 but it will hold good for vista too.
    let me know the result.
    ~Ajlan Huda.

  • Re: Need help with open a web page

    Dear friend i cant open www.truperenlinea.com maybe you can support me because i install IE but other 5.2 version,
    i dont want install parallel and Windows, you can try to open for me and explain me.
    See the right side in the web need can see the username and password space to fill.
    Thank you so much
    Best regards

    Sorry, I got confused.
    You need to stick you your original post.
    Please don't post in someone elses thread, especially when the thread is completely in the wrong place to begin with and you post has nothing to do with the original post.

  • Need help with opening ports on airport extreme

    My vonage phone is connected to airport extreme router, voice quality of phone calls was poor. Vonage tech support says   vonage port on my airport extreme was closed and i need to open it.
    Here is my chat details with vonage tech support-
    The following ports are needed for Internet communication between the Vonage adapters and the Vonage servers.
    SIP: Port 5061 UDP
      RTP (Voice) Traffic: Ports 10000-20000 UDP. When a call is made, a random port between 10000 and 20000 is used for RTP (Voice) traffic. If any of these ports are blocked, you may experience one way or no audio.
    Please do suggest me the way to open the ports on airport extreme
    Thanks
    Venki

    Instructions for opening ports is here.
    https://discussions.apple.com/docs/DOC-3415
    You should be fine opening the whole range, 10000-20000

  • Need help with open folder (in Explorer) and click on Toggle Transparency Grid

    hi guys, can i with Extended script enable Toggle Transparency Grid ? i try using app.executeCommand( app.findMenuCommandId(Toggle Transparency Grid));and nothing.
    and also can i some how open folder in windows explorer via Extended script? i try google but find only examples for web-javascript.....
    thx

    Actually your command should consist quotes. It will look like this:
    app.executeCommand(app.findMenuCommandId("Toggle Transparency Grid"));
    But I`ve tried, and it doesn`t do what you need, because it launches Adobe Anywhere.
    Solution for second question is:
    var path = "C:/Program Files/Adobe/Adobe After Effects CC/Support Files/";
    var cmd;
    cmd = "";
    if($.os.indexOf("Win") != -1){
    cmd = "explorer " + String(path);
    }else{
    cmd += (("open \"" + String(path)) + "\"");          // change var path for Mac
    try {
    system.callSystem(cmd);
    }catch (e){
    alert(e);

  • Need help with opening file

    Hi All,
    I have several files like the one below that Apple transferred from my old PC to my macbook when I bought it. I would like to open them up and see what is in them but do not know how. They do not open with iPhoto. If I try to I get a window saying unreadable script.
    Here is the window when i try to open with iphoto:
    I am currently with 10.6. When the files were imported from the old PC I was at 10.5.  I'd like to open them to see if I want to keep them or not.
    Thanks
    Ron

    I got your last reply about the incompatability via e-mail notification. However I could not open a new window to respond directly.
    Anyway, I have been able to open most of the old PC stuff but I have not paid attention as to what file types work or not. Sounds like your correct though with the incompatability.
    Thanks
    ROn

  • Need help with opening text documenton IPOD

    Hi
    I have some documents notes I made on Word and Text Edit that I would like to be able have handy in my IPOD Touch.
    Can you pls help me?
    thanks!

    Do you know what exceptions are? If not, read about them in the Java Tutorial:
    http://java.sun.com/docs/books/tutorial/essential/exceptions/index.html
    In the method run(), you call the method MakeConnection(), which might throw an IOException.
    Since IOException is a checked exception, you must in the method run() specify what you're going to do when an IOException happens. You must either catch the exception (put the call to MakeConnection in a try / catch block) or indicate that run() can throw an IOException by specifying it at the beginning of the method:
    public void run() throws IOException { ...
    But note that you'll just be moving the problem to the method that calls run(). Somewhere in your program you must catch and handle the exception.

  • Need help with opening groups folders in contacts after installing iOS 6

    when i go to my group list in contacts I can not open any of them after updating iPhone 4 to iOS 6
    only thing that happens when i click on a gruop name is to add or delete check mark
    Please advice

    The checks are meant to indicate which group of Contacts you want to see when you tap "Done." If you have one group checked and you press "Done" you should see the Contacts for that group. If you check more than one group, when you press "Done" you should see all Contacts for all the checked groups combined into a single list.
    I'm afraid I still don't understand what is happening when you tap "Done" - provided you have at least one group checked, that should bring you back to the listing of Contacts.

  • Need help with opening and creating new card

    Does anyone know why when I try to create a new card, in PSE 6 that the file tries to open then shuts.  I have created cards before without any problem.  I don't know what has changed??????

    Does anyone know why when I try to create a new card, in PSE 6 that the file tries to open then shuts.  I have created cards before without any problem.  I don't know what has changed??????

  • I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    I need help with the photo stream. Everytime I try to open it on my PC it says photo stream is unable and I have tried everuthing to enable it but it doesn't work. Any help, please?

    Freezing, or crashing?
    ID on the Mac can produce reports that may (or may not) prove helpful in diagnosing the problem. I suspect this is something not directly related to InDesign, and maybe not to any of the Adobe apps directly since you seem to be having a problem in more than one. That often inidcates a problem at the system level.
    Nevertheless, it won't hurt to try to gather the reports. You'll find driections for how to generate them, and to post them on Pastebin.com (then put a link to them here) so we can see what's going on at Adobe Forums: InDesign CS5.5 Not Responding
    Do you happen to run a font manager? If so, which one, and waht version?

  • Need help to open and look for file by name

    Hi,
            Im needing help to open a folder and look for a file (.txt) on this directory by his name ... The user ll type the partial name of file , and i need look for this file on the folder , and delete it ....
    How can i look for the file by his name ?
    Thx =)

    Hi ,
        Sry ,, let me explain again ... I ll set the name of the files in the follow order ... Name_Serial_date_chanel.sxc ..
    The user ll type the serial that he wants delete ...
    I already figured out what i need guys .. thx for the help ^^
    I used List Directory on advanced IO , to list all .. the Name is the same for all ... then i used Name_ concateneted with Serial(typed)* .. this command serial* ll list all serials equal the typed , in my case , ll exist only one , cuz its a count this serial .Then i pass the path to the delete , and its done !
    Thx ^^

  • Need help with a currently "in-use" form we want to switch to Adobes hosting service

    Hi, I am in desperate need of help with some issues concerning several forms which we currently use a paid third party (not Adobe) to host and "re-distribute through email"...Somehow I got charged $14.95 for YOUR service, (signed up for a trial, but never used it)..and now I am paying for a year of use of the similar service which Adobe is in control of.  I might want to port my form distribution through Adobe in the hopes of reducing the errors, problems and hassles my customers are experiencing when some of them push our  "submit button". (and I guess I am familiar with these somewhat from reading what IS available in here, and I also know that, Adobe is working to alleviate some of these " submit"  issues, so let's don't start by going backwards, here) I need solutions now for my issues or I can leave it as is, If Adobe's solution will be no better for my end users...
    We used FormsCentral to code these forms and it works for the most part (if the end-user can co-operate, and thats iffy, sometimes), but I need help with how to make it go through your servers (and not the third party folks we use now), Not being cruel or racist here, but your over the phone "support techs" are about horrible & I cannot understand them or work with any of them, so I would definitely need someone who speaks English and can understand the nuances of programming these forms, to please contact me back. (Sorry, but both those attributes will be required to be able to help me, so, no "newbie-interns" or first week trainees are gonna cut it).... If you have anyone who fits the bill on those items and would be willing to help us, please contact me back at your earliest convenience. If we have to communicate here, I will do that & I can submit whatever we need to & to whoever we need to.
    I need to get this right and working for the majority of my users and on any platform and OS.
    You may certainly call me to talk about this, and I have given my number numerous times to your (expletive deleted) time wasting - recording message thingy. So, If it's not available look it up under [email protected]
    (and you will probably get right to me, unlike my and I'm sure most other folks',  "Adobe phone-in experiences")
    Thank You,
    Michael Corman
    VinylCouture
    Phenix City, Alabama  36869

    Well, thanks for writing back...just so you know...I started using Adobe products in 1987, ...yeah...back then...like Illustrator 1 & 9" B&W Macs ...John Warnock's Helvetica's....stuff like that...8.5 x 11 LaserWriters...all that good stuff...I still have some of it working on a mac...much of it was stuff I bought. some stuff I did not...I'm not a big fan of this "cloud" thing Adobe has foisted upon the creatives of the world...which I'm sure you can tell...but the functionality and usefulness of your software can not be disputed, so feel free to do whatever we will continue to pay for, ...I am very impressed with CC PS on the 64 bit PC and perhaps I will end up paying you the stipend that you demand for the other services.
    So  I guess that brings us to our problem.. a few years back and at the height of the recession and near bankruptcy myself,  I was damn lucky and hit on something and began a small arts and crafts supply service to sell my products online to a very "niche market" ...I had a unique product and still sell that product (plus others) online...My website is www.vinylcouture.com...Strange? Yes...but there is a market it seems, for everything now, and this is the market I service...Catagorically, these are 99%+ women that use these "adhesive, sticky backed vinyl products"  to make different "craft items" that are just way too various and numerous to go into... generally older women, women who are computer illiterate for the most part...and all this is irrelevant to my problem, but I want you to have every bit of background on this and especially the demographic we are dealing with, so we can get right to the meat of the problem.
    OK...So about two years ago, I decided to offer a "plain sheet" product of a plain colored "stick back" vinyl... it is available in multiple quantities of packs ( like 5 pieces, 10 pieces, 15 pieces, in a packi  & so on)...and if you are still on my site.. go to any  "GO RIGHT TO OUR ORDER PAGE"  button, scroll down a little...and then to the "PLAIN VINYL" section...you will see the Weebly website order process.) You can back out from here, I think,..but, anyway this product is available in 63 colors + or - a few. So then the problem is,  how do they select their individual colors within that (whatever) pack?... .
    So my initial idea was to enable a "selection form" for these "colors" that would be transmitted to me via email as 'part" of the "order process".. We tried getting our customers to submit a  " a list" ( something my competitiors still do, lol, poor bastards)......but that..is just unbelievable..I can't even begin to tell you what a freakin' nightmare that was...these people cannot even count to 10, much less any higher... figuring out what colors to list and send me... well, lets just say, it wasn't working......I had to figure out a better way...Something had to be done.
    So after thinking this all out,  and yeah...due to my total ignorance, i figured that we could make a form with Live Cycle Designer (Now Forms Central)...(back then something that was bundled with Adobe Acrobat Pro), I believe, and thats what this thing was authored in... and it would be all good...LOL!
    Well not so simple...as you well know, Adobe Acrobat would NOT LET YOU EMAIL anything from itself.....it just wouldn't work (and I know why, and all that hooey), but not being one to take NO for answer,.I started looking for a way to make my little gizmo work.. So I found this company that said they can "hijack" (re-direct actually) the request to email, bypass the wah-wah, and re-transmit it to the proper parties.....for less than $100 a year,  I think...its called http://pdf-fillableforms.com/.
    A nice gentleman named Joseph Silva helped us program the thing to go to his servers and back out. Please dont hassle them...I need them...for now..it basically does work...try it...you should get back a copy of the form that you filled out...good luck however,  if you're on MAC OSX or similar...
    I have included a copy of both of our forms (and feel free to fill it out and play with it)...just put test somewhere on it...(and you must include YOUR email or it will balk)..they are supposed to be mostly identical, except one seems to be twice as large....generating a 1.7 meg file upon submission, while the other one only generates a 600K file or so...thats another issue for another day or maybe you can advise on that also...
    OK so far so good......In our shop, once Grandma buys a 10 pack (or whatever), Only then she gets to the link on her receipt page ro the relevant "selection form" ,(this prevents "Filling and Sending"  with "no order" and "no payment", another early problem we had)... which they can click on and it will usually download and open up on their device if all goes well...Then our little form is supposed to be fillable and is supposed to ADD UP all the quantities, so grandma knows how many she is buying and so forth right on the fly,  and even while she changes her mind..., and IT'S LARGE so grandma can see it, and then it TOTALS it all up for them, ( cause remember, they can NOT add)..,  except there is a programming bug (mouse-click should be a mouse-up probably or something..) which makes you click in the blank spaces to get to a correct TOTAL...about 70-80% of our customers can enable all these features and usually the process completes without problems for them especially on PC's running Windows OS and Acrobat Reader X or XI...at least for most... Unfortunately it is still not the "seamless process" I would like or had envisioned for the other folks out there that do have trouble using our form....  Many folks report to us the following issues that we know of.  First of all it takes too much time to load up...We know its HUGE...is there anyway that you can see, to streamline this thing? I would love for it to be more compact...this really helps on the phones and pads as I'm sure you well know.
    Some just tell us,"it WON'T work"....I believe this is because they are totally out of it and dont even have Adobe Reader on their machine, & don't know how to get it ( yes, we provide the links).....or it's some ancient version....no one can stop this one...
    It almost always generates some kind ( at least one time)  of "error message" which we do warn them about..., telling one,  basically that "Acrobat doesnt even like this happening at all, and it could be detrimental to ones computer files", blah-blah...(this freaks grandma out really bad)...& usually they end up not even trying to send it...  and then I get calls that even you wouldn't believe...& If they DO nut up and push the Red "Submit Form" button, it will usually send the thing to us (and also back to them at the "required email address" they furnished on the form, thats what the folks at the "fillable forms place" do) so, if it's performing it's functions, why it is having to complain?. What are we doing wrong?....and how can I fix it?...Will re-compiling it or saving it as a newer version of "FormsCentral" correct any of these problems ?
    Ok, so that should keep you busy for a minute and we can start out with those problems...but the next thing is, how can I take advantage of YOUR re-direct & hosting services?, And will it get rid of the error messages, and the slowness, and the iOS incompatibilities ? (amazingly,  the last iOS Reader version worked almost OK.. but the newest version doesnt seem to work with my form on my iphone4)  If it will enable any version of the iOS to send my form correctly and more transparently, then it might be worth the money...$14.95 a MONTH you say. hmmmmm...Better be good.
    Another problem is, that I really don't need 5000 forms a month submitted. I think its like 70-100 or less....Got any plans for that?  Maybe I'm just not BIG ENOUGH to use Adobe's services, however in this case, I really don't care whose I do use as long as the product works most correctly for my customers as well as us. Like I said, If I'm doing the best I can, I won't change anything, and still use the other third party, If Adobe has a better solution, then i'm all for that as well. In the meantime, Thanks for any help you can provide on this...
    Michael Corman
    VinylCouture.com
    (706) 326-7911

  • Help with opening Adobe Reader and downloading updates

    I can not open Adobe .pdf files any longer (this started yesterday, prior to that I could open adobe files).
    When I double click a .pdf file I get this notice on my screen: Windows cannot access the specified device path or file. You may not have the appropriate permission to access file.
    So I went to the Adobe download site to download a new copy of Adobe.  When I start the download I get this on the screen:  The instruction at "0x0e3a0068" referenced memory at "0x0e3a0068."  The memory could not be written.  Then two options are listed: click OK to terminate or cancel to debug.  So I click on cancel and I get this on my screen: Internet Explorer has closed this webpage to help protect your computer.   A malfunctioning or malicious addon has caused I.E. to close this webpage.
    I don't have AVG running, I do have avast but I've disabled it.  I ran Registry Mechanic and an I.E. erasure program but nothing helps.
    I have gone into I.E. and reduced the security level to its lowest state but no joy.
    So, any ideas or suggestions on what's the problem and how to overcome it would be appreciated.  Thanks, in advance, for your reply.  Jim R.

    Hi Mike..tried that as well but no joy.  A friend of mine was looking at it all and noticed that it was an I.E. thing as far as not letting me redownload the reader so I went to Mozilla Firefox and I could download a new version but....whenever I attempt to open a .pdf file I get that message, "Windows can not open the specified device, path or file. You man not have the appropriate permissions to access the item." 
    Damn...this is irritating as I need to get to some of thos files as I need them for a Journal I'm working on as editor-in-chief. 
    It all worked just fine last Saturday but starting Monday when I was on my flight out to D.C.  no joy. 
    Sigh...Jim R.
    Jim R.
    Date: Tue, 1 Dec 2009 14:50:27 -0700
    From: [email protected]
    To: [email protected]
    Subject: Help with opening Adobe Reader and downloading updates
    Under the help menu, there is an option to repair the installation of reader. Did you try that?
    >

  • Need Help in opening a Link or URL

    Hi,
    I need help in opening a URL (on the same server where CLM application is deployed). I have added a Button on ToolBar and added the code. but it's not working. the same java program is working on my local system. below is the code.
    import java.io.*;
    import java.util.*;
    public class FileOpen
           public static void main(String[] args)       
                 FileOpen deleteList = new FileOpen();
                 String url="http://www.google.com/";
                   try {
                        String[] cmd = new String[4];
                        cmd[0] = "cmd.exe";
                        cmd[1] = "/C";
                        cmd[2] = "start";
                        cmd[3] = "c:
    amd_SCCMLog.txt";
                        System.out.println(" cmd"+cmd);
                        Process p = Runtime.getRuntime().exec(cmd);
                        System.out.println(" cmd1"+cmd);
                        Process process = Runtime.getRuntime().exec("notepad");
                        System.out.println(" cmd2"+cmd);
                        } catch (IOException ioe)
                             ioe.printStackTrace();
                 //System.out.println("Memberfarm: " + memberFarm);       
    Regards,
    Puneet Aggarwal

    Hi Puneet,
    What exactly are you trying to do? Can you describe where in the system you are doing it? There are different options....
    What about a document report with a link to the Web site URL you want to open?
    What about a read-only URL field on the document, populated with the URL you want to open?
    What about the desktop links channel?
    Lots of different ways to skin that cat (sorry cat lovers) ..your code looks like it might be the most difficult approach.
    -Howie Wexler
    www.craftysystems.com

Maybe you are looking for

  • How to populate a filter field in one page with the value from other page

    Take the classic report with form application. on page 1 (report) I have a filter (dbname) for the records that will appear in the report. Say that, I enter "ap02" in the filter and all records where dbname starts with "ap02" will display. It works o

  • BP Ref No.

    Dear Experts, I want to get BP Ref. no. on Vendor Liabilities Aging PLD. I tried Variable field but got error as Invalid Variable. then I tried on DB links but not getting actual information. sometime getting wrong data and sometime blank field. Plz

  • PDF conversion of smartform- Printing Latin -2 characters

    Hi All, We are facing a typical issue with Printing of Latin -2 characters in PDFs. These are characters from the Polish language for e.g. char 'Ń'. These were originally printing as # in the Production system. After raising a message with SAP, they

  • How to use MapViewer API?

    Hi, I have a problem that is acturally regarded to java programming. I want to use MapViewer JavaBean-Based API. I did the preparing work described in Mapviewer doc §4.2. I saved the demo jsp page "mapclient.jsp" in my own application folder (under o

  • ANSAL module for wage types !

    Hello, Can you please explain 1. What is the significance (why & when is it used) of ANSAL module in wage type configuration ? 2. How is this configured ? Thank You, Anthony