Stupid question - method missing from Socket class

I'm sure I am just missing something here. I am using getInputStream from Socket class successfully - now want to add setKeepAlive method - I am getting an error:
Method setKeepAlive(boolean) not found in class java.net.Socket.
client.setKeepAlive(true);
client is defined as a Socket
Socket client = origSocket.accept();
What am I screwing up here?? I know the classpath is correct since I am and have been using getInputStream with this socket for months!!
Thanks for any responses!
Beth

javac is the compiler, not the run-time. That would have nothing to do with what the classpath is at run-time, which would either be the system environment variable CLASSPATH, or the -cp command-line parameter to java, not javac.

Similar Messages

  • ParameterFieldController class and getDataDefController() method missing from com.crystaldecisions.reports.sdk.*

    I am trying to use the desktop samples for the JRC. The parameter setting sample will not compile because the ParameterFieldController class and the ReportClientDocument's getDataDefController() method are missing from com.crystaldecisions.reports.sdk.* .
    I have release 2 of Crystal Reports XI Developer and should have the most up to date jrcerom.jar file for that product. What is it going to take to get this working? This is a critical aspect of using Crystal Reports for our java application reporting needs.
    Prompt attention to this is appreciated.

    <p> </p><p>That class is not in that package, but another package imported in the sample, and in a different jar file. </p><p>The readme file should reference a deployment guide listing the required jar files, which I&#39;ve copied here:</p><p> <a href="http://support.businessobjects.com/communityCS/TechnicalPapers/cr_xi_r2_jrc_deployment.pdf" target="_blank">http://support.businessobjects.com/communityCS/TechnicalPapers/cr_xi_r2_jrc_deployment.pdf</a></p><p>Sincerely,</p><p>Ted Ueda </p>

  • JavaDoc: inherit method comment from jdk classes?

    My goal is to let custom classes inherit method comments from overridden methods of jdk classes. From the doctool documentation, I would assume that the way to go is to set the path to the jdk sources in the -sourcepath option. My problem is that this doesn't seem to work at all - looks like JavaDoc is simply not parsing the JDK source files at all.
    The relevant (methinks :) part of the verbose output:
    // these are the input options as created by ant run from eclipse under win2k
    Executing 'D:\jdk\150_u6\bin\javadoc.exe' with arguments:
    '-d'
    'D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\dist\javadoc'
    '-use'
    '-splitindex'
    '-verbose'
    '-classpath'
    'D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\lib\optional\MultipleGradientPaint.jar'
    '-sourcepath'
    'D:\jdk_doc\srcjdk1.5.0;D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\src\java'
    '-link'
    'file:D:/jdk_doc/jdk1.5b/docs/api'
    '-source'
    '1.5'
    'org.jdesktop.swingx.table'
    The ' characters around the executable and arguments are
    not part of the command.
    // following is the javadoc output
       [javadoc] [search path for source files: [D:\jdk_doc\srcjdk1.5.0,
    D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\src\java]]
       [javadoc] [search path for class files:
    [D:\jdk\150_u6\jre\lib\rt.jar, D:\jdk\150_u6\jre\lib\jsse.jar,
    D:\jdk\150_u6\jre\lib\jce.jar, D:\jdk\150_u6\jre\lib\charsets.jar,
    D:\jdk\150_u6\jre\lib\ext\dnsns.jar,
    D:\jdk\150_u6\jre\lib\ext\junit.jar,
    D:\jdk\150_u6\jre\lib\ext\localedata.jar,
    D:\jdk\150_u6\jre\lib\ext\sunjce_provider.jar,
    D:\jdk\150_u6\jre\lib\ext\sunpkcs11.jar,
    D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\lib\optional\MultipleGradientPaint.jar]]
       [javadoc] Loading source files for package org.jdesktop.swingx.table...
       [javadoc] [parsing started
    D:\JavaWorkspace\harvest\eclipse\javadesktop\jdnc-swingx\src\java\org\jdesktop\swingx\table\ColumnControlButton.java]
    ..snip..
       [javadoc] Constructing Javadoc information...
       [javadoc] [loading
    D:\jdk\150_u6\jre\lib\rt.jar(java/awt/ComponentOrientation.class)]
       [javadoc] [loading
    D:\jdk\150_u6\jre\lib\rt.jar(java/awt/Dimension.class)]
       [javadoc] [loading D:\jdk\150_u6\jre\lib\rt.jar(java/awt/Insets.class)]It doesn't seem to matter if javadoc is run from the commandline or through an ant task, the output is basically the same.
    The loading from the rt.jar might be the problem, at least when comparing to a report about (maybe exactly the same) problem back in 2004
    http://forum.java.sun.com/thread.jspa?forumID=41&threadID=536074
    The posters stated that the -sourcepath didn't appear to work under win, while it did work under Solaris. When working, the [loading..] output contained the path to the sources instead of to the classes.
    Any help, hint, thought, comment highly welcome!
    Thanks in advance
    Jeanette

    Hi Doug,
    thanks for your prompt reply!
    My first question is what does the source tree look
    below this directory:
    -sourcepath 'D:\jdk_doc\srcjdk1.5.0
    de]
    To work, the the full path to, say, String.java,
    would need to be:D:\jdk_docs\srcjdk1.5.0\java\lang\String.java
    Because -sourcepath must point to the root of the
    source tree. Is this what you have?
    exactly, that's the case. In the meantime, I tried to put the sources somewhere relative to the classes (to exlude the possibility that the absolute path poses a problem)I want to document - to no avail.
    >
    Are you thinking that the class files are loaded from
    rt.jar rather than the source .java files from the
    source tree?
    well, you are the expert to interpret the output :-) All I can be sure of is that this looks similar to output (for windows) in the old forum thread I mentioned and similar to a couple of bug reports. f.i.
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5079630 (which is closed as a duplicate) or
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5105600 which is still open (but probably should be closed - it's a usage error to point to the zipped sources).
    Hmm... thinking aloud: comparing my output to the output of the latter (it's quite analogous) it seems that in both cases the sources aren't found .. and the javadoctool falls back to get some search the missing information on the classpath. Maybe the question is: what could possibly go wrong (windows only) to not find the extracted sources (they are definitely there in my context ;-)?
    You might try setting -bootclasspath to the empty
    string, as describe here:
    http://java.sun.com/j2se/javadoc/faq/#bootclasspath
    I'll give it a try. BTW, this problem cropped up in the SwingLabs project, we are collectively scratching our heads in:
    http://forums.java.net/jive/thread.jspa?threadID=18409
    Thanks again!
    Jeanette

  • GetProperties() method missing from File Control

    Where is the getProperties() method on the File Control? I see all the other methods
    of the FileControl interface, but getProperties() is missing????

    <p> </p><p>That class is not in that package, but another package imported in the sample, and in a different jar file. </p><p>The readme file should reference a deployment guide listing the required jar files, which I&#39;ve copied here:</p><p> <a href="http://support.businessobjects.com/communityCS/TechnicalPapers/cr_xi_r2_jrc_deployment.pdf" target="_blank">http://support.businessobjects.com/communityCS/TechnicalPapers/cr_xi_r2_jrc_deployment.pdf</a></p><p>Sincerely,</p><p>Ted Ueda </p>

  • Method inheritence from abstract classes, and arguments

    I'm trying to do something a little weird. I'm writing a pretty complicated wrapper/adapter for two platforms, and I'd like to have an abstract method passed on to child classes, but with the type of the single argument specified by the child class. Is this possible?
    Example
    public abstract class AbstractParent {
    public abstract void foo([ambiguousType] arg);
    public class ChildOne extends AbstractParent {
    public void foo(TypeA arg) {
    //body
    public class ChildTwo extends AbstractParent {
    public void foo(TypeB arg) {
    //body
    }TypeA and TypeB have no common supertype beyond Object, and I'd rather not just do instanceof checks and throw errors. Does anyone know of a solution? Can I elaborate any better?

    Perhaps you could use generics?
        public abstract class AbstractParent<E> {
            public abstract void foo(E arg);
        public abstract class ChildOne extends AbstractParent<String> {
            public void foo(String arg) {
        public abstract class ChildTwo extends AbstractParent<Integer> {
            public void foo(Integer arg) {
        }

  • Stupid question: force booting from external FireWire drive

    My PowerBook is refusing to boot from it's hard drive (flashing ?/folder), which I'll be attempting to repair using DiskWarrior, etc.
    But it's also not finding and booting from the OS X installed on my external FireWire drive (which it could do under normal circumstances). How do I force it to do that given that I'm unable to set the Start Up Volume in the normal manner?
    PowerBook G4 17" 1.5GHz 512MB 80GB   Mac OS X (10.3.6)  

    Dale,
    Thanks for your response. I've been through the usual stuff as in your reference and I eventually got it to boot off the external HD by just leaving it long enough - it took maybe 10-15 minutes. I'm booted from it now. I hadn't thought of using the Startup Manager, but will try to remember next time.
    As for the internal HD, it's looking like it's dead - neither Disk Warrior nor Data Rescue II seem to be able to see it. I tried Disk Utility from the external HD, but it doesn't see it and nor does the Profiler. Maybe it's just a loose connection internally. There is a noise coming from the PB from about just under the division between the left hand rest and the speaker. It sort of sounds like a disk continually being read or written - ie. a sort of very rapid clicking, but I don't think it's the HD. And I don't think it's the fan. Anyone with any ideas before I call AppleCare?
    I did have a very similar problem a few weeks ago (http://discussions.apple.com/message.jspa?messageID=1465680#1465680), but Disk Warrior fixed it apparently with next to no problems. I was going to wipe the drive at the weekend & reinstall, but didn't get round to it in the end ... Fortunately I had a backup this time and was able to restore my user simply by copying it.

  • Compilation error while calling static method from another class

    Hi,
    I am new to Java Programming. I have written two class files Dummy1 and Dummy2.java in the same package Test.
    In Dummy1.java I have declared a static final variable and a static method as you can see it below.
    package Test;
    import java.io.*;
    public class Dummy1
    public static final int var1= 10;
    public static int varDisp(int var2)
    return(var1+var2);
    This is program is compiling fine.
    I have called the static method varDisp from the class Dummy2 and it is as follows
    package Test;
    import java.io.*;
    public class Dummy2
    public int var3=15;
    public int test=0;
    test+=Dummy1.varDisp(var3);
    and when i compile Dummy2.java, there is a compilation error <identifier > expected.
    Please help me in this program.

    public class Dummy2
    public int var3=15;
    public int test=0;
    test+=Dummy1.varDisp(var3);
    }test+=Dummy1.varDisplay(var3);
    must be in a method, it cannot just be out somewhere in the class!

  • SwingWorker, setting progress from other classes

    Hi.
    I'm interested in SwingWorker. It's very good tool for long running task in GUI applications. I want to use progress feature, but I don't want to code the logic of my long running task into its doInBackground() method. I have some class (which creates some other classes) which reflects my problem in reality. I want to use this classes for other problems too. So I would like to update progress from this class. Ideal case would be if the method setProgress() in SwingWorker was public, so I can create optional constructor with additional parameter for SwingWorker class (and its subclasses) and call method setProgress from this class. Does anybody know about some solution? I'm still thinking over, but I cannot find ideal solution.
    Thx for help

    Your configuration remains incomprehensible.
    From the other thread you mention a Listener which gets asynchronous messages. Are we talking about a context listener which handles JMS messages or the like? From these message you get a value and set it in a bean property.
    Then we get lost. You say you want to pass this value to a Servlet, presumably by passing a reference to the bean. But how is a particular incoming message associated with a transaction going through the Servlet? How do you imagine the bean reference being passed. A ContextListener doesn't see the web transactions. Should these bean values affect all subsequent transactions? Is there some kind of key in the web transaction that makes it look for data from a particular JMS message?
    In general the way for a ContextListener to pass data to a Servlet is by setting attributes in the ServletContext, but you really haven't made clear what you're trying to achieve.
    Try explaining in a more general way what your project is trying to achieve. You're concentrating on details which almost certainly don't contain the problem.

  • A really stupid question from newbie...

    hello all,
    i am very new to java and i am trying to build a j2ee application...
    rite now....i need to let my app communicate w/ an outside program thru' XML..
    i had just learnt many thing about java w/ xml and i decided to use the XMLEncoder... it seems quite simple to use...BUT i have no idea on how to send/receive these XML files...i had thought of using socket connection, but i just found out that an EJB wouldn't allow socket networking... i bet this must be quite a stupid question coz i found nowhere teaching me this...=P
    if u know about this, pls point me to some relevant docs / sites....i am anxious to learn about it...
    thx so much,
    karloogunna~

    hello maesj, rune, and others,
    thx alot for your advice...
    and here's the environment i am working in:
    OS: w2k
    JDK: 1.4.1.01
    j2ee: 1.3.1
    jboss: 3.0.2
    i am using flash as my UI, so i need communication
    between the j2ee app and flash.
    the data transfer involves a number of arrays of
    objects (each object w/ a list of attributes...) so, i
    think using XML as data-exchange is quite suitable (am
    i wrong on this??)I don't know the first thing about Flash, but using XML as a means for exchanging data seams like a good idea, for the scenario you described.
    >
    and i am reading about the message-driven beans, i see
    that they got a function onMessage() from where i can
    get the XML strings (?), but i don't know how i can
    feed these strings into this JMS from flash...do i
    need to write a small java program on the client
    side?I haven't that much experience with Message Driven Beans. What I do know is that they employ the Java Messaging Service (JMS). If you write a small client appplication with JMS support... you might be close.
    >
    also, i am not sure if i can send out XML strings
    through the message-driven beans, i am reading on the
    JMS...it got the MessageProducer, MessageConsumer,
    MessageListener, and MessageSelector....should i be
    using this? or can i use this together with the
    message-driven beans??
    In a Messaging system you will need message producers, and message consumers. To enable two-way communication, you can setup both the EJB and the client to handle both. When a message arrives at the consumer (or subscriber if you like), the JMS Service invokes the onMessage method. So you should implement your logic in the onMessage method, for example inspect the XML content, and act upon its content.
    i am very sorry for my disorganized questions...(i
    used to do low-level programming =P)
    and really thank you for your advice!!!!
    No problem, the amount of information to read can be quite overwhelming. Using JMS is just a suggestion, and might be considered overkill for your application. If you're using an IDE, like Sun ONE, creating a message driven bean is easy, and can be tried out, without too much hours passing.
    Kind Regards,
    Rune Bj�rnstad.

  • Calling a backend bean method from another class

    Hi,
    I'm new in JSF & in this forum so maybe this question is already aswer.
    My problem is that I made a jsf component to deal with a tree menu. The resources in the leaf nodes of the menu are stored in a action calling pattern (i.e.: #{myBean.myMethod}) & I'm looking for a way to bind & execute the call from the class of the component that treats the events.
    I suppose that I need to get the current instance of the context, get the bean location, instance it & invoke the method, but I don�t know how.
    I have another more question, may this resource invocation have any kind of undesirable side effect, I meen, it's me & not the faces context who is making the call so I'm not sure if that the best way to solve the problem.
    Thanks in advance.

    If I understand what you're saying correctly... you have a component which enables a user to select an action (leaf nodes in the menu). You are processing this selection in your component and now have a EL expression that looks like #{myBean.myMethod}. You now need to know how to use that expression from Java code to invoke it. Is that correct?
    If so:
    FacesContext ctx = FacesContext.getCurrentInstance();
    MethodBinding mb = ctx.getApplication().createMethodBinding("#{myBean.myMethod}", new Class[] {});
    mb.invoke(ctx, null);
    This should do what you want. If you need to pass arguments to the method, you can do that as well... you need to pass in the types via the Class[], and the objects via an Object[] instead of null.
    Note also that the API's for EL change for JSF 1.2 to the standard EL API's, however, the older API's (above) are still supported.
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • Calling Parameterized Method from one class to another class

    Hi, below is my sample code
    test.java
    public class test
         int op1[][]=new int[][]{{1,2},{2,3},{4,5}};
         int row=0;
        public void  test() {
              int op2[][]=new int[][]{{2,3},{4,5},{6,7}};
                             row=1010;
              getRow(row);
        int[][] getList()
             return op1;
       public  int getRow(int klm)
             System.out.println("Row Value in GetRow Method  is:     "+row);
             return klm;
    test_2.java
    package aa;
    public class test_2
    int a;
         test t11=new test();
         int abc[][] = t11.getList();
         int rowCount=t11.getRow(a);
         public void test_2()
              System.out.println("Row Value is:     "+rowCount);
              System.out.println("Value in abc[1][1] is:     "+abc[0][1]);
    main_class.java
    package aa;
    public class main_class {
         public static void main(String args[])
              test ab=new test();
              ab.test();
              test_2 ba=new test_2();
              ba.test_2();
        public main_class() {
    }now that my question is,for 'rowCount' in class test_2.java i need to get the value of 'row'(which is 1010)from class test.java. How could that be done?
    Any reply is highly appreciable.
    Thanks in advance

    netbeans2eclipse wrote:
    hmm, i did chaged the test object in main method to same as the test object that i used in test_2 (ie; i changed test ab=new test() in main_class.java to test t1=new test()).What? How does this help?
    Again, simplify the problem
    For instance, say you have a class, Fubar1, like so:
    class Fubar1
      int value = 0;
      public void setValue(int v)
        value = v;
      public int getValue()
        return value;
    }and two different Fubar2 classes, both which try to get the value from Fubar1, one doing it badly:
    class Fubar2Bad
      Fubar1 f1 = new Fubar1(); // totally internal Fubar1 object
      public int getFubar1Value()
        return f1.getValue();
    }and one that does it well, that holds a reference to whatever Fubar1 object is passed to it:
    class Fubar2Good
      Fubar1 f1;
      public Fubar2Good(Fubar1 f1)
        this.f1 = f1;
      public int getFubar1Value()
        return f1.getValue();
    }Then if you test these:
    public class TestFubars
      public static void main(String[] args)
        Fubar1 f1 = new Fubar1();
        f1.setValue(35);
        Fubar2Bad f2Bad = new Fubar2Bad();
        Fubar2Good f2Good = new Fubar2Good(f1); // here we pass a reference to the main's Fubar1 object into the Fubar2Good object.
        System.out.println("Bad: " + f2Bad.getFubar1Value());
        System.out.println("Good: " + f2Good.getFubar1Value());
    }

  • Calling repaint method from another class

    My question in a very simple form :
    how do I call repaint mathod from another class.
    e.g: Let's say class "A.java" is a JFrame .
    Class "B.java" is a JPanel which is added to the JFrame above.
    Class "C.java" is a JDialog containing some JButtons.
    How do I call the repaint method from the class "C.java".
    Thank you in advance!!

    My question in a very simple form :
    how do I call repaint mathod from another class.
    e.g: Let's say class "A.java" is a JFrame .
    Class "B.java" is a JPanel which is added to the JFrame above.
    Class "C.java" is a JDialog containing some JButtons.
    How do I call the repaint method from the class "C.java".
    Thank you in advance!!

  • I upgraded Windows 7 to Windows 8 with iTunes installed. Now my iPhone 4S is no longer recognized in iTunes. Connecting with USB sends me directly to the MS app that downloads pictures from the iPhone. Suggest this is a question of missing Apple driver.

    I upgraded Windows 7 to Windows 8 with iTunes installed. Now my iPhone 4S is no longer recognized in iTunes. Connecting the iPhone with USB sends me directly to the MS app that downloads pictures from the iPhone. Suggest this is a question of missing Apple driver for Windows 8, iTunes and iPhone. MS does not care! This seems to be a general problem with Windows 8 that a number of drivers that used to work with Windows 7 now do not work, ie. iPhone to iTunes, HTC to HTCSync, Samsung to Kies etc. I need this connection to work in order to syncronize with Outlook and my iTunes library.

    diesel vdub wrote:
    Maybe it would have been a better idea to confirm that iTunes is supported in Windows 8 before buying a computer with that Operating System.
    There will be a new version of iTunes released this month... no one forced you to upgrade prior to a supported version of iTunes being released.
    Like the fact that you just called most of us stupid there

  • WebDynpro Method from a Class Interface?

    Is possible to call a webdynpro method from a class interface that is register in the WDDOINIT of the same WEBDYNPRO component?
    I register my custom webdynpro screen into FPM_OIF_COMPONENT, now when I execute a FPM action my WebDynpro receives the action but ofcourse WDDOINIT doesn't get triggered again. I need to call my webdynpro code in the class interface so I can update my custom screen.
    SAP does that in their standard screen, Can I do that?
    Jason PV

    As Matt pointed out, your questions indicate that you should start from the basics, then as your knowledge enlarges, go and familarize with more advanced concepts of ABAP Objects. Once you feel a bit comfortable with that, go for BADIs and read a bit about that too.
    In my opinion the best start is to read some book, which covers most of ABAP OO concepts. Personally I would recommend [ABAP Objects: ABAP Programming in SAP NetWeaver|http://www.sap-press.com/product.cfm?account=&product=H1934] as I like this author and had his previous book. This would give you strong foundations of what is going on here. Eventually you will often want to refresh some concepts so you have everything you need in one spot (book).
    Of course if want to save some money, simply look for articles/blogs/wikis in SDN or search in Google. There are plenty of these.
    For start I suggest these series of videoblogs [Basic ABAP OO eLearnings|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414800)ID1160600550DB10016261778120999663End?blog=/pub/wlg/15408]
    This will give you rough idea how the OO design should be done.
    Regards
    Marcin

  • How do you call a method from  another class without extending as a parent?

    How do you call a method from another class without extending it as a parent? Is this possible?

    Why don't you just create an instance of the class?
    Car c = new Car();
    c.drive("fast");The drive method is in the car class, but as long as the method is public, you can use it anywhere.
    Is that what you were asking or am I totally misunderstanding your question?
    Jen

Maybe you are looking for

  • Can't figure out what is the code

    Hi I got following macro that will help me to run certain transaction. I just can't figure out where comments ends and where code starts so I was unable to run it for like 3 hours now. In other words I am trying to use Excel Macro that will get to ac

  • Seagate Hard Drives not detected by the Windows 7 installer

    I've spent hours on this trying every conceivable reason, so I apologize in advance for the length on this post. I connected a Seagate 320GB 7200.10 hard drive to a P35 chipset system and attempted to install Windows 7 RTM onto it. The installer got

  • View Footage from FCP to Sony HDR-HC7 Camera

    Hi all, I have final cut pro and a Sony HDR-HC7 camera with a SAMSUNG external monitor. I'm trying to view edited video from FCP to my camera then through HDMI to my SAMSUNG external monitor. I can't get this to work. This works fine through my DVDPR

  • Oracle VM Manager fails without backup data

    Dear All, My Oracle VM Manager fails and lost all data but my Oracle VM Servers and Storage are still running fine, if I install a new Oracle VM Manager and I register my VM Servers again, is it possible the same old Oracle VM Manager? Please help to

  • Ive forgotten my passcode for my iphone 4!! can anyone help pls

    ive forgotten my passcode for my iphone 4!! can anyone help pls