Regarding packages,help please

Hi,
As I have understood it for example,
What is the difference in putting the/source class files in the
package package1;
and
package my.own.package1
Its the same right,why do we have to put the extra my.own
and setting the class path accordingly
Hope that I conveyed my question correctly.
Help appreciated
Thanks
AS

You can use a single named package just fine.
Packages are typically used for ogranization as well
as reduced name collisions.
The normal naming convention for packages is as
follows:
domain.company.package;
So if your domain is org and you're developing a gui
project for apache then it would look like:
org.apache.gui;
Just think if everyone started using single name
packages how many more collisions there would be. For
example, if you and I were developing web components
and we both decided to use the package name web then
it would be tough to intermingle our code as the
potential for conflicts is higher. For example, if we
both had an upload object in our package that did
different things then they couldn't co-exist. See
below:
package web
//My servlet to receive uploads
class Upload extends Servlet
package web
//Your component to help POST uploads
class Upload extends URLStreamHandler
}However if we prepend our domains and company names to
the package then we could share code:
package com.ics.web
//My servlet to receive uploads
class Upload extends Servlet
package org.apache.web
//Your component to help POST uploads
class Upload extends URLStreamHandler
}Furthermore you'd most likely want some organization
to your code. you wouldn't just want one package with
all of your classes in it. It would be hard to
decipher which is which. So you'd create sub-packages
under your main package. You get something like
org.apache.web.servlets and org.apache.web.client. Why
do this? because you want to treat your client
classes differently than your servlets. It makes it
easier at build time as well when the classes need to
deploy in different places. It's just easier to say
grab everything from the servlets package and put them
in my web archive (war). Also grab everything from
client and put them in the root of my Enterprise
archive (EAR). There are other uses for this as well,
I'm sure.
CliffThanks Cliff for the comprehensive introduction for using packages.Will understand it programatically now.Any doubts will keep posting.
AS

Similar Messages

  • How to cancel my bt package help please

    after ringing sky and virgin media and being told i was unable to get a package with them i signed up with bt.
    i signed up for bt-vision, 20 meg net and phone with free weekend calls.
    i paid the £50 they asked for on the phone and was told i would receive all the equipment on the 15th april and it would all go live on the 15th aswell.
    i received my parcel and set it all up on the 15th april and iv had nothing but problems.
    im paying for 20 meg internet but im never able to receive more then 3 meg wich would be ok if i wasnt having to run a pc and 2 ps3's of it plus i was never told on the phone when making the order all i would get is 3 meg internet speed.
    the wireless disconects every hour or so
    the bt-vision is a waste of time as the image is rubbish as im unable to use a hdmi lead for it as it says my tv dose not suport it ( but it dose ), so im useing the freeview i got built into my tv at the mo
    i have 2 laptops that are unable to conect wireless as they are running windows xp and the only way to conect them is by lowering the security on the router , wich i was never told about when making the order
    the phone works fine apart from me getting at least 4 calls a day with no one speaking and this started the day the phone went in ( 15th april ) and befor i gave anyone the number i do 1471 and there is no number.
    so iv had bt for 5 days now, i rung them yesterday and was told i am unable to cancel my contract without having to pay for the 18 month bill.
    i was told i could only cancel it for free befor the 15th april wich is a joke because it wasnt even active then so how was i ment to know the service was going to be so bad.
    am i signed into a contract with bt as iv not signed anything nore set up any direct debits for it yet ?
    dose anyone know a way of ending this contract without paying a large bill please ?
    thanks for your time
    martin

    taz1983 wrote:
    after ringing sky and virgin media and being told i was unable to get a package with them i signed up with bt.
    i signed up for bt-vision, 20 meg net and phone with free weekend calls.
    i paid the £50 they asked for on the phone and was told i would receive all the equipment on the 15th april and it would all go live on the 15th aswell.
    i received my parcel and set it all up on the 15th april and iv had nothing but problems.
    im paying for 20 meg internet but im never able to receive more then 3 meg wich would be ok if i wasnt having to run a pc and 2 ps3's of it plus i was never told on the phone when making the order all i would get is 3 meg internet speed.
    the wireless disconects every hour or so
    the bt-vision is a waste of time as the image is rubbish as im unable to use a hdmi lead for it as it says my tv dose not suport it ( but it dose ), so im useing the freeview i got built into my tv at the mo
    i have 2 laptops that are unable to conect wireless as they are running windows xp and the only way to conect them is by lowering the security on the router , wich i was never told about when making the order
    the phone works fine apart from me getting at least 4 calls a day with no one speaking and this started the day the phone went in ( 15th april ) and befor i gave anyone the number i do 1471 and there is no number.
    so iv had bt for 5 days now, i rung them yesterday and was told i am unable to cancel my contract without having to pay for the 18 month bill.
    i was told i could only cancel it for free befor the 15th april wich is a joke because it wasnt even active then so how was i ment to know the service was going to be so bad.
    am i signed into a contract with bt as iv not signed anything nore set up any direct debits for it yet ?
    dose anyone know a way of ending this contract without paying a large bill please ?
    thanks for your time
    martin
    BT should normally give you an estimate of the speed you will get when you inquire about broadband.  It can be anything between 512K and 20M, depending on your line and the local exchange.  Did you ever ask?  BT have previously said that they will release people from contracts if the speed is significantly lower than what they said customers would get.  Did they say "20M" or "up to 20M" - there is a big difference between the two.
    You might be able to fix the HDMI problem by turning either or both of the TV and Vision box off and on again, or by getting a better quality of HDMI lead.  Unfortunately, HDMI can be a bit temperamental.  In any case, the Vision box makes a useful freeview video recorded.
    If your WinXP laptops require a lower encryption, then it's either because their wireless adaptors are obsolete, or the drivers for them are obsolete.  I have a netbook running XP and it connects happily with WPA2 encryption.
    Your contract doesn't have to be on paper.  Verbal contracts are legally valid, and BT will have recorded the phone call.  Since broadband and Vision are services, the rules under the Distance Selling Regulations are different.  The normal 14 day cooling off period after receiving goods only applies to products, not services.

  • Little help please regarding deleting files and folders...

    My wife has a MBP and has accumulated some old items in her documents folder that she'd like to delete. She has a USB mouse but the "right click" doesn't appear to work. She's running 10.4.11 and can't reveal the files in icon mode to facilitate dragging to trash. Certainly there is a sequence of keystroke commands that will allow these files to be effectively trashed, but our "control/delete", or "apple/delete", or "option/delete" doesn't do the trick after highlighting the subject file. Help please! TIA!

    To delete a file or folder, high light it then using the keyboard type Command Delete and that will delete it. If you have multiple files and/or folders the same keyboard commands apply.
    Regards,
    Roger

  • OS X update 10.9.3 can't be installed on this disk. An error occurred while evaluating JavaAcript for the package. Please help!

    My Apple Store, Mail and update was not working for sometimes, when I download OS 10.9.3 and try to install, error message appear: OS X update 10.9.3 can't be installed on this disk. An error occurred while evaluating JavaScript for the package. Please help!

    iMac (27-inch Mid 2011), OS X Mavericks (10.9.3), SL & ML, G4 450 MP w/Leopard, 9.2.2

  • User defined packages in TOMCAT HELP PLEASE!!!!

    Hello all,
    I am have created a package (foo).
    I then tried to import it into a jsp but TOMCAT say the package foo
    doesn't exist. I have stored the class file for the foo package in the same root directory with the jsp file. I have I stored the class file in the wrong place.
    <%@ page import="java.util.*,foo.*"%>
    <%!
    ResourceBundle bundle = null;
    public void jspInit()
    bundle = ResourceBundle.getBundle("forms");
    %>
    <jsp:useBean id="formHandler" class="foo.FormBean" scope="request">
    <jsp:setProperty name="formHandler" property="*" />
    </jsp:useBean>
    <%
    if (formHandler.validate())
    %>
    <jsp:forward page="<%=bundle.getString(\"process.success\")%>/">
    <%
    }else{
    %>
    <jsp:forward page="<%=bundle.getString(\"process.retry\")"%>/>
    <%
    %>
    can anyone help PLEASE!!!!!!!!!!!!
    Rohan

    you should read the docs provided with tomcat showing where to put your classes!
    WEB-INF/classes !

  • Hello Creative Cloud Illustrator Community. Help Please! This is with regard to compound paths and transparencies. I have set some type on a circle and then created outlines. I then placed the outlined type on a black stroked ring which I then selected "o

    Hello Creative Cloud Illustrator Community:
    Help Please!
    This is with regard to creating a compound path:
    I have set some white type on a circle and then created outlines. I then placed the outlined type on a black stroked ring which I then selected "outlined stroke." I then put both "outlined" graphical elements on a separate solid bkg. (all 3 are on the same layer). Lastly, I then selected the top two elements and went to "make" a "compound path" (because I want the type to be the "holes" so I can see through to the background). However, the only effect I get is the white outlined type turning black (the same color as the black ring). What am i doing wrong? I can achieve the desired result with simple boxes but it won't work with a circular type path, a stroked ring and a solid bkg.
    Any help on this would be greatly appreciated!
    Thank You!

    Thanks for the response Jacob.
    Unfortunately, I tried your suggestion with no success. BTW, minus front is now Subtract. Apparently, by clicking option>subtract, it works in the same way as minus front. I tried this to no avail.
    Let me reiterate please.
    I have 3 graphic elements-all on the same layer:
    1. Background: Gold circle with a fill and no stroke.
    2. Middle: Black ring (Stroked) inside gold background circle.
    3. Top: White copy set on a circular type path and placed directly on top of middle black ring.
    Both the middle black ring and top type path HAVE BEEN CONVERTED TO OUTLINES.
    LASTLY, I select the Middle and Top, go to Compound Paths and choose "Make" and my white copy turns to black. Wrong!
    WHAT I WANT TO HAPPEN: I want the white copy to become HOLES, so the GOLD background shows through.
    Any solutions would be very much appreciated!

  • Error regarding "cg.dll" - Help please.

    I recently downloaded and installed photoshop. However, when i try to run it, the following error crops up everytime: " The program can't start because cg.dll is missing from your computer. Try reinstalling the program to fix this problem. " I have try reinstalling it many times and there has been no improvement. Can anyone help please?

    I have no experience working with a Zoom cam. But sometimes it helps if you install the camcorder's software on your computer. This can install the necessary codecs. (And, of course, make sure you have the latest version of Quicktime, per the program's requirements.)
    Most likely the cam shoots in a proprietary MP4 codec. So starting a new project and setting it up for Flip cam video might also activate the necessary codecs.
    If it still won't go, then version may not have the ability to interface with this camcorder's footage.

  • Creative live cam voice help please

    Help please,
    We are using the "live cam voice" model, with our computer (Vista 32bit), that appears to work OK, but after a few minutes we get the BSOD! We have tried un installing and re-installing drivers without any effect.Has anyone had this problem and if so how did you fix it.
    Regards,
    Arthur

    Thanks for your response. I have tried 3 ports so far, all with the same outcome. One of my sons had it happen to him on another computer (XP SP2) using this webcam . As to programmes open at the same time, I am not computer literate and have no idea what programmes were running on each occasion.We use the webcam for Skype and apart from that I may also have IE open and perhaps Outlook Express. Over and above those CS4 sometimes.
    If I cannot resolve this, can any one suggest another webcam please.
    Regards,
    Arthur

  • I downloaded an upgrade to my adobe reader today, and ever since my search engine has switched to yahoo and wont change back to google. I have a macbook pro, help please? Does anyone know how I can change this back? I have tried through my settings but it

    I downloaded an upgrade to my adobe reader today, and ever since my search engine has switched to yahoo and wont change back to google. I have a macbook pro, help please? Does anyone know how I can change this back? I have tried through my settings but it doesnt work

    Hi Timia,
    If you are using Safari as a web browser :-
    Open Safari, go to Safari menu > Preferences > General, and put Google as the homepage. Then, choose Google as your default search engine.
    If you are using Google Chrome as the web browser :-
      Open Google Chrome.
      In the top right corner of the page, click the Chrome menu Chrome menu > Settings.
      In the "Search" section, select Google from the drop-down menu.
    Let me know if you still experience any issue.
    Regards,
    Aadesh

  • I have just tried to connect my Mac book pro to an LG Plasma TV via an iWires Mini DisplayPort to HDMI cable. All I get on my TV is the Mac wallpaper and nothing else. I am missing something really silly, could anyone help please.

    I have just tried to connect my Mac book pro to an LG Plasma TV via an iWires Mini DisplayPort to HDMI cable. All I get on my TV is the Mac wallpaper and nothing else. I am missing something really silly, could anyone help please.

    Hi there. I also bought an iWires mini Display port to HDMI cable and have an LG LED/LCD TV. I plugged it in to my MB Pro and followed the very small writing that came in the package and got both audio and video going. You need to change the audio settings from within System Preferences on your Mac to select your TV as the audio output.
    My concern is the data latency - do you experience a delay between moving your mouse on the MBPro and the TV displaying the movement? It is only a fraction of a second, but certainly enough to be annoying, especially in a cable as expensive as the iWire.

  • HT4059 Being new to iBook publishing I need to know if stats are available to determine how many times my iBook has been downloaded. Can anyone help please? Mr Ignorant

    Being new to iBook publishing I need to know if stats are available to determine how many times my iBook has been downloaded. Can anyone help please? I need to persuade someone that this really is worthwhile. Mr Ignorant.

    The only people who can possibly assist you with this is Apple Customer Relations, call your local Apple contact number and ask for Customer Relations then explain your situation clearly and politely (be firm but don't rant).
    You might want to investiage what the local laws are regarding defective goods and 'fit for use' definitions on warranties etc. Consumer Protection can be a useful tool to use or bargain with if needed ...

  • Can't Left Click in Flash Player Settings Panel - HELP PLEASE

    Hi and thanks for taking the time to read this. Believe me it is a fraction of the time I have wasted trying to resolve this issue.
    Basic problem is:
    I am trying to stream to Ustream but since downloading AFP11 for my Windows PC when I open the Flash Player Settings panel i can't left click on anything. It is set to deny but I can't click allow, or close or any of the icons.
    Right click does work.
    I have followed countless instructions in other forums from other posts that have encountered the problem on Mac and older versions of AFP but as yet none of the solutions have proven succesul.
    I have tried all of the following but nothing has resolved the problem.
    1. Uninstall and reinstall Adobe Flash Player (although this is impossible using Google Chrome) and restart computer.
    2. Unistall flash and install older version. (made no difference on Google Chrome and on IE8 had no flash whatsoever).
    5. Uninstall older AFP and reinstall AFP11.
    4. Uninstall Google Chrome and restart computer.
    5. Uninstall QuickTime (I got this off http://www.techsupportforum.com/forums/f10/flash-player-not-working-properly-please-help-1 61552.html) and restart computer
    6. Last resort use keyboard shortcuts such as tab, enter and ctrl+arrows. This either didn't highlight the panel at all or if it did I still couln't select allow, or close the panel itself so was no help either.
    So now I'm back to square one.
    Now here's a really bizarre thing... I am using a shared laptop computer and if I use my colleagues profile where she hasn't updated her AFP to Adobe Flash Player 11 the settings panel is responding just fine. IT'S THE SAME PC!
    I know I am alone with this problem but someone out there has an answer. If you can help please let me know how to fix this problem where I can't left click in the Adobe Flash Player settings panel.and I will be eternily grateful.
    many thanks
    nik

    OK the amount I hate myself right now is more than a fat guy's self loathing for raiding the fridge at 2am for Pizza but less than an armed robber who's accidentally shot a pregnant woman in the stomach during a shootout. but not much less.
    So after I had miraculously got the Flash Player Setting Panel to work again, (after deleting QuickTime and leaving the window open for abut an hour it just started working again) I then got enticed into downloading the ustream producer software.
    While downloading it informed me that it would only work with QuickTime.
    Stupidly and Optimistically hoping it would remove the need to use flash player altogether I downloaded and installed both.
    I then discovered to my horror that Ustream producer is not a patch on Vidbalster and that it was not capable of delivering the same level of broadcast.
    I then opened the flash player settings panel on ustream and... the problem has returned!
    This means I am 99% sure that QuickTime IS the cause of the problem so I have uninstalled QT off the PC. I have also uninstalled Ustream Producer.
    The thing is though, now no matter how many times I restart, or uninstall and reinstall Adobe, or Google Chrome, I am once again UNABLE TO LEFT CLICK IN THE FLASH PLAYER SETTINGS PANEL. AAAARRRRRGGGGHHHH!!!!
    What did I do? I fixed it and  f***ing broke it again!
    Now it properly will not come back to life! the problem is not solved and i urgently need help.
    Why does Adobe Flash Player Settings Panel and Apple QuickTime hate each other so much that they've got to ruin my life?
    Help forum PLEASE!
    Regards,
    nik

  • HP Photosmart Premium c309g-m does not have a mirror image print option-help please

    After twice being dropped from HP chat support I have laned in this forum to get some help please.
    I need to be able to print mirror images from my printer and it simply is not a option-it's not a matter of turning on the
    option, it is not there at all.
    Thanks
    Donna

    Check the iron-on packaging for ink specs.   Make sure to use HP iron-on paper.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • My ipod is disabled and I cannot connect to restore! help please

    Hi. My daughters iPod has been disabled and I've tried to do the reset and restore via itunes but it gets to the screen showing the plug into iTunes and then iTunes should pick up the device automatically and give me the option to restore... But iTunes doesn't pick it up?
    Help please!!!

    Hi lesleyfromtas,
    If you are getting the icon screen directing you to connect the iPod Touch to iTunes but iTunes isn't recognizing the iPod, you may find the troubleshooting steps outlined in the following article helpful:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Regards,
    - Brenden

  • For some reason I cannot download and install the latest version of iTunes. 11.0.2. Could you help please? Each time I try, I get a command box saying 'The feature you are trying to download is on a network resource that is unavailable. Click Ok to try ag

    For some reason I cannot download and install the latest version of iTunes. 11.0.2. Could you help please? Each time I try, I get a command box saying 'The feature you are trying to download is on a network resource that is unavailable. Click Ok to try again or enter an alternate path to a folder containing the installation package iTunes.ms in the box below.
    Please help!
    Many thanks in advance
    Ben Bentley
    West Midlands
    UK

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

Maybe you are looking for

  • Can I transfer music from my Microsoft Zune to my iTunes Account, and Ultimately my 7th Gen. iPod Nano

    I would be grateful for some feedback! 

  • BW authorizations for standard development

    For a training workshop, I need to define some authorizations for the trainees. They shouldn't be allowed to do whatever they want on the BW and R/3 systems. So I can't give them the SAP_ALL profile! On the source system, the users would be allowed t

  • Illustrator - Erase a straight line (Mac not windows).

    Illustrator - I am trying to tweak a logo so it has smooth edges, I am familiar with using the SHIFT key from a starting point and end point of  a eraser segment within Photoshop, however is there anything easy like this in Illustrator with using a m

  • EXIT_SAPLF050_005

    Hi Experts, I am using EXIT_SAPLF050_005 to post accounting document . As per standards code is concerned ,3 documents are created .  1. Accounting Doc      2 . Controlling DOc  3.  Profitab. Analysis . This is happening perfectly  . this is costing

  • Email Reg Expression

    dear all : i am using ADF 10 with WLS 11 i am using the following regular expression for email account : <af:validateRegExp pattern="^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$" id="nr3hj" messageDetailNoMatch="#{viewBundle.PleaseInsertValidEma