Packaging and Different Directories

Hi there,
I am trying to build an application that will store plugins in a separate directory to the main program. For example, if the main program is at c:/myapp then the plugins are at c:/myapp/plugins . The plugins are also java files.
I want to be able to access these plugins to use them in my program - is there any way this can be done WITHOUT modifying the classpath?
This is on a similar note, but I have tried to package the plugins up into a plugins package and then access it, however I get issues trying to talk between files in the same package (example, 2 plugins talking to each other). How can I get package files to talk to each other when they both co-exist in the exact same package. Shouldn't this already be acceptable communication if I have .; in my classpath?
Thank you for your efforts, I know I keep bringing up the hard questions :)
WATTO

OK, here comes the questions... :)
I have successfully been able to load class files from a different directory using the URLClassLoader, however when it loads it complains that it can't access a variable in the superclass. The Superclass is another class that I have made, which is located in the main program directory, but it is not in the same directory as the plugin. So, this tells me that it has loaded the plugin class using a separate classpath to that used by the program, otherwise it would have been easily able to find the superclass.
So, I have tried copying/moving the superclass into the same directory as the plugin, but still it says that it is unable to access the superclass.
The way I have been working this so far is that I compile the plugin in the main program directory, so that the superclass and other relationships are preserver, and then move the plugin class file into the plugins directory.
Can anyone offer any suggestions as to why this would not be working. Does anyone know how the URLClassLoader uses the classpath of the program? Basically, why is it not finding my superclass even if the superclass is in the same directory as the class I am loading, and how can I solve the problem?
Just to clarify, it IS finding the plugin, so I'm not getting those ClassNotFound exceptions.
Thanks for any help you can provide.
WATTO

Similar Messages

  • Com.sun.image.codec.jpeg package and different platforms?

    I heard that this package is SunOS specific. Is that true? What platforms does it support for real?
    I have been trying to find more info than just the API documentation and haven't succeeded so far. Anybody know where I can retrieve more info on that package?

    Java is platform independent right? .. bundle the packages you use (that's not in the JDK) and it will work on *nix as well.
    You can usa tool like JDeploy (use google) to find out class dependencies etc. when you bundle your JAR (although this won't work if you use class.forName() etc.);
    - bjorn

  • How to use two different packages which in  different directories?

    In my progrom, I'm using two differnet packages that in two different directories, but if I use classpath , the program can only be in one environment, so what can I do?

    or you set your classpath to the first common dir they have, and specify the packages from that dir on...
    or you just simply copy (you don't have to move it) the one package together with the other package...
    by the way you can add multiple paths to your classpath...
    between the paths you specify a ";"
    if i'm not mistaken...
    SeJo

  • Reading files from different directories and exceuting them

    D:\>cd PROC_PKG_FUNC
    mkdir FUNCTIONS
    mkdir PACKAGES
    mkdir PACKAGES_BODY
    mkdir PROCEDURES
    mkdir TYPES
    mkdir TYPES_BODY
    SQL> create directory FUNCTIONS as 'D:\PROC_PKG_FUNC\FUNCTIONS';
    Directory created.
    SQL> create directory PACKAGES as 'D:\PROC_PKG_FUNC\PACKAGES';
    Directory created.
    SQL> create directory PROCEDURES as 'D:\PROC_PKG_FUNC\PROCEDURES';
    Directory created.
    SQL> create directory PACKAGES_BODY as 'D:\PROC_PKG_FUNC\PACKAGES_BODY';
    Directory created.
    SQL> create directory TYPES as 'D:\PROC_PKG_FUNC\TYPES';
    Directory created.
    SQL> create directory TYPES_BODY as 'D:\PROC_PKG_FUNC\TYPES_BODY';
    Directory created.
    suppose,
    there is a D:\PROC_PKG_FUNC directory in my local machine where the database server exists.
    And in that directory there are different directories like FUNCTIONS,PACKAGES,PACKAGES_BODY,PROCEDURES,TYPES,TYPES_BODY, now I've created all the remote schemas obejcts in these folders using utl_file, with the help of the following package
    SQL> CREATE OR REPLACE PROCEDURE Get_Db_Ddl_Scripts AS
    2 v_file Utl_File.FILE_TYPE;
    3 v_file_dir VARCHAR2(50);
    4 i_first_line NUMBER := 1;
    5 BEGIN
    6
    7 v_file_dir := 'PROC_PKG_FUNC';
    8
    9 FOR REC_OBJ IN
    10 (SELECT DISTINCT NAME,TYPE,DECODE(TYPE,'FUNCTION','FUNCTIONS','PACKAGE','PA
    CKAGES','PACKAGE BODY','PACKAGES_BODY','PROCEDURE','PROCEDURES','TYPE','TYPES','
    TYPE BODY','TYPES_BODY') v_file_dir
    11 FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE OWNER='FRISKDEVI41B'
    12 AND TYPE IN ('FUNCTION, PROCEDURE','PACKAGE','PACKAGE BODY','TYPE'))
    13 LOOP
    14 v_file := Utl_File.FOPEN(location => REC_OBJ.v_file_dir,
    15 filename => REC_OBJ.NAME || '.sql',
    16 open_mode => 'w',
    17 max_linesize => 32767);
    18 i_first_line := 1;
    19 FOR REC IN (SELECT TEXT FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE NAME = REC_
    OBJ.NAME AND TYPE=REC_OBJ.TYPE AND OWNER='FRISKDEVI41B' ORDER BY LINE)
    20 LOOP
    21 IF i_first_line = 1 THEN
    22 Utl_File.PUT_LINE(v_file,'CREATE OR REPLACE ' || REPLACE(REC.TEXT,CHR(10),N
    ULL));
    23 ELSE Utl_File.PUT_LINE(v_file, REPLACE(REC.TEXT,CHR(10),NULL));
    24 END IF;
    25 i_first_line := i_first_line + 1;
    26 END LOOP;
    27 Utl_File.FCLOSE(v_file);
    28
    29 END LOOP;
    30
    31 END;
    32 /
    Procedure created.
    SQL>exec Get_Db_Ddl_Scripts ;
    PL/SQL procedure successfully completed.
    Thus the files are created in the location.
    now what i want to do is i want to read each file and run in my current schema to create these objects in my local scehma ,is that possible? Help required._

    ORCHYP wrote:
    once these files are written in respective folders, you can open them with utl_file('read') in current schema and very well you can execute them.
    Try it onceTry it as many times as you like, you won't execute the files with utl_file, that's for sure. ?:|
    Using something like DBMS_SCHEDULER you could issue a one off job for each script, as that package can call o/s commands.
    However, what's the point?
    You may as well, in the code above, just build up your DDL commands or whatever inside your code and, rather than write them out to scripts, use the EXECUTE IMMEDIATE command to execute the DDL against the database.
    Of course may not be the best thing to be doing, but we have very little information about what it is that is trying to be achieved, and no reason given why all the functions, packages etc. aren't just put together in a single script that is executed from the command line in the first place. Why try and write PL/SQL to do it?

  • Find and delete files with common name in different directories

    I have hundreds of invisible files in many different directories on my 10.4.11 server with .fstemp at the beginning of their name.
    They are taking up space and I would like to delete them.
    I can find them using
    find . -type f -name .fstemp
    But I can't work out how to use the rm command with a wildcard to delete them - I don't want to have to visit many different directories and run rm.
    Do I need to pipe the results from the find to rm ?
    For extra credit (you can probably tell I am out of my comfort zone here)... the files are all locked. I believe they will need to have
    chflags nouchg /Directory/filename
    applied to unlock them before they can be deleted. Can the terminal pipe find|chflgs|delete?
    Thanks,
    b.

    Well, if they weren't locked you could just 'delete' them in the find command. Otherwise …
    Open the Terminal (from /Applications/Utilities) and copy and paste the following into the Terminal window, one line at a time, with a return after each line:
    sudo -s
    find / -type f -name ".fstemp*" -exec echo 'chflags nouchg "{}" && rm -f "{}"' ; | sh
    I have tested this, but obviously with some substitutions. You only need the double quotes around the curly brackets, "{}", if your filenames contain a space.
    To be on the safe side, you should check this out without the final "| sh". Then you will see the commands that would be executed with the full version.
    Finally type exit to get out of the root shell.

  • How to manage seasrch directorie​s for different TestStand projects and different users?

    I am working with several others and we share some number of directories and at the same time own different directories for each projects. Problem rises when there are duplicated VI names are created by two users working on two different projects. Search path has to be manually changed to avoid loading a wrong VI. Sometimes user forgets to change and load a duplicated VI name. Is there a better way to manage th search paths?

    LegalEngineer -
    Matt's comments above regarding the SearchDirectories object only apply to TestStand 3.0.
    Under TestStand 2.0.1, you have to manage the settings in the config file Testexec.ini. You can also have read access to the search directories by accessing the .Data.SearchDirectories array property that is returned from Engine.ConfigFile().
    Scott Richardson (NI)
    Scott Richardson
    National Instruments
    Attachments:
    temp.jpg ‏15 KB

  • Split subscribtion package and allocate to differe...

    Hi everyone,
    I'm considering buying subscription packages for members of my team. Would it be possible with skype manager to split the number of minutes and allocate them to several skype accounts?
    E.g. I buy a 120 minutes package for outgoing calls to Tanzania. Would it be possible for me to split the package and to allocate 60 minutes to 2 different skype accounts? Or, must I buy a 60 minutes package for each of them?
    Thanks a lot,
    Louis

    As you found out...  you can not have multiple build functions.   I always though multiple build functions == multiple PKGBUILDs. 
    Can you build both server and client at once?

  • Pkgman - a bash script for local package and PKGBUILD management

    hi all,
    here is a script which manages a local repository and lets you edit
    PKGBUILDs and other related files, automatically generates checksums,
    build packages, add them to your local repo and so on.
    it also has AUR support for submitting tarballs, leaving comments, etc.
    get it from here:
    http://sourceforge.net/projects/pkgman/
    and AUR package:
    http://aur.archlinux.org/packages.php?ID=17100
    you need abs, curl and pacman and optionally namcap and desktop-file-utils.
    RTFM online:
    http://sourceforge.net/apps/mediawiki/p … n_man_page
    first of all copy the pkgman.conf and AUR.conf files from /usr/share/pkgman to ~/.config/pkgman/  or ${XDG_CONFIG_HOME}/pkgman - if ${XDG_CONFIG_HOME} is set,
    edit these two files and then run
    pkgman --runmefirst
    pkgman doesn´t install anything. if you want it just builds the package and moves it to your local repository. install it then with pacman.
    it also has no dependency handling. there are many other tools which provide this.
    the main intention was to keep track of package versions, different PKGBUILD versions and own AUR submitted tarballs; also to keep a clean local repository and clean build directories.
    pkgman is stable now. i´m using it for months without any issues.
    however, if there are problems or feedback please post them here.
    vlad
    changelog:
    version 2.4:
           *pkgman now respects the PKGDEST and SRCDEST variables from makepkg.conf. (though it still moves the src.tar.gz and .pkg.tar.gz to package backup directory).
    version 2.5:
           *pkgman uses PKGDEST if SRCDEST not set in makepkg.conf.
    version 2.6 -> r26:
           *changed version system: version 2.6 is now r26!
           *minor changes: > pkgman uses now the $SHELL variable.
                                    > new and more comprehensible manpage description (thanks to bender02)
    version r27:
           *changed SRCDEST since it's only a cache dir. all files (pkg.tar.gz and src.tar.gz) go to PKGDEST.
    version r28:
           *added new variable ShellCommand to pkgman.conf. Default is $SHELL.
           *One might use an external application (like screen or xterm) to switch to build directory and edit files simultaneously.
    version r30:
           *minor changes. nothing crucial
    r32: *OverwriteExistingPackage isn't used anymore. one can delete it from ~/.config/pkgman/pkgman.conf.
           *minor changes
    version r33:
           *"-l|--list" also shows installed package version and available ABS/AUR PKGBUILD version for given package.
           *"-a|--abs" can now also be used with other options (like "-e")
    r39: * when backing up src.tarballs it asks whether to backup the source file or not
           * more detailed "--list" option - also shows if package is installed or not and available ABS/AUR version
           * added prompt to clean up directory after makepkg
           * when checking pkg.tar.gz also possibility to check for conflicts with files of already installed packages
           * use $PAGER instead of less
           * --help directly shows the manpage
           * --shorthelp shows a brief usage overview
           * added a custom prompt, but only when using bash (is somehow experimental - works fine here for me)
           * minor internal changes
           * pkgman also reads ~/.aurvote file for getting aur name and password. if one already uses aurvote then there is no need for the
             ~/.config/pkgman/AUR.conf file.
    r40: * new manual page & rewrite of usage function
           * both option "--flush" and "--flushall" were omitted in favor of the more versatile "--cleanup" option
           * pkgman <packagename> checks now if <packagename> is owned by user
           * backup option after each editing
           * added license
           * minor internal changes
    r41: * just small bug fixes, nothing crucial.
    r42: * more bugs fixed.
    r45: * new options added:
              >   --listversions: list local and available versions of installed packages from LocalPackages directory
              >  --getownpackages: synchronize local own packages with AUR
           * added new variable in pkgman.conf:
              > ListOutputInPager: output of, for example, "--list" or "--own" is piped into $PAGER
           * added a new optional dependency "desktop-file-utils" for validating desktop entry files
           * also supports now auto-generation of sha sums not only md5
           * internal fixes due to AUR interface changes:
              > use of json interface
              > correct parsing of package category
           * added 2 proto files (located under /usr/share/pacman):
              >  proto.desktop: a template for *.desktop files
              > PKGBUILD-lib32.proto: a template for lib32 packages for x86_64
           * some code changes and fixes
    r46: * added new option to pkgman.conf (AutoGenerateSums).
             > if AutoGenerateSums=no then pkgman asks whether to generate checksums or not.
             > if set to yes it behaves like in former versions.
    r52: * "--getownpackages" with more than 100 packages works again
           * added new option "--cachecopy":
              For each package in CacheCopyList (new variable in pkgman.conf) get existing package from pacman's cache directory - if
              CopyPkgFromCache (new variable in pkgman.conf) is set to yes - and/or create a source tarball of PKGBUILD and related files from ABS -
              if CopySrcFromABS (new variable in pkgman.conf) is set to yes - and copy them to package backup directory.
           * added new variables to pkgman.conf:
               > "CacheCopyList=file" - batch backup file, one package per line - default location is "$HOME/.config/pkgman/package.list".
               > "CopySrcFromABS=[yes|no]"
               > "CopyPkgFromCache=[yes|no]"
           * some bugfixes
           * docs completed
           * CacheCopyList should look like
    package1
    package2
    #this is a comment
    ! this too
    package3
    !package4
    r54: * renamed "--listversions" option to "--diffversions". makes more sense!
              from the man page:
                  pkgman --diffversions
                  Show differing ABS/AUR versions of installed packages from LocalPackages.
    r55: * minor changes.
    r57: * testing release
           * added a new option "--rollback":
               "pkgman <packagename> --rollback" - checks  http://arm.kh.nu for available package versions,
                                                          lets you choose one, fetches the package and
                                                          moves it to the <packagename> backup directory (if "--repoadd" is used).
    r59: * stable release
           * new option "--rollback" (see r57):
                   it checks http://arm.kh.nu (Arch Rollback Machine) for available package versions,
                   downloads chosen file and moves it to local repository (if "-r|--repoadd"  is used).
            * posting files/comments/etc to AUR should work now again.
    r65: *stable release
           * new option "-M,--meta" to create metapackages and add them and their dependencies to local repository.
              it searches for deps inside the backup directories, pacman's cache and if the packages are not available, it tries to fetch the missing
              dependencies from the Arch Rollback Machine site (http://arm.kh.nu).
    r66: * minor fixes
    r68: * some bugfixes
           * "--repoadd" and "--Reporemove" now accurately removes old packages from LocalRepository
    r69: * small bugfixes when listing packages with similar names
           * curl retries now 5 times if connection is not established
    r75: * "--cachecopy" does not try to dl sourcefiles when backing up ABS PKGBUILDs
           * some work on package splitting
           * further internal changes
    r76: * minor mistakes with "ln" purged
    r79: * mostly small changes
           * "--cleanup" now also removes uninstalled packages from LocalRepository
    r81 & r80: * added AUR v1.6.0 support (use more json)
                    * small ARM changes ("--rollback")
    r85:
          * pkgman supports pkg.tar.xz packages
          * some code rewrite, bugs purged (hopefully)
    r113:
          * pkgman now supports building split packages through makepkg.
             If you already use pkgman you need to rerun "pkgman --runmefirst" after updating.
          * new  "-t,--template" option ("pkgman <packagename> --template <alt. packagename> [--pkgbuildversion <version>] [options]").
             Useful to create a new PKGBUILD and use an existing one as a template.
          * new option: "--conf /path/to/alternate/conf/file" - Specify another configuration file.
          * pkgman now uses ${XDG_CONFIG_HOME}/pkgman or $HOME/.config/pkgman - if first not set - as the default location for its conf files.
    r116:
          * check inet conection when submitting src tarballs to AUR
          * some bugs
          * updated manpage on sf
    For further details please read the manual page.
    Last edited by DonVla (2010-04-28 11:56:59)

    I'm having some troubles with it (perhaps missing dependencies, and forgotten hardcoded dirs?):
    jan@aconcagua 8:20PM ~ % pkgman --runmefirst
    /usr/bin/pkgman: line 77: /home/jan/apps/skripte/archscripts/pkgman/share/pkgman/color.bash: No such file or directory
    /usr/bin/pkgman: line 1293: initcolor: command not found
    /usr/bin/pkgman: line 312: highlight: command not found
    /usr/bin/pkgman: line 312: error: command not found
    /usr/bin/pkgman: line 313: highlight: command not found
    /usr/bin/pkgman: line 313: error: command not found
    /usr/bin/pkgman: line 314: highlight: command not found
    /usr/bin/pkgman: line 314: error: command not found
    /usr/bin/pkgman: line 315: highlight: command not found
    /usr/bin/pkgman: line 315: error: command not found
    /usr/bin/pkgman: line 317: error: command not found
    /usr/bin/pkgman: line 318: error: command not found
    /usr/bin/pkgman: line 321: highlight: command not found
    /usr/bin/pkgman: line 321: msg: command not found
    /usr/bin/pkgman: line 329: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    touch: cannot touch `/bin/.pkgman.registered': Permission denied
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 332: list: command not found
    /usr/bin/pkgman: line 337: msg: command not found
    curl: option --output: requires parameter
    curl: try 'curl --help' or 'curl --manual' for more information
    ^C/usr/bin/pkgman: line 209: cleanoutput: command not found
    /usr/bin/pkgman: line 209: cleanoutput: command not found
    (I terminated with ctrl-c).
    EDIT: errors resolved by correcting the path $HOME/apps/skripte/archscripts/pkgman/share/pkgman to /usr/share/pkgman in the pkgman itself.
    Last edited by bender02 (2008-05-23 01:28:58)

  • .java files located in different directories - trouble compiling

    My attempts at getting my main .class file (../master/BicycleMaster.class) to automatically recognize that it's supporting .class file (../master/child/BicycleChild.class) located one directory below keep failing and the .java files won't compile.
    If I move both .java files to the same location (in the ../master directory) then they compile and run just fine, but it's when I want to separate them into the two different directories that I have a problem compiling them. They won't compile because the references in BicycleMaster.jave to BicycleChild.java can't be resolved.
    I was hoping - if you have time - that you might be able to show me by example in the code below? In the file ../master/BicycleMaster.java I added 'package master;' as the first line of the code. It was my impression that this would tell the compiler to look in the sub-directories for any additional .java files. This didn't work either.
    HERE ARE THE DETAILS:
    Directory of K:\COMMON\ITS\STEVEB\java\master
    03/04/2008 04:25 PM <DIR> .
    03/04/2008 04:25 PM <DIR> ..
    03/04/2008 04:24 PM 612 BicycleMaster.java
    03/04/2008 03:54 PM <DIR> child
    1 File(s) 612 bytes
    K:\COMMON\ITS\STEVEB\java\master>type BicycleMaster.java
    package master;
    class BicycleMaster {
        public static void main(String[] args) {
            //Create 2 different bicycle objects
            BicycleChild bike1 = new BicycleChild();
            BicycleChild bike2 = new BicycleChild();
            //Invoke methods on the objects
            bike1.changeCadence(50);
            bike1.speedUp(10);
            bike1.changeGear(2);
            bike1.printStates();
            bike2.changeCadence(50);
            bike2.speedUp(10);
            bike2.changeGear(2);
            bike2.changeCadence(40);
            bike2.speedUp(10);
            bike2.changeGear(3);
            bike2.printStates();
    }Directory of K:\COMMON\ITS\STEVEB\java\master\child
    03/04/2008 03:54 PM <DIR> .
    03/04/2008 03:54 PM <DIR> ..
    03/04/2008 03:54 PM 524 BicycleChild.java
    1 File(s) 524 bytes
    K:\COMMON\ITS\STEVEB\java\master\child>type BicycleChild.java
    class BicycleChild {
        int cadence = 0;
        int speed = 0;
        int gear = 1;
        void changeCadence(int NewValue) {
            cadence = NewValue;
        void changeGear(int NewValue) {
            gear = NewValue;
        void speedUp(int increment) {
            speed = speed + increment;
        void applyBrakes(int decrement) {
            speed = speed - decrement;
        void printStates() {
            System.out.println("Your cadence: "+cadence+", Your speed: "+speed+", Your gear: "+gear);
    }HERE ARE THE ERRORS:
    First I compile the ../master/child/BicycleChild.java file and it compiles fine. This I attempt to compile ../master/BicycleMaster.java and I get the following errors:
    K:\COMMON\ITS\STEVEB\java\master>javac BicycleMaster.java
    BicycleMaster.java:5: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike1 = new BicycleChild();
    ^
    BicycleMaster.java:5: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike1 = new BicycleChild();
    ^
    BicycleMaster.java:6: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike2 = new BicycleChild();
    ^
    BicycleMaster.java:6: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike2 = new BicycleChild();
    ^
    4 errors

    Thanks so much for responding. Progress was definetly made as the compiler now works longer before erroring out. Sadly it's still erroring out for a reason I'm not understanding. Please let me know if you can see where I'm going wrong.
    Here's how it played out for me:
    K:\COMMON\ITS\STEVEB\java>echo %classpath%
    .;k:\common\its\steveb\java\;C:\Program Files\Java\jre1.6.0_04\lib\ext\QTJava.zip
    K:\COMMON\ITS\STEVEB\java\master\child>javac BicycleChild.java
    K:\COMMON\ITS\STEVEB\java\master\child>cd ..
    K:\COMMON\ITS\STEVEB\java\master>javac BicycleMaster.java
    BicycleMaster.java:5: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike1 = new BicycleChild();
    ^
    BicycleMaster.java:5: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike1 = new BicycleChild();
    ^
    BicycleMaster.java:6: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike2 = new BicycleChild();
    ^
    BicycleMaster.java:6: cannot find symbol
    symbol : class BicycleChild
    location: class master.BicycleMaster
    BicycleChild bike2 = new BicycleChild();
    ^
    4 errors
    Here are the two programs revised as you suggested:
    K:\COMMON\ITS\STEVEB\java\master\child>type BicycleChild.java
    package master.child;
    class BicycleChild {
        int cadence = 0;
        int speed = 0;
        int gear = 1;
        void changeCadence(int NewValue) {
            cadence = NewValue;
        void changeGear(int NewValue) {
            gear = NewValue;
        void speedUp(int increment) {
            speed = speed + increment;
        void applyBrakes(int decrement) {
            speed = speed - decrement;
        void printStates() {
            System.out.println("Your cadence: "+cadence+", Your speed: "+speed+", Your gear: "+gear);
    }K:\COMMON\ITS\STEVEB\java\master>type BicycleMaster.java
    package master;
    class BicycleMaster {
        public static void main(String[] args) {
            //Create 2 different bicycle objects
            BicycleChild bike1 = new BicycleChild();
            BicycleChild bike2 = new BicycleChild();
            //Invoke methods on the objects
            bike1.changeCadence(50);
            bike1.speedUp(10);
            bike1.changeGear(2);
            bike1.printStates();
            bike2.changeCadence(50);
            bike2.speedUp(10);
            bike2.changeGear(2);
            bike2.changeCadence(40);
            bike2.speedUp(10);
            bike2.changeGear(3);
            bike2.printStates();
    }

  • RTorrent: move downloads to different directories depending on tracker

    Hi!
    I would like rTorrent to move completed downloads to different directories depending on the trackers in the torrent. An ideal setup for me would be something like this:
    torrents/completed/tracker_x
    torrents/completed/tracker_y
    torrents/completed/tracker_z
    torrents/completed/unknown_trackers
    torrents/incomplete
    torrents/torrent_files
    torrents/session_data
    Any hints/links/etc for me? I think i can make something work if rTorrent could pass the .torrent file path and downloading directory to a bash script

    very lazily copied out my .rtorrentrc
    32 schedule = watch_directory_1,10,10,"load_start=/home/share/media/torrents/foo/*.torrent,d.set_custom1=/home /share/media/video/foo"
    33 schedule = watch_directory_2,10,10,"load_start=/home/share/media/torrents/bar/*.torrent,d.set_custom1=/home/s hare/media/video/bar"
    39 on_finished = move_complete,"d.set_directory=$d.get_custom1= ;execute=mv,-u,$d.get_base_path=,$d.get_custom1="
    there's also this, but i think it doesn't actually move the files; it makes symlinks.
    http://code.google.com/p/pyroscope/wiki … Completion
    Last edited by tladuke (2010-12-12 23:31:40)

  • I'm trying to download office 365 small business package, and every time I try the website it says there is a runtime service error in the '/' application. Is this my mac or is it the website, and how can I fix it?

    I'm trying to download office 365 small business package, and every time I try the website it says there is a runtime service error in the '/' application. Is this my mac or is it the website, and how can I fix it?

    If a phone is sold from one friend to another and wants to use it on a different carrier the friend can contact the carrier it was sold by to request it unlocked.  I know AT&T, Verizon, and Sprint will give you the steps to unlock it as long as the original contract it was bought under has been completed.  eBay/Craigslist is really not the best place to try to get "unlocked phones" from, if it turns out the phone isn't unlocked then I'm really sorry you got stuck with that one and as stevejobsfan said above I would report them immediately and see if you can recover your money.  I sell phones for a living and this happens a lot

  • How to include header files from different directories?

    Hi,
    Sorry for the newb question, but I can't figure this out. I'm trying to compile a simple piece of code (C++) that uses header files in a directory different from the Project directory; header files are in /opt/csw/postgresql/include/pqxx. I've tried a few different things, adding that directory to the include directives under Resource Files, add existing files from a folder, etc etc. Whenever I try to build, dmake bails with status -1. I can't seem to get this working, can someone explain how to use header files from different directories?
    Thanks,
    SlowToady

    Header files are usually specified relative to a base directory. If the base directory is not a system directory -- /usr/include or the compiler installation directory -- add a command-line directive
    -I path/to/base/dirfor each such directory.
    The path can be absolute, such as
    -i /opt/csw/postgresql/includeor relative, such as
    -I ../../my/includeIn your source code, specify the header file relative to the base directory, and be sure to use quotes, not angle brackets. Example:
    #include "header.h"  // right
    #include <header.h>  // wrongThe angle brackets are used for system headers, like <iostream> or <stdlib.h>.
    The rules above are common to all compilers on Unix and Linux, and generally to all C and C++ compilers.
    For more details, read about the -I option in the C++ Users Guide. You can find the guide by pointing your browser to the "docs" directory in the compiler installation, or go here:
    http://docs.sun.com/app/docs/doc/819-5267
    All command-line options are described in Appendix A.

  • Drop the files into different directories based on the filename

    Hi,
    I had a reqiuirement based on the file name, i should drop the files in to different directories.
    I can get the filename through variable substitution in receiver file communication channel, now i want to drop the file into different folders based on conditions.
    suppose, if the file name is DDDX234
    i should do substring of filename0+(4), if the value is L then i should drop in X directory
    suppose, if the file name is DDDY234
    i should do substring of filename0+(4), if the value is L then i should drop in Y directory.
    How can i drop the file into differnent directories based on filename.
    Thanks
    Srinivas

    Thanks Michal,
    I mapped the directory and filename to the target header in the mapping
    Filename --> UDF --> Header(target)
    and in the receiver channel checked the ASMA and given * in the filename and directory name.
    But in runtime iam getting the error as
    Attempt to process file failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: The Adapter Message Property 'FileName' was configured as mandatory element, but there is no 'DynamicConfiguration' element in the XI Message header
    MY UDF is
    public String Directory(String a,Container container){
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key  = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "Directory");
    String FileName = conf.get(key);
    FileName = a;
    conf.put(key, FileName);
    %%%based on filename the directory should change
    String Directory = conf.get(key1);
    Directory = "/SAPInterface/XI/PPD/DHX/out";
    conf.put(key1, Directory);
    return "";
    Help me in correcting this error.
    Thanks
    Srinivas

  • Package and Directory Structure

    Hello --
    I work in a group that supports 3 web sites. (b2b, b2c, b2e)
    We're just beginning to develop Java in-house and
    currently using Solaris and JDK 1.2.x.
    I need to propose a package and directory structure strategy.
    The "reverse the domain name" guideline makes sense to me.
    My first thoughts are: ("classes" dir could be created anywhere)
    classes/com/ppco/b2X/ <--- for .java and .class files (development)
    lib/ <--- for b2X JAR files (ready for test or production)
    util/ <--- for our utility classes like DBAccessor
    lib/ <--- for our JAR files
    sun/ <--- for classes like com.sun.mail pkg
    lib/ <--- for JAR files like mail.jar
    org/ <--- for classes in org.omg.CORBA pkg
    lib/ <--- for JAR files
    We need to handle 3rd party classes.
    Development would be done in the b2X tree and JAR files would
    be installed the lib/ dir for testing and release to production.
    Does anyone have recommendations or experiences to share ?
    Are there some things to avoid ?
    Thanks !
    Al

    Hello Al,
    you are on the right track. A typical convention I follow is:
    <project>
          bin - for startup scripts, etc. to run your application
          build - for build scripts (not necessary if you build using your IDE. See below.)
          classes - for my compiled classes
          lib - for my 3rd party libraries
          src - for my source code
          test - for my test code (see http://junit.org/ )
    That's the project hierarchy. The src (i.e. the package heirarchy) structure is another story.
    As you say, you start with the reverse domain name. This is to give your packages a unique namespace. After that, your best guide is practice. Packages can be larger or smaller, depending on your coding practices. Usually you would have these (exact names may differ), plus others:
          com/ppco/client
          com/ppco/server
          com/ppco/common
          com/ppco/db
    I think your break down of sun, org, etc. is a bit too much. If you would like to do so, however, I recommend you do the separation under /lib. This way, the top level project directory is not polluted by the different types of libraries in use.
    Regards,
    Manuel Amago.
    From build above: I would suggest you always build your release distribution directly with the JDK, not using any IDE compiler. This is because Sun's JDK is the reference implementation, thus, any compatibility issues are not yours.
    An easy way to achieve this is by using ANT (see http://jakarta.apache.ort/ant/ ).

  • Send multiple files in different directories using Receiver File Adapter

    Hi Experts,
    I have one File to File without ESR scenario where I have to pick multiple files from different directories and to save them in different directories on receiver side.
    Can anyne help me to send multiple files in different directories using receiver file adapter.
    Is it possible??
    Any help will be appreciated.
    Regards,
    Danish

    hi ,
    that is possiable without esr,
    we need to create one sender communication channel , in that  we nend to use "adavnced selection for source file " for sending multiple files from multiple directories.
    we need to create 'n' receiver communication channels and 'n' receiver agreements based on communication channels .
    in receiver determination, provide multiple receivers
    In interface determination , provide * symbol for receiver communication components
    thanks,

Maybe you are looking for