Implementing interface problems

I developed an interface and when I try to implement it and compile I get the following compile time error:
File C:\projects\dynamicload\crio.java does not contain crio as expected. Please adjust the class path so that the file does not appear in the unnamed package.
C:\projects\dynamicload\test.java(3) : Interface crio of test not found
process.java is the implementing class. crio.java is the interface.

Without looking at the actual code it sounds like the access modifier may have been incorrect. If one was not specified then the default was "package friendly." The implementing class must have been in the same package. If one had no package listed and the other did then the packages were different and one could not access the other with the default access modifier.
send code for more clarification

Similar Messages

  • Implements Interface Problem

    I am new to Java, hence I would like to know the reason behind the error produced by the codes given below:
    --- Scenario 1 ---
    public class MTServer{
    //Main Method
    // Creates a socket, accepts the socket.
    ServProtocol sp = new ServProtocol(client);
    sp.start(); // <-- No Problem
    public class ServProtocol extends Thread{
    @Overrides
    public void run(){}
    --- Scenario 2 ---
    public class MTServer{
    //Main Method
    // Creates a socket, accepts the socket.
    ServProtocol sp = new ServProtocol(client);
    sp.start(); //<-- Error Given - Method is undefined for start().
    public class ServProtocol implements Runnable{
    @Overrides
    public void run(){}
    The difference in the 2 scenarios were, one extends Thread, while the other implements Runnable.
    However, I do not understand the error behind it.
    Does the error persist because .start() is inherited from Parent Class when extends thread. However when implements Runnable, it does not provide function on this method?
    I would like to know how can I re-write the code so that I can retain the flexibility of Interface by implementing Runnable, as well as not having the error shown in Scenario 2.

    Don't post roughly what your code looks like because as here you introduce errors.
    Assuming your new class implements Runnable then it doesn't have a start method. You should instead pass it to a thread and start that. i.e.
    MyThingImplementingRunnable thing = new MyThingImplementingRunnable();
    new Thread(thing).start();

  • Interfacing problem

    Dear All gurus/experts,
    I need help from you to solve an interface problem. The problem is how to create interface where I want to implement HR application (java) and SAP B1. I am really confusing to the stepwise I must do in creating interface.Do I must define fields/columns, forms, document or report in the SAP B1 side first and then compare to the HR application fields/columnc/forms/documents/reports. The difference between them then fixed and created if required. The main purpose is all the HR process will be handled by HR Application and the data will be sent to SAP B1. The data directly posted to G/L  for example payroll, expenses relate to HR and also pension. is it possible for me to create a template and then the template update to SAP B1 using Data transfer workbench (DTW) ? the application can be updated the data file into CSV, txt, etc. If you have any experience about that, pls share to me.  I appreciate your answer so much.
    TIA.
    Rgds,

    Tks for your answer. Actually it is interfacing other product or solutions, for example human resource solutions or from microsoft dynamics manufacturing module. is it possible to do that ? I appreciate your answer. TIA
    Rgds,

  • Interface Problems in Yosemite

    Problem shows up when using software other than the native OS X apps.
    If I attempt to close a window behind the app that has focus by clicking the red x part of the semaphore buttons (top left on every window) it will not work unless I change focus to that app by clicking the bar at the top.
    As an example if I'm using Byword to view a document while composing an email in Airmail once I finished and move on to viewing, say a receipt, in Airmail and want to make a copy of that receipt and place it on the desktop. I'm done with Byword and it is covering the desktop so why not close it and get it out of the way. I move the mouse pointer over the red X part of the semaphore buttons and click, nothing happens. I have to bring Byword into focus by clicking the title bar, then click the red x to finally close the window. If the app below Airmail happened to be Safari the red X works properly.
    On my Mac Mini using Yosemite this works properly for all apps.
    This is only a slight problem but I have been having the odd quirky interface problems for the past while and I'm worried that something has gone south and these may end up adding together to make a very large problem.  Initially I had problems with PopClip which seemed to be screwing around with the interface buttons in Rapidweaver 6. I removed the app to clear that problem using AppDelete.
    While trying to diagnose this problem I have removed all the auto login apps that I can and rebooted several times to no avail.
    Any help would be greatly appreciated!
    EtreCheck version: 2.1.8 (121) log:
    EtreCheck version: 2.1.8 (121)
    Report generated February 5, 2015 at 12:32:53 PM EST
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        iMac (27-inch, Late 2012) (Technical Specifications)
        iMac - model: iMac13,2
        1 3.4 GHz Intel Core i7 CPU: 4-core
        8 GB RAM Upgradeable
            BANK 0/DIMM0
                4 GB DDR3 1600 MHz ok
            BANK 1/DIMM0
                4 GB DDR3 1600 MHz ok
            BANK 0/DIMM1
                Empty 
            BANK 1/DIMM1
                Empty 
        Bluetooth: Good - Handoff/Airdrop2 supported
        Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
        NVIDIA GeForce GTX 680MX - VRAM: 2048 MB
            iMac 2048 x 1152
    System Software: ℹ️
        OS X 10.10.2 (14C109) - Time since boot: 0:0:46
    Disk Information: ℹ️
        APPLE HDD WDC WD10EALX-408EA0 disk1 : (1 TB)
            EFI (disk1s1) <not mounted> : 210 MB
            Recovery HD (disk1s3) <not mounted>  [Recovery]: 650 MB
            Macintosh HD (disk2) / : 1.11 TB (263.43 GB free)
                Core Storage: disk0s2 120.99 GB Online
                Core Storage: disk1s2 999.35 GB Online
        APPLE SSD SM128E disk0 : (121.33 GB)
            EFI (disk0s1) <not mounted> : 210 MB
            Boot OS X (disk0s3) <not mounted> : 134 MB
            Macintosh HD (disk2) / : 1.11 TB (263.43 GB free)
                Core Storage: disk0s2 120.99 GB Online
                Core Storage: disk1s2 999.35 GB Online
    USB Information: ℹ️
        Verbatim Portable USB 3.0 Drive 1 TB
            EFI (disk3s1) <not mounted> : 210 MB
            Verbatim HD (disk3s2) /Volumes/Verbatim HD : 999.86 GB (31.06 GB free)
        Apple Inc. FaceTime HD Camera (Built-in)
        Logitech USB Receiver
        Samsung Electronics Co., Ltd. ML-2160 Series
        Wacom Co.,Ltd. Wacom Wireless Receiver
        Razer Razer 1600dpi Mouse
        Apple Inc. BRCM20702 Hub
            Apple Inc. Bluetooth USB Host Controller
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Kernel Extensions: ℹ️
            /Applications/Transmit.app
        [not loaded]    com.panic.TransmitDisk.transmitdiskfs (4.0.0 - SDK 10.6) [Click for support]
            /Applications/VMware Fusion.app
        [not loaded]    com.vmware.kext.vmci (90.6.3) [Click for support]
        [not loaded]    com.vmware.kext.vmioplug.14.1.3 (14.1.3) [Click for support]
        [not loaded]    com.vmware.kext.vmnet (0231.47.74) [Click for support]
        [not loaded]    com.vmware.kext.vmx86 (0231.47.74) [Click for support]
        [not loaded]    com.vmware.kext.vsockets (90.6.0) [Click for support]
            /Library/Extensions
        [loaded]    at.obdev.nke.LittleSnitch (4234 - SDK 10.8) [Click for support]
        [loaded]    com.avatron.AVExFramebuffer (1.7 - SDK 10.9) [Click for support]
        [loaded]    com.avatron.AVExVideo (1.7 - SDK 10.9) [Click for support]
        [loaded]    com.globaldelight.driver.Boom2Device (1.1 - SDK 10.10) [Click for support]
        [loaded]    com.logitech.manager.kernel.driver (4.10.1 - SDK 10.8) [Click for support]
        [loaded]    com.sophos.kext.sav (9.2.50 - SDK 10.8) [Click for support]
        [loaded]    com.sophos.nke.swi (9.2.50 - SDK 10.8) [Click for support]
        [not loaded]    com.wacom.kext.ftdi (1 - SDK 10.9) [Click for support]
            /System/Library/Extensions
        [loaded]    com.Logitech.Control Center.HID Driver (3.7.0 - SDK 10.6) [Click for support]
        [loaded]    com.Logitech.Unifying.HID Driver (1.3.0 - SDK 10.6) [Click for support]
        [loaded]    com.eltima.SyncMate.kext (0.2.5b15) [Click for support]
        [loaded]    com.globaldelight.driver.BoomDevice (1.1 - SDK 10.1) [Click for support]
        [loaded]    com.splashtop.driver.SRXDisplayCard (1.6 - SDK 10.7) [Click for support]
        [not loaded]    com.splashtop.driver.SRXFrameBufferConnector (1.6 - SDK 10.7) [Click for support]
        [not loaded]    com.wacom.kext.wacomtablet (6.3.10 - SDK 10.9) [Click for support]
            /System/Library/Extensions/Soundflower.kext
        [not loaded]    com.Cycling74.driver.Soundflower (1.6.6 - SDK 10.6) [Click for support]
    Launch Agents: ℹ️
        [running]    at.obdev.LittleSnitchUIAgent.plist [Click for support]
        [not loaded]    com.adobe.AAM.Updater-1.0.plist [Click for support]
        [running]    com.Logitech.Control Center.Daemon.plist [Click for support]
        [running]    com.logitech.manager.daemon.plist [Click for support]
        [loaded]    com.oracle.java.Java-Updater.plist [Click for support]
        [running]    com.realvnc.vncserver.peruser.plist [Click for support]
        [not loaded]    com.realvnc.vncserver.prelogin.plist [Click for support]
        [running]    com.sophos.uiserver.plist [Click for support]
        [running]    com.wacom.wacomtablet.plist [Click for support]
    Launch Daemons: ℹ️
        [running]    at.obdev.littlesnitchd.plist [Click for support]
        [loaded]    com.adobe.fpsaud.plist [Click for support]
        [running]    com.backblaze.bzserv.plist [Click for support]
        [loaded]    com.barebones.authd.plist [Click for support]
        [loaded]    com.oracle.java.Helper-Tool.plist [Click for support]
        [loaded]    com.oracle.java.JavaUpdateHelper.plist [Click for support]
        [running]    com.realvnc.vncserver.plist [Click for support]
        [loaded]    com.rogueamoeba.instanton-agent.plist [Click for support]
        [loaded]    com.sharpcast.xfsmond.plist [Click for support]
        [loaded]    com.sheepsystems.CocoaPrivilegedHelper.plist [Click for support]
        [running]    com.sophos.common.servicemanager.plist [Click for support]
        [loaded]    de.appgineers.Mountain.Helper.plist [Click for support]
    User Launch Agents: ℹ️
        [loaded]    com.adobe.AAM.Updater-1.0.plist [Click for support]
        [running]    com.backblaze.bzbmenu.plist [Click for support]
        [running]    com.ecamm.printopia.plist [Click for support]
        [loaded]    com.google.keystone.agent.plist [Click for support]
        [loaded]    com.pia.pia_manager.plist [Click for support]
        [loaded]    com.sheepsystems.BookMacster.3EAE0703-42...plist [Click for support]
        [loaded]    com.sheepsystems.BookMacster.3EAE0703-42...plist [Click for support]
        [loaded]    com.valvesoftware.steamclean.plist [Click for support]
        [failed]    ws.agile.1PasswordAgent.plist [Click for support] [Click for details]
    User Login Items: ℹ️
        WD Quick View    Application  (/Library/Application Support/WDSmartware/WDQuickView.app)
    Internet Plug-ins: ℹ️
        FlashPlayer-10.6: Version: 16.0.0.305 - SDK 10.6 [Click for support]
        QuickTime Plugin: Version: 7.7.3
        Flash Player: Version: 16.0.0.305 - SDK 10.6 [Click for support]
        WacomNetscape: Version: 2.1.0-1 - SDK 10.8 [Click for support]
        Default Browser: Version: 600 - SDK 10.10
        GarminGpsControl: Version: 4.0.2.6 Beta - SDK 10.6 [Click for support]
        WacomTabletPlugin: Version: WacomTabletPlugin 2.1.0.6 - SDK 10.9 [Click for support]
        JavaAppletPlugin: Version: Java 8 Update 31 Check version
    User internet Plug-ins: ℹ️
        Picasa: Version: 1.0 - SDK 10.6 [Click for support]
    Safari Extensions: ℹ️
        1Password
        Clip to DEVONthink
        Choosy
        Ember
        Save to Pocket
        Stache
    3rd Party Preference Panes: ℹ️
        AirServer Preferences  [Click for support]
        Backblaze Backup  [Click for support]
        Choosy  [Click for support]
        Flash Player  [Click for support]
        FUSE for OS X (OSXFUSE)  [Click for support]
        Hazel  [Click for support]
        Java  [Click for support]
        Logitech Control Center  [Click for support]
        Logi Preference Manager  [Click for support]
        Printopia  [Click for support]
        WacomTablet  [Click for support]
        WDQuickView  [Click for support]
        Web Sharing  [Click for support]
    Time Machine: ℹ️
        Skip System Files: NO
        Auto backup: YES
        Volumes being backed up:
            Macintosh HD: Disk size: 1.11 TB Disk used: 848.39 GB
        Destinations:
            Verbatim HD [Local]
            Total size: 999.86 GB
            Total number of backups: 101
            Oldest backup: 2013-11-22 16:26:50 +0000
            Last backup: 2015-02-05 15:55:38 +0000
            Size of backup disk: Too small
                Backup size 999.86 GB < (Disk used 848.39 GB X 3)
    Top Processes by CPU: ℹ️
            12%    mds
             2%    WindowServer
             0%    loginwindow
             0%    fontd
             0%    mds_stores
    Top Processes by Memory: ℹ️
        292 MB    mds_stores
        172 MB    SophosScanD
        172 MB    InterCheck
        155 MB    SophosAntiVirus
        120 MB    Finder
    Virtual Memory Information: ℹ️
        3.32 GB    Free RAM
        2.72 GB    Active RAM
        1.40 GB    Inactive RAM
        1.15 GB    Wired RAM
        1.56 GB    Page-ins
        0 B    Page-outs
    Diagnostics Information: ℹ️
        Feb 5, 2015, 12:30:03 PM    Self test - passed
        Feb 4, 2015, 10:59:58 PM    /Library/Logs/DiagnosticReports/RapidWeaver 6_2015-02-04-225958_[redacted].cpu_resource.diag [Click for details]
        Feb 3, 2015, 03:07:17 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/WebKitPluginHost_2015-02-03-15 0717_[redacted].crash
        Feb 3, 2015, 03:02:23 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/WebKitPluginHost_2015-02-03-15 0223_[redacted].crash
        Jan 15, 2015, 08:04:41 PM    /Library/Logs/DiagnosticReports/Kernel_2015-01-15-200441_[redacted].panic [Click for details]

    Try un-installing Sophos.
    Sophos Un-install

  • Public class implements interface

    I am taking my first crack at interfaces: I have superclass A which is a parent of class B, which implements interface C. I need to use class B to make 3 variable instances within class A. I think I will use interface C to make calculations based on the 3 variables. Where do you recommend that I declare and set values for the 3 variables if I need to output the values at the top, in superclass A?
    I'm just a little unclear on pulling these objcts together... thanks in advance.

    I am taking my first crack at interfaces: I have
    superclass A which is a parent of class B, which
    implements interface C. I need to use class B to make
    3 variable instances within class A. I think I will
    use interface C to make calculations based on the 3
    variables. Where do you recommend that I declare and
    set values for the 3 variables if I need to output the
    values at the top, in superclass A?
    I'm just a little unclear on pulling these objcts
    together... thanks in advance. If your variables are going to be used by your superclass A then they had better be declared there. You can work with them whereever you want.
    I'm not sure what you are saying about "...use interface C to make calculations based on the 3 variables." You can't do calculations inside an interface. Furthermore, if B extends A and implements C then A and C are going to be completely separate entities. Any reference to C, even if it is actually an object of type B, will not be able to use anything in A--unless you cast it to B, in which case there is no use in making an interface at all.
    I probably just confused you, but oh well...
    Jeff

  • Interface Problems: DBA = Data Pump = Export Jobs (Job Name)

    Hello Folks,
    I need your help in troubleshooting an SQL Developer interface problem.
    DBA => Data Pump => Export Jobs (Job Name) => Data Pump Export => Job Scheduler (Step):
    -a- Job Name and Job Description fields are not visible. Well the fields are there but each of them just 1/2 character wide. I can't see/enter anything in the fields.
    Import Wizard:
    -b- Job Name field under the first "Type" wizard's step looks exactly the same as in Export case.
    -c- Can't see any row under "Chose Input Files" section (I see just ~1 mm of the first row and everything else is hidden).
    My env:
    -- Version 3.2.20.09, Build MAIN-09.87
    -- Windows 7 (64 bit)
    It could be related to the fact that I did change fonts in the Preferences. As I don't know what is the default font I can't change it back to the default and test (let me know what is the default and I will test it).
    PS
    -- Have tried to disable all extensions but DBA Navigator (11.2.0.09.87). It didn't help
    -- There are no any messages in the console if I run SQL Dev under cmd "sqldeveloper\bin\sqldeveloper.exe
    Any help is appreciated,
    Yury

    Hi Yury,
    a-I see those 1/2 character size text boxes (in my case on frequency) when the pop up dialog is too small - do they go away when you make it bigger?
    b- On IMPORT the name it starts with IMPORT - if it is the half character issue have you tried making the dialog bigger?
    c-I think it is size again but my dialog at minimum size is already big enough.
    Have you tried a smaller font - or making the dialogs bigger (resizing from the corners).
    I have a 3.2.1 version where I have not changed the fonts from Tools->Preferences->CodeEditor->Fonts appears to be:
    Font Name: DialogInput
    Font size: 12
    Turloch
    -SQLDeveloper Team

  • Implementing interface views

    I have to add a main view to the portfolio items and integrate  the view WI_DMS of the web dynpro component DMS_DPR to the same. When I try to do it, it says  'WI_DMS does not implement a valid interface". Is there any way to implement the valid interface dynamically? PLease help.

    >i have been using ( implementing ) interfaces in the components, for example i used iwd_value_help. however i still have no clarity how WD framework is able to communicate with the component implementing interface iwd_value_help.
    Web Dynpro can create a component usage based upon the interface type alone.  This is very similar to normal ABAP OO when you create/get an instance of a class but only know the interface.  Basically this is polymorphism at the component level.
    >the basic question here is, what is wd framework, is it class implementing interfaces generated when we create views and other stuff. and this class( WD fw ) is going to call these implemented methods of the interface??
    Simple answer: yes, exactly as you describe.  Everything relates back to generated and local classes.  The framework can interact with them becuase all the generated classes implement SAP provide framework interfaces.

  • Any ideas about interface problems on 2014.1.1?

    On a fresh install of 2014.1.1 on a new macbook pro I am having interface problems. The Edge program locks up after a few minutes or the cursor won't show what's being selected, items disappear, sometimes get the "Save your work, error occurred" message and other odd interface behavior. Are there any known issues or likely culprits that might cause this sort of thing?

    Thanks for jumping in. Yes, I've restored prefs and even uninstalled all (including prefs) and reinstalled. If it helps at all, I run several cloud apps (googledrive, dropbox, icloud, box, transporter, etc.). Other installed items include a Wacom tablet driver, latest Java, Flash player, Logitech mouse driver. Other than those the mac is brand new with no unusual system mods yet.
    Appreciate any ideas.

  • Perspective for Java technologies : implementing interface on late.

    In Java, to implements the adapter pattern's; we have to create a new class that have a link with the adaptee class and implements the adapter interface.
    class MyAdapter implements IAdapter
          public MyAdapter( Adaptee a );
    }or, if we need protected methods :
    class MyAdapter extends implements IAdapter
         public MyAdapter( Adaptee a );
    }then, to call the method void foo( IAdapter i ); ;
    we have to do xxx.foo( new MyAdapter( adaptee ) );it could be simpler if java allowed to implement interfaces after defining the java class.
    public class Adaptee
    }and then, in another file, something like,
    implementation of  IAdapter for class Adaptee
    }would be equivalent to
    public class Adaptee implements IAdapter
    }The advantage of the first method is that you can adapt very easy external classes from external jar file.
    thank's for coments.

    An interface is a contract which tells the compiler
    that a class that implements it implements a set of
    method signature which perform certain actions.That's right, but my idea is not to change the interface, but to change the external class, making it implements the existing interface.
    If you overlay an interface on someone else's class,
    the signature match (if there is one) could happen by
    coincidence. There's no guarantee that a method with
    a signature that matches one in your interface
    actually has the same function.I didn't say that an external class should be viewed as an interface without a specific implementation of this interface for the external class. But, instead of making a new class extending the first and implementing the interface, just define a specific implementation of the interface for this class, as if it was make at class declaration.

  • Implementation interface

    Hi guys. I have a test on array and inheritance and polymorphism. I didn't quite understand what is the benefit of implementing interfaces.
    Something like this:
    public class static Child extends Parent implement A,B,C
    Where A,B,C are interfaces.
    I need to get this straigth before the final test tomorrow. Thanks a lot.

    By implementing an interface, a class declares what it does. This means that the compiler and other classes can determine whether that class is suitable for some operations.
    So given your example Child which implements interfaces A, B, and C, there could be another class with method:
    public boolean doSomething(A aclass) {
    }This method can be given an instance of your "Child" class, or a different class which also implements the A interface.
    Interfaces say what a class does, as opposed to how it does it.

  • No implementation interfaces created using jaxb 2.0 ?

    Hi,
    I've downloaded the jaxb 2.0 RI and am trying to follow the short tutorial at http://java.sun.com/developer/technicalArticles/WebServices/jaxb/index.html.
    On trying to bind the schema via xsj,sh, which also is meant to generate the implementation interfaces (in an impl directory), I see these aren't created - the other classes are generated OK. Where or how should they be created ?
    thanks

    I am on the same boat. Have you found the answer to this?
    Thanks,
    Juan

  • Extend abstract class & implement interface, different return type methods

    abstract class X
    public abstract String method();
    interface Y
    public void method();
    class Z extends X implements Y
      // Compiler error, If I don't implement both methods
      // If I implement only one method, compiler error is thrown for not
      // implementing another method
      // If I implement both the methods,duplicate method error is thrown by 
      //compiler
    The same problem can occur if both methods throw different checked exceptions,or if access modifiers are different..etc
    I'm preparing for SCJP, So just had this weired thought. Please let me know
    if there is a way to solve this.

    Nothing you can do about it except for changing the design.
    Kaj

  • Regex and implementing FilenameFilter problem

    Hello,
    So what I'm trying to do is to create a program that takes a certain set of files, pulls the first line of each file and uses it to name the file. Right now, I'm at the point of getting a listing of files based on a patterns. So when I run the program on the command line (of a windows machine), it spit out the files that I'm looking for. Something like:
    java FileRenamer *.txt
    Above should produce a listing of only files that have .txt on them (I want to have the capability to choose *.txt or whatever other combination of pattern match).
    To do the above, I want to use a FileNameFilter interface to figure out what files match. The problem that I'm running into is that when I run a unit test against the getFilesListBasedOnPattern method, I get:
    java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
    *.txt
    The problem is that the *.txt has a regex character (the *) and I'm not sure how make it behave like the wildcard in the dos command line where *.txt means everything that has .txt at the end.
    The code listing is below. Does anyone have any suggestions on how to best approach this?
    mapsmaps
    =======> Code below <=======
    // unit test snippet that causes blow out:
    FileRenamer fr = new FileRenamer();
    String [] strArrFilesBasePattern = fr.getFilesListBasedOnPattern(dirTestFiles,"*.txt");
    ====
    //main program
    package com.foo.filerenamer;
    import java.io.File;
    import java.io.FilenameFilter;
    import java.util.Vector;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    * TODO Use regexp to filter out input to *.txt type of thing or nothing else
    public class FileRenamer
        // Vallid file patterns are *.*, ?
        public static final String strVALIDINPUTCHARS = "[_.a-zA-Z0-9\\s\\*\\?-]+";
        private static Pattern regexPattern = Pattern.compile(strVALIDINPUTCHARS);
        private static Matcher regexMatcher;
         * @param args
         * @throws InterruptedException
        public static void main(String[] args) throws InterruptedException
            int intMillis = 0;
            if (args.length > 0)
                try
                    intMillis = Integer.parseInt(args[0]);
                    System.out.println("Sleep set to " + intMillis + " seconds");
                catch (NumberFormatException e)
                    intMillis = 5000;
                    System.out.println("Sleep set to default of " + intMillis + " since first parameter was non-int");
                for (int i=0;i<args.length;i++)
                    System.out.println("hello there - args["+i+"] = "+ args);
    Thread.sleep(intMillis);
    // TODO Auto-generated method stub
    public boolean checkArgs(String [] p_strAr)
    boolean bRet = false;
    if (p_strAr.length != 1)
    return false;
    else
    regexMatcher = regexPattern.matcher(p_strAr[0]);
    bRet = regexMatcher.matches();
    return bRet;
    public String[] getFilesListBasedOnPattern(File p_dirFilesLoc, String p_strValidPattern)
    String[] strArrFilteredFileNames = p_dirFilesLoc.list(new RegExpFileFilter(p_strValidPattern));
    return strArrFilteredFileNames;
    class RegExpFileFilter implements FilenameFilter
    private String m_strPattern = null;
    private Pattern m_regexPattern;
    public RegExpFileFilter(String p_strPattern)
    m_strPattern = p_strPattern;
    m_regexPattern = Pattern.compile(m_strPattern);
    public boolean accept(File m_directory, String m_filename)
    if (m_regexPattern.matcher(m_filename).matches())
    return true;
    return false;

    I am doing something similar but have a problem with Java automatically converting wildcards in path-arguments to the first match (!).
    It seems the JVM is applying some intelligence here and checks if a path is passed to main() and if so, it automatically resolves wildcards (also quotes are escaped/resolved), which is pretty annoying and not what I want, since I do never see the original parameters this way:(
    Is there a way to get the original parameters without the JVM intervening / "helping"?
    Any help would be appreciated, as I want my utility to act just like any other shell-program...

  • Design Question - Class Must Implement Interface

    I'm not sure how to describe this in summary, really. I'd say that I sort of want multiple inheritance, but I don't want to be shot. :-P So let me describe the situation:
    I have an interface, DataEditingComponent<T>. The idea is that anything implementing the interface is capable of allowing the user to edit an object of type T. For example, a DataEditingComponent<Integer> would allow the user to input an integer. A DataEditingComponent<Map<SomeObj,Integer>> might represent an object capable of editing a table describing the number of instances of SomeObj. You get the idea. DataEditingComponent<T> describes three methods: getEditingData():T, setEditingData(T):void, and getDefaultEditingData():T. I'm assuming you can guess what those do.
    Well, the practical application of this interface is in the use of a Swing application. It provides a very clean and standardized way of adjusting the contents of components which edit data. Obviously, a JTextField would work about as well as a DataEditingComponent<String>, but for more complicated components (DataEditingComponent<GameWorldMap>, for instance), the standardized interface is very helpful.
    Since in practice everything that ever implements DataEditingComponent<T> extends JComponent, it would be nice to declare this as a requirement somehow. However, given that JComponent is extended into a number of various subclasses, I can't just go making DataEditingComponent<T> an abstract subclass.
    So far, the only conclusion I've reached is that I can take each and every JComponent subclass and extend it into an abstract subclass which implements DataEditingComponent<T>... but that's very ugly and quickly leads to other problems. And presently, I'm left casting things from one to the other, with which I am also not happy.
    So... any way out of this? Have I done something wrong design-wise? Or am I just stuck in a language limitation?
    Thanks for reading!

    I'm not sure how to describe this in summary, really.
    I'd say that I sort of want multiple inheritance,
    but I don't want to be shot. :-P So let me
    describe the situation:
    I have an interface, DataEditingComponent<T>. The
    idea is that anything implementing the interface is
    capable of allowing the user to edit an object of
    type T. For example, a DataEditingComponent<Integer>
    would allow the user to input an integer. A
    DataEditingComponent<Map<SomeObj,Integer>> might
    represent an object capable of editing a table
    describing the number of instances of SomeObj. You
    get the idea. DataEditingComponent<T> describes
    three methods: getEditingData():T,
    setEditingData(T):void, and
    getDefaultEditingData():T. I'm assuming you can
    guess what those do.
    Well, the practical application of this interface is
    in the use of a Swing application. It provides a
    very clean and standardized way of adjusting the
    contents of components which edit data. Obviously, a
    JTextField would work about as well as a
    DataEditingComponent<String>, but for more
    complicated components
    (DataEditingComponent<GameWorldMap>, for instance),
    the standardized interface is very helpful.
    Since in practice everything that ever implements
    DataEditingComponent<T> extends JComponent, it would
    be nice to declare this as a requirement somehow.
    However, given that JComponent is extended into a
    number of various subclasses, I can't just go making
    DataEditingComponent<T> an abstract subclass.
    So far, the only conclusion I've reached is that I
    can take each and every JComponent subclass and
    extend it into an abstract subclass which implements
    DataEditingComponent<T>... but that's very ugly and
    quickly leads to other problems. And presently, I'm
    left casting things from one to the other, with which
    I am also not happy.
    So... any way out of this? Have I done something
    wrong design-wise? Or am I just stuck in a language
    limitation?Hmm. The component is part of the view. The data is part of the model. Putting them together seems to go against the whole Model-View-Controller concept. You may want to have a look at how Swing separates the editing from the rendering from the model for complicated widgets such as JTable. The editors hava methods such as getEditorComponent() which returns the Component used to edit the data. Everywhere you are currently adding DataEditingComponent instances to your GUI, you can instead call a getDataEditingComponent() method, which can require that the returned object is a JComponent.

  • Interface problem

    Hi All
    I m implementing Idoc to Xml while tesing Message Mapping n Interface Mapping there r no errors but while testing the configuration scenario there is error in Interface Determination but they r not displaying the Log.
    While mess moni Message Interface r nt reflecting over there.ie.corresponding to Business Service there r no interface reflecting over there.
    plz try to resolve this problem.
    Thanks

    Hi,
    You can run Idoc scenarios with Business Systems as well as Business Services.
    Following blog could be helpful for resolving ALE Logical System Name related errors, if you are getting those.
    /people/michal.krawczyk2/blog/2005/03/29/xi-error--unable-to-convert-the-sender-service-to-an-ale-logical-system
    Elaborate the error message that you are receiving. It would help receive precise responses.
    Bhavish

Maybe you are looking for

  • Beginner ATV questions....

    Apologies if this has been done before, I can't find it if it has. I am currently using an S-video cable to watch video etc on my TV.  Works, but includes cables and bringing  my elderly non-intel powerbook out of it's cosy retirement. I believe ATV

  • Ideal hardware setup for Aperture

    Is there an ideal hardware setup for working with 18megapixel raw files in aperture? Of the three...graphics card, cpu and ram...which are the most important to processing the raw image. I am running 10.6.3 on a macbookpro 2.2GHz core 2 duo, 4G ram a

  • Error in main Work flow

    Hi Team, After making the changes for copied workflow from the old WF iam struck up with one error saying 'container element WFTASKID' is not used.I could not find any element named WFTASKID in main and sub WFlows The sub WF is activated and problem

  • Photoshop Problem ( After Update )

    Hi Guys  i Got  A Error when i updated photoshop cc to 14.1.2 i got this error : http://www.gulfup.com/?VmYI9C So i Unistall Photoshop then i ((( DOWNLOAD IT AGAIN   ))) then i got the update message and i scary to do the update and get this error ag

  • CS2 et mise à niveau de InDesign CS5.5

    Bonjour à tous, Je possède la suite CS2 standard. Désirant la version 5.5 de InDesign, j'ai acheté sur le site la mise a niveau de Indesign CS2 vers InDesign CS5.5. Mon problème, lorsque je rentre ma clé CS2, il me dit ceci : "Le numéro de série que