Importing package from ext folder

hello ,
i am learning java and try to import packages ,
now here is problem i am facing:-
i made two files as follows :-
1. package mypack1;
public class Protection1{
public void show(){
System.out.println("i am in class Protection1");
2. package mypack2;
public class Protection2{
public void show(){
System.out.println("i am in class Protection2");
now i made following class to import packages
import mypack1.*;
import mypack2.*;
class Trial{
public static void main (String args[]){
System.out.println("trial class");
mypack2.Protection2 ob2=new mypack2.Protection2();
mypack1.Protection1 ob1=new mypack1.Protection1();
ob2.show();
ob1.show();
my problem is class Trial is running fine when packages are in same directory with the file Trial.java .
but when i try to create a jar file and store that file in ext folder so that i can import these packages from anywhere .no error comes at comilation time butwhen i try to run program it shows error the class mypack1/Protection1 can not be found and same for class Protection2 . i know that there is no problem in creating jar files.
please help me to find out solution.
thanks

>
but when i try to create a jar file and store that file in ext folder so that i can import these packages from anywhere .no error comes at comilation time butwhen i try to run program it shows error the class mypack1/Protection1 can not be found and same for class Protection2 . i know that there is no problem in creating jar files.I think problem here is you've to put the jar file in your classpath, and then you've to import the classname. it's something like import mypack1.*;can you post me the code. which u've used after creating the jar. and check whether the class files are there in your jar file are not. i mean open the jar with winzip/winrar and chech whether the .class files are there are not.
Diablo

Similar Messages

  • When using Iphoto to import photo from existing folder, what happens if I delete the photo in Iphoto ? Will the original file in the folder be deleted too?

    When using Iphoto to import photo from existing folder to iphoto, what happens if:
    1. I delete that photo in iphoto? will the original file in the folder be deleted too ?
    2.  when importing, does the hard disk store 2 versions of the photo, hence occupying additional space in the harddisk?

    1 - no  --  iPhoto only manages fiel within the iPhoto library - it does not ever do anything with files outside the library
    2 - No idea what you are asking - by default (and strongly recommended) iPhoto copies the original to the iPhoto library and you delete the source file outside the iPhoto library - iPhoto alwasy has at least two versions of every photo and some times three - it always have the original, a thumbnail and once a photo is modified a preview - this is not optional - if it is not what you want then iPhoto is not the correct progrtam to be using for phopto management
    LN

  • How to install packages from local folder

    Hi all,
    I have downloaded all arch linux packages from the following URLs:
    ftp://mirrors.kernel.org/archlinux/core/os/i686/
    ftp://mirrors.kernel.org/archlinux/extra/os/i686/
    ftp://mirrors.kernel.org/archlinux/community/os/i686/
    and then have saved them to an external hard disk. Then I have attached that external hard disk to my system and packages are available in following folders:
    /mnt/external_hd/Arch_Linux/Core-OS/
    /mnt/external_hd/Arch_Linux/Extra-OS-1/
    /mnt/external_hd/Arch_Linux/Extra-OS-2/
    /mnt/external_hd/Arch_Linux/Community-OS-1/
    /mnt/external_hd/Arch_Linux/Community-OS-2/
    /mnt/external_hd/Arch_Linux/Community-OS-3/
    Now I want to install some or all packages from these folder with the help of pacman command. I am seeing that package corresponding to wvdial command is available in the /mnt/external_hd/Arch_Linux/Extra-OS-1/ folder. But how to use pacman command so that I can install wvdial package from that folder?
    In addition to this if I want to install ALL Extra Packages available in the folders /mnt/external_hd/Arch_Linux/Extra-OS-1/ and /mnt/external_hd/Arch_Linux/Extra-OS-2/ then how to execute the pacman command?
    Please send me step by step instructions so that I shall be able to install some or all downloaded packages.
    I shall remain thankful for this forever.
    Best Regards ...
    Pankaj Kumar

    Hi fukawi2,
    Thanks for reply and searching for my username on google. It is true that I am a freelance s/w developer but I am not installing Arch Linux for any client. I am installing it due to some other reasons. In fact I started working on Red Hat and then on Fedora when I was a student of bachelor degree course in computer applications. Then later I searched open suse and started using it. I am using open suse from its 10.1 version. However the recent version of this distribution has become much resource consuming. So I am in the need of a light weight linux distribution. And I encountered Arch Linux. Then I purchased its installation disk from an online shop and installed it on my system. But only text mode is working at this moment. Since I want to use X window and so I started to follow the syntax of pacman command. But it is connecting to internet. Since my internet connection is slow (average speed of 10kbps) and so I requested the same online shop to download all packages from Arch Linux repository and send them to me. Therefore now I am having all those packages in my local external hard disk drive in the folder mentioned in my first post. Now I want to install packages from these folder. And so in order to get help I have come to this forum.
    I have also followed the steps given on the pages https://wiki.archlinux.org/index.php/Pa … l_commands and https://wiki.archlinux.org/index.php/Pa … repository. But when I am trying to install a particular package using the following command:
    pacman -U wvdial
    then it is asking for a dependency. I know that  the dependent package in my local folder but why it is not being automatically taken by pacman command? Can you please explain it.
    That is why I am asking help only for customization and usages of pacman in order to install packages from local folder. But each member in this forum is only referring to long written manuals and not giving me exact solution which I think will involve four/five steps.
    Best Regards ...
    Pankaj Kumar

  • How to import photos from a folder that contains hundreds of folders to Photos keeping the same folder structure?

    How to import photos from a folder that contains hundreds of folders to Photos keeping the same folder structure?

    You'll have to do that manually, i.e. export each album of photos to a folder with the same name located on your hard drive via  the File ➙ Export ➙ File Export menu option.
    OT

  • Importing package from ecc5.0 to 4.6c - gui not getting imported????

    Hi,
    We are importing package from ecc5.0 to 4.6c, but  gui is not getting imported. Please advice.....
    Thanks for your help in advance.
    Thanks,
    Sheel

    Hi Sheel,
    Have you looked through SAP Note 330367 and what is the error you are getting? Are you going from a unicode box to a non-unicode box (SAP Note 638357 discusses the requirements for this)?
    Generally, you can move everything from the ECC 5.0 box to the 4.6 box except for some CUA interfaces (you might see an error concerning EUDB table entries on the transport log). First you will want to update the transport programs (including tp) and then make any needed changes for going from UC to NUC. Finally you will bring in the transports and transfer the CUA screens using a program called from SE38 (detailed in SAP Note 327565).
    Hope that helps!
    J. Haynes

  • How to make a ARCH package from local folder?

    hello ARCH lovers
    I can't seem to figure out how to make a installable
    package from a folder on my desktop?
    Coming from Slackware; the procedure would be simple enough just issuing
    "makepkg /root/pkgname.txz"
    Now; how would I do the same in ARCH?
    I know about PKGBUILD, etc but there is no source or any url's
    I just need to make it into a .pkg.tar.xz
    The package is my "kernel-live-kit" for both x86 and x86_64 versions of arch
    enabling one to remaster there existing install into a livecd/usb, etc
    The kernel itself is kernel26-zen from AUR
    http://aur.archlinux.org/packages.php?ID=30330
    however; mine is quite different and also includes all components to make the livecd using modified linux-live-6.3.0
    scripts and special stuff
    The pkg includes a premade kernel with modules and full kernel source
    The resulting live media is similar to my nFluxOS builds
    http://multidistro.com/
    As I will be releasing the new four horsemen of nFluxOS today; I also made 4 Kernel pkg's for the arch and slack versions
    Those will be for x86/x86_64 versions for both arch and slackware
    I did this in lieu of creating a quartet of x86_64 versions of nFluxOS; as that would up the number of versions to 8
    and I would then have to maintain 8 distro's instead of 4.
    I made a testing version of ARCH x86_64 live
    http://www.linuxquestions.org/questions … ost4017796
    so, I really need to make the ARCH x86 and x86_64 kernel kits into installable pkg's because there are many symlinks that would get corrupted if I just tarred it and then the end user untars it and copies it somewhere it would mess up the symlinks.
    as I said, in slackware I do makepkg and it creates a script named "doinst.sh" that makes all the symlinks, etc
    so, any help appreciated!
    thanks

    You can read a simple introduction to using the ABS here.
    By the way, it's not hard. Out of all the distributions I've used, Arch Linux is the only one I've figured out how to make packages for.

  • Import package from one project into another

    Hello everyone,
    I have some projects.
    An enterprise and war project created in netbeans.
    I would like to use some files from one project to another. when I import
    the package I get the error-
    'package x does not exist'
    I have added the package to the project but I still get the error.
    I have also added the project to import to my glasspath but still.
    E.g.
    set classpath
    .;c:\enterpriseA;
    My next idea is to create a war project into my enterprise project and copy the files
    from the war project into it in order to use it. But I'm sure there is a better way.
    THanking you in advance.
    eve
    Edited by: evepokua on Nov 22, 2009 1:44 PM

    One mistake I keep making is that I don't add the package to the
    Dependencies of the plugin I'm writing. You have to go to plugin.xml,
    and add the package you depend on to the Dependencies section. Maybe you
    didn't do this?
    Michael
    nasti wrote:
    > Hello everybody!
    > I am new user of osgi and eclipse. I tried to do some of Oscar examples
    > but I had some problems. Namely, the problem in import of package from
    > one project into another in Eclipse.
    > I add first project to the Build Path of the second one.
    > I add to the first project manifest line: Export-Package example2.service.
    > I add to the second project manifest line: Import-Package example2.service.
    > But when I tried to execute these bundles the
    > java.lang.NoClassDefFoundError was occurred. May be you will help me
    > with this problem.
    > Thanks....
    >
    >

  • Had to reinstall OS and Itunes..Will not import songs from library folder

    I reinstalled my Windows 7 OS and Installed Itunes 10.6 but when I add my ipodmusic folder to the library it does not import the songs into the library. I tries dragging and dropping a few songs but it deletes them from the folder.
    Any ideas?

    I think I'm having the same problem. This is what I get when I try to import songs:
    The iPod “Ian” is linked to another iTunes music library. Do you want to change the link to this iTunes music library and replace all existing songs and playlists on this I Pod with those from this library?
    Yes No
    What is this about? My buddy accidentally hit yes, and lost all of the songs on his iPod. I simply want to update my iPod with new material. This new material was obtained while using a different computer than what I originally used when I first got my iPod. Does anyone know how I can get music from a new computer on my iPod

  • I cannot import images from EXT HD

    UNtil yesterday, everything was fine. I am on a Mac. Running iOS 10.9.5 and LR version 5.5 (CR 8.5) 
    I have imported images from my card into Aperture and these images are stored on an external HD. I then bring the ones I wish to edot into LR
    When I try to bring them inot lr, the import process seems to go as always, but upon completion, i get a message saying 'some files cannot be written'. No Error code. Basically all files are not being written. The images are in Aperture. I can see and edit them there, but I cannot bring them from there into Lightroom as I have always done. I havemnt done anything to change my set up. SOmething has happened and I dont know what it is or what to do about it.
    I upgraded from LR4 online, so I no longer have a physical cd of the software.
    I would be very grateful for any help anyone can give me. Thank you

    I mean the directory specified in the Lightroom Import dialog box, near the top right, it says "Destination". Has that directory been accidentally changed to someplace different than it was before when things were working properly?
    I can't tell you how to change permissions, as I am not a Mac person, but I think that Google thing might be able to find the answer.

  • Can't import package from package

    Ok, here's the deal:
    In a folder i have some class files, and some packages i made myself.
    lets say one package is package1, and the other is package2
    now in the root folder i can have a class file that has the statement
    import package2.*;and it works fine.
    but in a class file that is in package1 i get a compile error when i type
    import package2.*;so the question is:
    how do i use the class files in one package in another package?
    I see sun does it all the time.
    example the Graphics2D class:
    package java.awt;
    import java.awt.RenderingHints.Key;
    import java.awt.geom.AffineTransform;
    import java.awt.image.ImageObserver;
    import java.awt.image.BufferedImageOp;
    import java.awt.image.BufferedImage;
    import java.awt.image.RenderedImage;
    import java.awt.image.renderable.RenderableImage;
    import java.awt.font.GlyphVector;
    import java.awt.font.FontRenderContext;
    import java.awt.font.TextAttribute;
    import java.text.AttributedCharacterIterator;
    import java.util.Map;that imports a package that isn't in awt, even though the class file itself is in awt

    when you compile, compile from the root folder:
    root folder> javac package1/sourcecode.java

  • HELP! Cant import folders from ext drive to itunes

    I've recently had problems with my PC so, decided to copy all the stuff from my 60gig iPod to my external hard drive. I uninstalled iTunes then reinstalled it & tried to copy the folders from my ext drive back into itunes but, it's not moving them all. A number of folders exist with the name of the band & these seem to be ok - they look like typical folders in a windows explorer view. There is a shaded folder called "music" which when opened then contains more shaded folders with the folder names of "F00, F01" etc. These folders will not import to itunes no matter what I do. I have tried to "import folder" but it doesn't work, I have tried to move the folders back to my C drive but itunes doesn't recognise them. I have updated the "advanced" tab in the preferences to my ext drive / pointed to the folder "music" but, it still doesn't import the files. Can anyone help or offer some suggestions please? I'm really hacked off by this as I cant sync my iPod up as I'll lose everything on it. thank you!!!

    You are not the only one... Several threads exist on this topic - iTunes refusing to import (all) files from folders - but no solution yet it seems, and Apple is not responding at all...

  • Import Video from video folder

    Anyway to import a video from the "video" folder? Currently you click "media" and the photo album/camera roll are the only options.

    Yes my reply was for the Mac seeing as how you posted it in the Mac forum. For iPad, try posting in the [Keynote for iPad forum|http://discussions.apple.com/forum.jspa?forumID=1369].

  • Importing packages from other projects

    Hey Folks,
    I have an abstract class in one project called Test, and I want a class in project Test2 to extend it. How do I figure out the proper name of the package that the abstract class is in to import it into the second project?
    Thanks,
    Tav

    so the problem I have now (i am using NetBeans, and included the other project in my libraries) is this:
    It is claiming that i am not overriding the abstract method getRandomNumbers() when i clearly am.
    public class MyRandom2 extends AbstractRandom {
        private int[] results;
        private static final int A = 48271;
        private static final int M = 2147483647;
        private static final int Q = M / A;
        private static final int R = M % A;
        private int state;
        MyRandom2()
           state = (int)System.currentTimeMillis()%A;
           results = new int[5];
           for(int a = 0; a < results.length; a++)
               if(state%2 == 0)
                  results[a] = nextInt();
               else
                  results[a] = -nextInt();
        private int nextInt()
            int tmpState = A * ( state % Q ) - R * ( state / Q );
            if( tmpState >= 0 )
                state = tmpState;
            else
                state = tmpState + M;
            return state;
        int [] getRandomNumbers()
            return results;
    }any ideas?

  • Importing packages from jar file

    Hi all,
    I have a jar file that contain a package . And i set the clathpath with the path of jar file including the jar file name. And when I import the package i have an error that package does not exist. And I don't know why.

    1.) did you spell the path + name of the JAR file correctly?
    2.) Did you spell the package name including capitalization correctly?
    3.) Is the package hierarchie in the JAR the same as the package names?

  • Importing music from shared folder

    I'm currently moving my music to my 2nd Account. (i'm the only user). I also put the .xml file and iTunes library file in the shared folder.
    Question: what do i need to do to ensure that my songs, playlists get imported correctly??
    Thanks!

    Hello, I had similar problems. Here is what I think is happening: You have two versions of every song in your library stored in your "My Music" folder. When iTunes first scans your "My Music" folder, it creates a copy of every song and keeps these in the "My Documents\My Music\iTunes\iTunes Music" folder. At least this is where it is stored on my machine. These stay even if you uninstall iTunes.
    So, when you rescan your music with iTunes, it re-sees both versions. Here is what I would do:
    1.Uninstall iTunes as thoroughly as you possibly can.
    2.Look in your "My Music" folder for any folder or file with the word "iTunes" in it. Delete these files (iTunes Music, iTunes Libraries, etc.).
    3. Make sure there is only one version of each song on your machine.
    4. Reinstall iTunes.
    5. When you are prompted, tell iTunes that you will manage your files. Basically, don't allow iTunes to copy every song to the "iTunes Music" folder.
    Here is what I do to make sure my music stays where I want it:
    Whenever I import a CD or purchase music, it is automatically placed in the "My Documents\My Music\iTunes\iTunes Music" folder. I go in and cut and paste the just-added folder out of this "iTunes Music" folder into the "My Music" folder where all of my other music resides. Then, I open iTunes and double click on the files I just moved. iTunes will not be able to find them because they are not where iTunes remembers storing them. It will give me the option to find the files manually, which I do. I do this for every song I just added.
    This way, all of my music stays organized in the "My Music" folder. Should I ever need to change machines, I can get the files only with no iTunes baggage to screw up the installation on the new machine. Hope this helps!

Maybe you are looking for

  • Saving Data in Database.

    I want to save game data into database...how can i do that?? for that which dabase I've to use...and also which scripting language??

  • SAP BO Dashboards 4.1 best practice on layout and components

    Dear SCN, I have requirement to create a BO 4.1 dashboard with data & Visualization based on a excel sheet which is currently in use as a Mgmt dashboard. The current excel dashboard is having more than 100 KPIs in one view which is readable only if y

  • Writing file content on to mobile phone (need to specify the file name req)

    Hi, I have a jsp page which i am trying to execute on a mobile phone. In this page i am trying to open a ServletOutputStream and using this i am trying to write some content on to the phone. But by default the file name is beeing given as the name of

  • Transferring Borderlands 2 from My Mac to my friend's Man

    Hi Guys, So i have purchased Borderlands 2 on the App store for my Mac recently and my friend has also purchased the app as well. He is currently downloading it on his Mac, but it is taking a really long time. So I am wondering if its possible to som

  • Toplink exception

    Hi , In asyncronous process , i am trying to connect database using DB adapter , i am getting this error . ( If i restart the server it is working for some time again same error getting) file:/opt/oracle/product/10.1.3.1/OracleAS1/bpel/domains/usa/tm