Can you place packages which need eachother in 1 dir?

Hello I have a question about packages.
I have 3 java programs.
prog1 prog2 prog3.
prog1 needs variables from prog2 and prog3
prog2 needs variables from prog3
I saw some examples with packages and they are all in an other directory. Is it possible to place prog2 and 3 in 1 directory so that prog2 can get the variables needed from prog3?
Now I have
In prog3
package program;
In prog2
import program.prog3
programdir/program
   |                       |
prog1/2        prog3

I saw some examples with packages and they are all in
an other directory. Is it possible to place prog2 and
3 in 1 directory so that prog2 can get the variables
needed from prog3?Let the directory structure reflect the package structure. javac as well as java
have convenient flags for that. Here's an example: your main directories look
like this:c:\java\src
c:\java\classesSuppose you have three .java sources: prog1.java, prog2.java and prog3.java
in the packages pack1, pack1.sub, pack2. The sources must be stored like this:c:\java\src\pack1\prog1.java
c:\java\src\pack1\sub\prog2.java
c:\java\src\pack2\prog3.javachange directory to c:\java\src, and type the following:javac -cp ..\classes -d ..\classes pack1\prog1.java pack1\sub\prog2.java pack2\prog3.javaThis line will compile all three source files in one sweep. Note the '-d ..\classes'
flag. This tells the compiler where to store the .class files. The '-cp ..\classes'
flag tells the compiler where any other .class files can be found.
When the compiler has finished, your .class files will be stored here:c:\java\classes\pack1\prog1.class
c:\java\classes\pack1\sub\prog2.class
c:\java\classes\pack2\progr3.classSuppose the prog1 class contains a main method. You run it like this (you're
still in c:\java\src as the current directory):java -cp ..\classes pack1.prog1Et voila!
kind regards,
Jos

Similar Messages

  • I have an 2007 mac book pro that does not have a place for HDMI cable.  Can you please tell which converter I need?

    I have an 2007 mac book pro that does not have a place for HDMI cable.  Can you please tell which converter I need?

    You will need something such as this:
    http://www.amazon.com/A-Sonic-HDMI-HD15-Male-Cable/dp/B001OLCHJ6
    Ciao.
    Note that this will only transmit video.  If you need sound, the audio output port will have to be tapped.
    Message was edited by: OGELTHORPE

  • Can you tell me which iPhone/iPad mini charging adapter charges more quickly - traveling in Italy. Thanks.

    Can you tell me which iPhone/iPad mini charging adapter charges more quickly?  Traveling in Italy.  Thanks.

    You will need a 12 watt adaptor for the iPad Mini, so use the one that came with it. The phone can be charged from the same adaptor. Charging speed should be the same although everything in Italy runs slower.
    You will need a wall outlet plug adaptor.

  • I am using Iphone 3G and running with ios version 4.2.1 .I am looking for to run whatsup apps.Can you guide me which IOS version should i download wherein,it will support whatsup apps

    I am using Iphone 3G and running with ios version 4.2.1 .I am looking for to run whatsup apps.Can you guide me which IOS version should i download wherein,it will support whatsup apps

    with an iphone 3G the most up to date ios is 4.2.1 so you have a problem because whatsapp requires a higher version.  If you saved an earlier version of whatsapp you could install that otherwise you cannot use the app.  You will need to get a more up to date phone

  • HT4994 HAI CAN YOU TELL ME WHICH SIM IS USED IN THIS IMEI **** AND WHICH COUNTRY

    HAI CAN YOU TELL ME WHICH SIM IS USED IN THIS IMEI **** AND WHICH COUNTRY
    <Edited By Host>

    No. Sorry, no one here can help you.
    The only reliable way to determine this info is to call AppleCare.

  • Hi, can you advise me, which SSD i can instal to my iMac Thanks.       Model Name:          iMac   Model Identifier:          iMac12,2   Processor Name:          Intel Core i5   Processor Speed:          2.7 GHz   Number of Processors:          1   Total

    Hi, can you advise me, which SSD i can instal to my iMac
    Thanks.
      Model Name:          iMac
      Model Identifier:          iMac12,2
      Processor Name:          Intel Core i5
      Processor Speed:          2.7 GHz
      Number of Processors:          1
      Total Number of Cores:          4
      L2 Cache (per Core):          256 KB
      L3 Cache:          6 MB
      Memory:          4 GB

    HI..
    Read here >  Requirements for Mac OS X v10.5
    Your Mac meets the requirements but make sure there's enough free disk space.
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure there's a minimum of 15% free disk space.
    edited by:  cs

  • Hi, can you advise me, which SSD i can instal to my iMac Thanks.    Model Name:     iMac   Model Identifier:     iMac12,2   Processor Name:     Intel Core i5   Processor Speed:     2.7 GHz   Number of Processors:     1   Total Number of Cores:     4   L2

    Hi, can you advise me, which SSD i can instal to my iMac
    Thanks.
      Model Name:          iMac
      Model Identifier:          iMac12,2
      Processor Name:          Intel Core i5
      Processor Speed:          2.7 GHz
      Number of Processors:          1
      Total Number of Cores:          4
      L2 Cache (per Core):          256 KB
      L3 Cache:          6 MB
      Memory:          4 GB

    Hi HarmitClaire,
    Welcome to the Apple Support Communities!
    I understand that your MacBook Air is not charging as expected. In this situation there are troubleshooting steps that I would recommend. Please use the attached article as a resource for steps to help you resolve this situation.
    Mac notebooks: All about batteries - Apple Support
    My battery is not charging
    Confirm the correct wattage AC adapter for the computer. A power adapter rated for a lower wattage than is required for the system may not reliably charge the computer. For assistance identifying the proper adapter, review Intel Based Mac notebooks: Identifying the right power adapter and power cord--US. Additional adapter troubleshooting is available in Troubleshooting MagSafe adapters. If issues persist please reset the SMC.
    Best regards,
    Joe

  • TS1307 I am using mail for emails. It receives fine but it will not send. I am using an o2 account (smtp.o2.co.uk). Is o2 incompatible with mail? if so can you tell me which email application I can use instead? Many thanks Steve

    I am using mail for emails. It receives fine but it will not send. I am using an o2 account (smtp.o2.co.uk). Is o2 incompatible with mail? if so can you tell me which email application I can use instead? Many thanks Steve

    Whilst it may not be your fault I am afraid it appears that your post is on a forum which is not the best for your OS. It will save the time of the unpaid volunteers here, and may resolve your issue faster, if you could examine the list below and see if there is a more appropriate forum to which you could direct your question.
    OS X 10.9 Mavericks
    OS X 10.8 Mountain Lion
    OS X 10.7 Lion
    OS X 10.6 Snow Leopard
    OS X 10.5 Leopard
    OS X 10.4 Tiger
    OS X 10.3 and earlier
    OS 9, OS 8 & System 7
    OS X Technologies
    OS X Server
    iPad
    iPhone
    iPod
    Other

  • HT1277 Can you place a heather on all your outgoing emails?

    Can you place a heather on all your outgoing emails?

    A header!!! Of course.
    I was going to suggest this, but I didn't think that was what the OP had in mind:

  • HT4623 I have an ipad 64GB (first generation) and could not do upgrades on it. What can i do and how can you help? I need to dowload some business applications but requires 6.0 iOS and up but I have 5.1.1. iOS. please help

    I have an ipad 64GB (first generation) and could not do upgrades on it. What can i do and how can you help? I need to dowload some business applications but requires 6.0 iOS and up but I have 5.1.1. iOS. please help

    iOS 5.1.1 is the last version an iPad 1 can run. If you need to run iOS 6 or later, you'll need a newer iPad.
    Regards.

  • Can you place linked files into Photoshop CS4?

    If you place a .psd or .tif file into an InDesign file, you are alerted if any changes are made to that file (as I'm sure most of you know). Is there any way to do this within Photoshop? I have several dozen carpet sample .tif files that are to be used in several hundred "montage" type "carpet sample groups" layered .psd files that will then be saved as images for the web (does that make sense?). Is there any way to do this so that if there's a change in the original .tif file it will automatically change any .psd file in which it's being used? I know the easiest way to do this is in InDesign, but I have two problems: 1) the conversion from InDesign to a web image is laborious, and 2) the person doing the work does not know InDesign at all. I can show him how to use it, but that's a small part of the battle.
    Any suggestions? I'm using CS4 for Windows.
    Thanks,
    Lloyd

    Thanks for your comments. The problem arises because we have to create that intermediate Photoshop step.
    We have, say, a dozen individual carpet swatches that are used to create hundreds of combinations (which are all separate layered .psd files). If one swatch changes (color, for example), then we have to open every .psd file in which that swatch appears and change it (or place the changed one). I'd love to be able to change the original and have it update every layered file in which it appears, just like InDesign does with placed/linked files.
    Maybe there's a plug-in (wishful thinking)?
    Also, I'd really like to have it changed in the web development end of things, but we're working with a company that is (obviously) using templates and we can only give them single images, hence the need to create the intermediate Photoshop files.

  • App-v package which needs Excel + Internet Explorer

    Hi,
    I need to package an application (App-V 4.6) on Windows 2008 which need Internet Explorer and Excel.
    Please advise howto do this. I packaged the application but when starting the Excel plugin it says it can't find the application itself.
    Please advise.
    J.
    Jan Hoedt

    Sequence the application on a machine that has Office on it. Create a shortcut which points to the locally installed Excel. Also create one point to the local IE. When these shortcuts are launched it will launch the users local Excel and IE into the virtual
    environment, allowing them to see the virtual plug-ins.
    If you did this but opened Excel or IE during the sequence, go back and do it again and don't launch them. Or at least make sure that both have been launched before sequencing so that when you launch during  sequencing it's not the first time they have
    been launched on that machine (help avoid first run junk getting captured)
    PLEASE MARK ANY ANSWERS TO HELP OTHERS Blog:
    rorymon.com Twitter: @Rorymon

  • Can you tell me which table do I need join to get proper country name?

    Hi All,
    Hope you understand this but where in the database do we find the link from the table GB to the word GB ? Just to let you know GB stands for Great Britain. What we need is the table name which contains conutry names ie GB ?

    Hi,
    you can use CINF table.
    Try this query :
    select lawwset, * from CINF
    to find out the country code
    Rgds,

  • Wireless novice here...CAn you tell me which product I need to purchase

    Hi we are setting up our home wireless network. My hubby has a PC laptop for work. We just installed a wireless network via Comcast high speed. I was told I need to purchase "airport" for my Mac. Exactly which products do I need to purchase in order to receive a wireless internet connection on my Mac?
    Any assistance is greatly appreciated. Any other tips to make this as effortless as possible are appreciated. I have been trying to estblish a wireless internet connection for months-eyes seem to glaze over when I mention that I have a Mac.
    Thank you,
    imac g5   Mac OS X (10.4.7)   Wireless internet conncection needed
    imac g5   Mac OS X (10.4.7)  

    Exactly which products do I need to purchase in order to receive a wireless internet connection on my Mac?
    Depending on the model of your iMac G5, it is either AirPort Extreme ready or it already has AirPort Extreme built-in.
    Models that are AirPort Extreme ready: M9248LL/A, M9249LL/A & M9250LL/A
    Models with AirPort Extreme built-in (after May 2005): M9843, M9844, M9845, MA063LL/A, & MA064LL/A
    If you have one of the earlier iMac G5 models, checkout the following Apple article on how to install the AirPort Extreme card.

  • Can you place text from a word document using data merge?

    I'm working with a charity that is giving away scholarships/grants. I need to create a ducument that pulls in various application data plus their submitted essay (docx format). I would like to do this via data merge but cannot find any reference if it is possible.
    Please help, I really need to automate as much as possible since this is a side project.
    Kevin

    Data merge only collects info from CSV format - which I expect you would export from Excel. (I think it'll take tab-delimited as well, but that's it.)
    MS Word files can be placed, but Data Merge is not the tool to automate placing of Word-file content. If there is no formatting of their essays, I suspect you could use VBA to cause entire essays to occupy a single cell in Excel. But that would be the only way to use Data Merge to automate import of essays into InDesign.
    Maybe if you tell us more we can give you some more automation suggestions. (I spend a lot of time automating translation workflows, but I still place Word files. All day long, in fact.)
    (edited for spelling)

Maybe you are looking for

  • (Is this  needed) If have prior GB Versions Uninstalled on a new iMac +GB9'

    ?? Hi, I used (prior) a eMac with Ilife V1 and V2 and hence GB 1 and GB 2, along with Jam Pack 1 (Discontinued. Non Genre Jam Pack 1) I bought a new Imac with GB 9' installed and (*this may be a be a very dumb question*) , ? are there items (Virtual

  • Remote Desktop Gateway and WebAccess Deployment - Multiple Logon Prompts

    I'm having a few issues with some multiple logon prompts using "Connect to a remote PC" via RD Web Access. I am able to log onto the RDWeb without a problem. Essentially once I make a connection to my end-device I first receive a logon prompt, I'm au

  • Time machine taking longer to backup?

    Since the recent update to the timemachine software it has been taking about twice as long to complete each hourly backup.  Amy ideas out there? Colin

  • Solution Manager gudie

    Hi We are planning to implement ERP 2005 with the useage types ECC 6.0, EP 7.0, BI and Solution Manager. I am totally new to Solution Manager. Can anyone explain me the purpose of Solution Manager and also if you have any documents regarding Sol. Man

  • Check activation error

    I keep getting am error Check Activation!  message when I try to load a book into Digital Editions 3.0.  My computer shows to be authorized with my Adode ID.  What seems to be problem?