Trying to create and use of a packaged class....

Hi ,
I have created a directory and put there the generated class....
The dir structure is as:
C:\oracle_files\Java\Examples\
                              class_variables
                              common_classes
I have set the classpath to both the two above directories....
The ThreeBedroomHouse class which has been compiled and put into the \common_classes is as follows...:
package common_classes;
public class ThreeBedroomHouse
      /*private class variable*/
The compilation(successful) was done as :
C:\oracle_files\Java\Examples\class_variables>
C:\oracle\product\10.2.0\database10g\jdk\bin\javac -d C:\oracle_files\Java\Examples\common_classes\ ThreeBedroomHouse.java
and the ThreeBedroomHouse.class file was generated in the "C:\oracle_files\Java\Examples\common_classes" directory....
I tried to compile the second .java file , called HomeBuilder -including a main()- with code such as:
import common_classes.*;
public class HomeBuilder
{When i try to compile it....
C:\oracle_files\Java\Examples\class_variables>C:\oracle\product\10.2.0\database10g\jdk\bin\javac HomeBuilder.java
I get the errors....
package common_classes does not exist....
Can you please pinpoint the error....?????
Many thanks ... for your help and info....
Sim

I have succedded in running it.....at last!!!! However , in a manner which is not understandable to me.....
That are the steps i 've taken.....
[pre]C:\oracle_files\Java\Examples\class_variables>set classpath
CLASSPATH=.;C:\oracle_files\Java\Examples
C:\oracle_files\Java\Examples\class_variables>C:\oracle\product\10.2.0\database10g\jdk\bin\javac -d C:\oracle_files\Java\Examples ThreeBedroomHouse.java
C:\oracle_files\Java\Examples\class_variables>C:\oracle\product\10.2.0\database10g\jdk\bin\javac HomeBuilder.java
HomeBuilder.java:28: cannot access ThreeBedroomHouse
bad class file: .\ThreeBedroomHouse.java
file does not contain class ThreeBedroomHouse
Please remove or make sure it appears in the correct subdirectory of the classpath.
ThreeBedroomHouse myHouse=new ThreeBedroomHouse();
*^
1 error
C:\oracle_files\Java\Examples\class_variables>set classpath=C:\oracle_files\Java\Examples
C:\oracle_files\Java\Examples\class_variables>C:\oracle\product\10.2.0\database10g\jdk\bin\javac HomeBuilder.java
C:\oracle_files\Java\Examples\class_variables>java HomeBuilder
Exception in thread "main" java.lang.NoClassDefFoundError: HomeBuilder
C:\oracle_files\Java\Examples\class_variables>set classpath=.,C:\oracle_files\Java\Examples
C:\oracle_files\Java\Examples\class_variables>java HomeBuilder
Exception in thread "main" java.lang.NoClassDefFoundError: HomeBuilder
C:\oracle_files\Java\Examples\class_variables>set classpath=.;C:\oracle_files\Java\Examples
C:\oracle_files\Java\Examples\class_variables>java HomeBuilder
3
3
4
4
C:\oracle_files\Java\Examples\class_variables>The above in bold are the 'critical' points in the whole procedure.....
First of all , i have deleted the ThreeBedroom.class file generated and i have compiled as such
C:\oracle_files\Java\Examples\class_variables>C:\oracle\product\10.2.0\database10g\jdk\bin\javac -d C:\oracle_files\Java\Examples ThreeBedroomHouse.java
Then , i have realized that i have made a mistake at setting the classpath ..... I have seperated the two entries ('.' and <directory path>) with a comma instead of a semicolon ';'.....
But something i cannot understand is......
when i have set the classpath as : CLASSPATH=.;C:\oracle_files\Java\Examples the compilation of the HomeBuilder.java is unsuccessful ....
I have to set the CLASSPATH as CLASSPATH=C:\oracle_files\Java\Examples
without the 'characters' *.;* to have it compiled successfully......
Afterwards... if i try to execute the compiled .class file with the current classpath ... the java exe file produces error again.....
I have to set it at its previous setting in order to run it successfully.....
All this description is shown above......
Can you please explain this 'strange(????) behavior'....?????
Many thanks...
Sim

Similar Messages

  • I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

    I have an ipad mini. From one moment to another a document that was created and used on pages app ( on the ipad mini) does not want to open ( When pressed it states " document cant be opened). How can I make this document open again?
    I have tried back ups and  restoring, resetting, and even updating the pages app. And nothing has worked.

  • How to create and use dynamic queue in JMS

    Plz tell me how to create and use a dynamic queue in jms and can reciever file lookup it as it lookup any server configurred queue(written in the server).

    Hi,
    We can use Azure File services to do this, for more information, please have a look at this article:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx. The Azure File service exposes file shares using the standard SMB 2.1 protocol. Applications running in Azure can now easily share files between
    VMs using standard and familiar file system APIs like ReadFile and WriteFile.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have a MacBook Pro and tried to download and open the torbundle package.

    I have a MacBook Pro and tried to download and open the torbundle package. I get a message that reads "A copy of firefox is already running. Only one copy of firefox can be open at a time."
    1. I do not seem to have firefox anywhere of my computer. Ive been using safari and as far as my computers library is concerned there is no firefox.
    2. I have tried shutting down and restarting.
    3. I tried making a new user account.
    I believe the torbundle package is trying to open itself twice. Has anyone had this problem when trying to use tor on OS X?
    This is getting very frustrating! Help please!

    If you open Activity Monitor do you see a FireFox running? If so delete it.
    Have you tried deleting and redownloading/installing?
    Next:
    How can I get support?
    Your best bet is to first try the following:
    Read through this FAQ.
    Read through the documentation.
    Read through the tor-talk archives and see if your question is already answered.
    Join our irc channel and state the issue and wait for help.
    Send an email to [email protected]
    If all else fails, try contacting us directly.
    If you find your answer, please stick around on the IRC channel or the mailing list to help others who were once in your position.
    From:
    https://www.torproject.org/docs/faq.html.en

  • HT5622 Why does my credit car decline when I'm trying to review my credit card details? I'm trying to creat and finish  my apple login but it keeps saying declined. Does Apple charge credit cards just for registering a credit card??

    Why does my credit car decline when I'm trying to review my credit card details? I'm trying to creat and finish  my apple login but it keeps saying declined. Does Apple charge credit cards just for registering a credit card??

    Just to add to AnaMusic's list:
    Does Apple charge credit cards just for registering a credit card??
    Yes, Apple will validate the credit card, when you are setting up the account information for an Apple ID. The credit card must be valid in the country of the store, that you are trying to buy from. And the card you are using must neither be blocked by the issuer of the card nor by the Apple for store services.
    The error message  you are citing is misleading: The error message could either mean
    that you are using the wrong type of card (Are you using a debit card or a credit card?)
    that the AppeID or the credit card you are using has been blocked for security reasons,
    or that you are encountering a store error, because you are trying to use the iTunes Store or AppStore from a country, where it is not yet supported.

  • I am trying to create worklist using RMCA dunning.Activity assigned is wl01

    Hi,
    I am trying to create worklist using RMCA dunning.Activity assigned is wl01.
    Getting an error during dunning activity run is 'Error determining responsible persons' Please help.
    Jayant

    Jayant:
    I will assume that the settings for that activity use 'Determine responsible agent', and in that case you need to maintain the rules and responsibilties for the workitems so that they can be routed correctly.  You will need to create organization structure as well.
    regards,
    bill.

  • How to create and use mutable array of UInt8

    Hello!
    If I get it right, UInt8 *buffer, buffer - is a pointer to a start of array?
    Then how to create and use mutable array of UInt8 pointers?
    The main target is a creation of the module that will store some byte array requests and will send all of them at the propriate moment.

    I try
    - (void) scheduleRequest:(UInt8 *)request {
    if (!scheduledRequests) scheduledRequests = [[NSMutableArray array] retain];
    [scheduledRequests addObject:request];
    But get warning:"passing argument 1 of 'addObject:' from incompatible pointer type"

  • HOW TO CREATE  and  USE EVENTS IN WORKFLOWS .

    HOW TO CREATE  and  USE EVENTS IN WORKFLOWS with the help of classes.
    What i am doing is..
    open se24
    event tab->event name->parameters
    method tab->method name->event handler->copy parameters
    interface tab->if_workflow->enter
    tell me what else to do step by step
    Another important thing is that HOW to use these class events to trigger the workflows.
    REPLY ASAP
    THXS IN ADVANCE

    Hi,
    Pl. see this blog...
    Raising ABAP OO events for workflow
    Regards,
    JOy.

  • How to Create  and use of Coherence servers in weblogic serevr 11g (10.3.6)?

    how to Create  and use of Coherence servers in weblogic serevr 11g (10.3.6)?

    See the below discussion
    How to create and use Webservice controls using WSDL in weblogic portal10.3
    Thanks,
    Venkat Sarvabatla

  • Can I create and use more than one repository on OVM 2.1.5

    The version of Oracle VM I am using is 2.1.5 .
    I wonder can I create and use more than one repository on OVM 2.1.5. Because I want to install different GOS on different disks.
    I know in Oracle VM 2.2 we can use following commands to realize that.
    a. #/opt/ovs-agent-2.3/utils/repos.py –n /dev/mapper/mpathxp1
    b. #/opt/ovs-agent-2.3/utils/repos.py –r UUID
    c. #/opt/ovs-agent-2.3/utils/repos.py –i
    And other repositories can also be mounted and found under /var/ovs/mount/UUID.
    But in Oracle VM 2.1.5, seems just one repository can be created and mounted. For example:
    At first, I create a repository using mpath1p1:
    a. # mkfs.ocfs2 /dev/mapper/mpath1p1
    b. #/usr/lib/ovs/ovs-makerepo /dev/mapper/mpath1p1 C "cluster root"
    c. I can find the repository has been mounted under /OVS.
    But if I want to use "/usr/lib/ovs/ovs-makerepo /dev/mapper/mpath2p1 C "cluster root" to create another repository, and check the mount status using command "mount", these two disks are all have been mounted under /OVS.
    "# cat /etc/ovs/repositories", only mpath1p1 with UUID was recorded there.
    After reboot, only repository with mpath1p1 was mounted under OVS.
    Can anyone tell me how to use more than one repositories on OVM 2.1.5. Do I have to install all the GOSs on the same disk and repository.
    Thank you very much.

    Now I've known how to create different repository. They will be mounted under /OVS/UUID. Thanks.

  • Re: How do you create and use "common" type classes?

    Hi,
    You have 2 potential solutions in your case :
    1- Sub-class TextNullable class of Framework and add your methods in the
    sub-class.
    This is the way Domain class work. Only Nullable classes are sub-classable.
    This is usefull for Data Dictionary.
    The code will be located in any partition that uses or references the supplier
    plan.
    2- Put your add on code on a specific class and instanciate it in your user
    classes (client or server).
    You could also use interface for a better conception if needed. The code will
    also be in any partition that uses or references the supplier plan where your
    add on class is located.
    If you don't want that code to be on each partition, you could use libraries :
    configure as library the utility plan where is your add-on class.
    You can find an example of the second case (using a QuickSort class,
    GenericArray add-on) with the "QuickSort & List" sample on my personal site
    http://perso.club-internet.fr/dnguyen/
    Hope this helps,
    Daniel Nguyen
    Freelance Forte Consultant
    http://perso.club-internet.fr/dnguyen/
    Robinson, Richard a &eacute;crit:
    I'm relatively new to forte and I'd like to know how can you handle utility
    type classes that you want to use through out your application? Ideally
    what I want is a static class with static methods.
    Let's say that I have a StringUtil class that has a bunch of methods for
    manipulating strings.
    My problem is that we have code that runs on the client and code that runs
    on the server. Both areas could use the StringUtil class, but from what I
    understand, I have to create StringUtil in a plan and then create a server
    object of type StringUtil. The server object will eventually get assigned
    to a partition. That's not good since I really want the server object to
    physically reside at the server end and at the client end. (Actually, I
    don't want a server object, I just want to invoke a static method of a
    static class).
    Any clues on how to solve this problem would be appreciated.
    Also, what is the url at Sage-it that has a summary of all emails that have
    been posted to [email protected]? Perhaps this question has been
    answered previously.
    Thanks in advance
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Richard,
    Your question about "utility classes" brings up a number of issues, all of
    which are important to long-term success with Forte.
    There is no such thing as a static method (method that is associated with a
    class but without an implicit object reference - this/self/me "pointer") in
    TOOL, nor is there such thing as a global method (method not associated
    with a class at all). This is in contrast to C++, which has both, and
    Java, which has static methods, but not global classes. Frequently, Forte
    developers will write code like this:
    result, num : double;
    // get initial value for num....
    tmpDoubleData : DoubleData = new;
    tmpDoubleData.DoubleValue = num;
    result = tmpDoubleData.Sqrt().DoubleValue;
    tmpDoubleData = NIL; // send a hint to the garbage collector
    in places where a C++ programmer would write:
    double result, num;
    // get initial value for num....
    result = Math::Sqrt(num);
    or a Java programmer would write:
    double result, num;
    // get initial value for num....
    result = Math.sqrt(num);
    The result of this is that you end up allocating an extra object now and
    then. In practice, this is not a big deal memory-wise. If you have a
    server that is getting a lot of hits, or if you are doing some intense
    processing, then you could pre-allocate and reuse the data object. Note
    that optimization has its own issues, so you should start by allocating
    only when you need the object.
    If you are looking for a StringUtil class, then you will want to use an
    instance of TextData or TextNullable. If you are looking to add methods,
    you could subclass from TextNullable, and add methods. Note that you will
    still have to instantiate an object and call methods on that object.
    The next issue you raise is where the object resides. As long as you do
    not have an anchored object, you will always have a copy of an object on a
    partition. If you do not pass the object in a call to another partition,
    the object never leaves. If you pass the object to another partition, then
    the other partition will have its own copy of the object. This means that
    the client and the server will have their own copies, which is the effect
    you are looking for.
    Some developers new to Forte will try to get around the lack of global
    methods in TOOL by creating a user-visible service object and then calling
    methods on it. If you have a general utility, like string handling, this
    is a bad idea, since a service object can reside only on a single
    partition.
    Summary:
    * You may find everything you want in TextData.
    * Unless you anchor the object, the instance will reside where you
    intuitively expect it.
    * To patch over the lack of static methods in TOOL, simply allocate an
    instance when required.
    Feel free to email me if you have more questions on this.
    At the bottom of each message that goes through the mailing list server,
    the address for the list archive is printed:
    http://pinehurst.sageit.com/listarchive/.
    Good Luck,
    CSB
    -----Original Message-----
    From: Robinson, Richard
    Sent: Tuesday, March 02, 1999 5:44 PM
    To: '[email protected]'
    Subject: How do you create and use "common" type classes?
    I'm relatively new to forte and I'd like to know how can you handle utility
    type classes that you want to use through out your application? Ideally
    what I want is a static class with static methods.
    Let's say that I have a StringUtil class that has a bunch of methods for
    manipulating strings.
    My problem is that we have code that runs on the client and code that runs
    on the server. Both areas could use the StringUtil class, but from what I
    understand, I have to create StringUtil in a plan and then create a server
    object of type StringUtil. The server object will eventually get assigned
    to a partition. That's not good since I really want the server object to
    physically reside at the server end and at the client end. (Actually, I
    don't want a server object, I just want to invoke a static method of a
    static class).
    Any clues on how to solve this problem would be appreciated.
    Also, what is the url at Sage-it that has a summary of all emails that have
    been posted to [email protected]? Perhaps this question has been
    answered previously.
    Thanks in advance

  • One structure is created and using in 3 queries, i want to modify that stru

    hi gurus,
    one structure is created and using in 3 queries, i want to modify that structure in only one query but it will not effect other two.wat should i do for that?
    thanx in advace,
    i will assign points,
    srinivas.

    Hi srinivas,
       This scenario could be frequently seen in a project. I assume the structure you mentioned is saved as a global structure, then in the query which you want to modify, right click on the structure and choose "Remove Reference". This function copies the global structure to a local one, in which you can change it and the other two won't get affected.
       Hope this helps.
    Regards,
    Aaron

  • SQL08 Need example of creating AND using a Fact (degenerate) dimension

    Can someone post a link to some examples of setting up and using a Fact (degenerate) dimension.  Ive got the SSAS 2008R2 Adventureworks DW project setup and I see a few Fact dimensions in there, but id like some descriptions to go along with this or
    something similar.
    My scenario:
    Orders - attributes include :  Order#, OrderStartDate, SalesPerson, BusinessType, MarketType
    OrderTransactions - attributes include:  OrderKey , TransactionAmount, TransactionType, TransactionDate, AccountKey
    Description:
    Its more or less the typical Order > Order Detail type scenario, with the addition of Orders have some additional attributes.
    So I want to be able to measure on for example:
    Order counts - broken down by BusinessType and MarketType , and then within a date range
    Revenue - which will be totals of transaction amounts, again grouped by BusinessType and MarketType, but also be able to drill down to see the related Order#

    Hi Shiftbit,
    According to your description, you need some examples about create and use degenerate dimensions, right?
    Degenerate dimensions, also called fact dimensions, are standard dimensions that are constructed from attribute columns in fact tables instead of from attribute columns in dimension tables. Here is document that describes how to create and use degenerate
    dimensions step by step, please refer to the links below.
    https://msdn.microsoft.com/en-us/library/ms167409(v=sql.100).aspx
    http://www.jamesserra.com/archive/2011/11/degenerate-dimensions/
    Regards,
    Charlie Liao
    TechNet Community Support

  • How do I create and use a watermark in aperture?

    Hello there!
    How to I create and use a watermark in aperture? do I need to download a 3rd party plugin? Any recommendations?
    Thank you!

    Aperture does not support the creation of watermarks; if you want a watermark image with transparent regions you need an application that can handle alpha channels - Prewiew, Photoshop, Pixelmator, Gimp, just to name a few.
    But once you have a watermark image, you can add it to an image, when you export from Aperture. Add the watermark to one of the Export Presets. You will need to create your watermark in different sizes, so you can add it to each of the export pixel sizes for your images, that you are using.
    Another possibility would be using the BorderFX plugin. This versatile plug-in also supports to add graphic overlays to your images, either when exporting or as an Edit plug-in.  http://www.iborderfx.com/BorderFX

  • How do I create and use a ringtone without syncing and without jailbreaking?

    How do I create and use a ringtone without syncing and without jailbreaking?

    You create ringtones on your computer and sync them to your iphone.
    You can buy ringtones from the ringtones section (at the bottom of the screen when you open itunes) of the itunes app on your iphone.
    There may be apps that will do this - not sure.

Maybe you are looking for