confusing question of javac

Hi all

I have 2 files: A.java and B.java in test/foo/xcom with content as follows:
A.Java:
Xcom package;
public class A {}

B.Java
Xcom package;
public class B extends a {}

Now, I use javac to compile.
* 1st test: set a directory current for "xcom" then invoke:
javac A.java-> build successfully created named. Class
javac B.java-> error (cannot find symbol: class A)

* 2nd trial: current to 'test' and then call directory
javac - cp. Xcom / B.java-> build successfully created B.class

My question is: Why can't build B.java but it is managed with A.java 1st try? (I use java 6)
Thanks in advance.

user1090710 wrote:
Hi all

I have 2 files: A.java and B.java in test/foo/xcom with content as follows:
A.Java:
Xcom package;
public class A {}

B.Java
Xcom package;
public class B extends a {}

Now, I use javac to compile.
* 1st test: set a directory current for "xcom" then invoke:
javac A.java--> created successfully, named build. Class
javac B.java--> error (cannot find symbol: class A)

To compile the class A, you don't need class b, so it compiles properly.
There need to compile class B, class A, and he doesn't know where to find it.
Since you have not specified any classpath. (current directory) is assumed.
He tries to find test/xcom/./xcom/A.class (if already compiled) or test/xcom/./xcom/A.java (to compile with B.java), but he finds none.

Therefore, simply specify the good "-cp.." and it will work.

Published by: baftos on March 20, 2011 11:10

Tags: Java

Similar Questions

  • Confusion/Questions about Java

    Running Windows XP Pro, SP2

    I just downloaded and installed the latest version of Java (update version 6, 15).

    1. when I look under Program Files / Java, I found 3 files:

    JRE 1.5.0 dated 09/11/2005

    JRE 1.6.0_0, dated 2007-06-21

    JRE 6, date dated 02/09/2009 (obviously the last download)

    2. when I look under control panel JAVA, under the 'Java' tab, view and manage versions of the Java runtime and the settings for Java applications and applets, I find the 3 versions (above) listed and enabled.

    3. when I look under the Control Panel / Add/Remove Programs, I find 2 entries for Java:

    (TM) 6 Update 15 (of course the update was installed just)

    Java (TM) SE Runtime Environment 6 Update 1

    My questions are:

    1 are all these versions/files necessary?

    2. shouldn't the last update replace the previous versions?

    3. What can I delete (i.e., what is not necessary), and how can I remove them?  It seems to me that lists of Java in Add/Remove programs are for the most recent version, which probably I shouldn't remove. I have to change the registry to successfully delete older versions?

    4. should I just turn off the 2 older versions in the Java Control Panel and you don't have to remove them (although I prefer to free up additional disk space if they are not required)?

    I could use some advice warned of your people.

    Thank you.

    First of all, I want to inform that you uninstall Java and manually remove the Java files once you did if they still exist.

    In the same sense, re - install Java (latest Version) and make sure that it works. Use the tester of Java on the Java site to do this. (Google "Java tester").

    Then try to fill one of the actions that you were trying to front.

    If it's still a question please let me know and we can discuss some of the resolutions more advanced with the registry changes.

  • Java card confusing questions! Java Card architecture, advantage!

    ISSUE - 1
    As I know about architecture of any application is -
                    //normal java software                          java card                                  java card
                      //  1                                               2                                      3
    1-            application program                        host application                           host application
    2-                     JVM                                   Applets                                       Applets 
    3-              operating system                JCRE(which contain all classes, JVM ....)                 JCRE(act as a O.S too)
    4                    hardware                              Operating system                                 H/W
    5                                                                        hardware
    What you think about case 2 is right? or 3!
    I think that - case 3 is right!
    I studied from several sources, the JCRE is the complete package - it behaves like an operating system and use the functionality of the component it contains. I also think that if I buy a java from any vendor card, he would have JCRE inside (means everthing inside), I only need to develop the applet according to my requirement and install it by card setup


    QUESTION 2 - What is the advantage of java card. ?
    // I think.
    as i read out , i got the line that it is platform independent and support multiple application. applicaton point of
     view , I am agree but how it is platfrom independent. if we use java card for smart card development, then 
     i will purchase Java card from differnt vendor , all will provide me card with supported jcre inside it, so why
     this is advantage here?
    // in case of window based application , it really make sense  because if i will make any window application with java
    // i can run it in windows , linux , unix and most of os flavours, here i can see the beauty of java language.
     Clear me this and add some other java card advantages, which make java card good
    question 3-
    Now I am capaple to make simple applets, so I want to check the entire java card process atleast once before 
    going in deep of something, I am thinking to implement prepaid card concept , i made it applet for it ,it will 
    contain a page with 2 text box ( 1- for recharge 2- for money deduction ) and two button , with button click i 
    want to select the applet and want to pass the apdu.
     ( a) how i can make host window application ? (i think awt will work for me? , *
    i never make any java window application yet) * 
     ( b) still i dont have any java card , i want to make it by using simulator, is it possible?
      (c) in this scenario what framework i need to study Ex. Import javacard.framework.* for making
     applet or from where i need to start.
    With regard to:
    Rohit pathak

    Published by: rohit pathak on 9 February 2012 22:10

    Hello

    so why should I use applet concept here OR WE can't USE APPLET CONCEPT THERE! We will go to c code to implement...

    Yes, you can also write cmdlets in C. But in this case you also need mechanism by you that you will be able to convert your code in the .cap file and install it on the map.

    so I think that a card that does contain no JCRE, should not be called a java card. RIGHT?

    Yes, he called card native.

    or if a card is a java card must contain jcre and I need to write only applet here. RIGHT?

    Any card that can be programmed in a java programming language is called a java card. And to execute/interpret java byte code on the card, you will need something like JCRE/JVM on it.

    s This also possible case that a map is a java card, which contains no JCRE (jcre also contain JVM) java applet concept but is there? I think that it is impossible

    Already answered above.

    a card that contains your own OS (written in c) does not support the concept of the applet, here you must omit concept applet and should just your own program to manage the apdu. right?

    Either way, applet is also a program and when card java, it supports only a subset of the standard programming lauguage.
    Yes, you can name what you want :)

    Java card cocept is costly because here you use other OS and OS MEANS EVERYTHING, RIGHT so U NEED HIGH pay to OTHERS a (OWNER JAVA)?

    Are the manufacturer must also bear the cost of the license also. But in my view, it is inexpensive because of its more services and features.

    Concerning
    Umer

  • Can I use Airplay with an Airport Express station and a MacBook Air without going through a WAN connection?

    I want to set up my MacBook Air and an Airport Express so I can use iTunes and AirPlay to connect wireless to the AirPort Express Terminal and connected powered speakers to listen to the music in my iTunes library. Is this possible? I don't want to connect to an existing wireless network to do this. I want that this configuration to work wherever I am regardless of the availability of an existing WiFi network. I want a direct wireless connection between the MacBook Air and the Airport Express. Can anyone help with this?

    Thanks for your help in a confusing question.

    Yes, it will work.

    You must configure the Express in router mode... the EXTENDED network of the give a static IP address and ignore the problems. You will get several questions... because the network is internet-facing. They can all be ignored... This is how it is.

    You can also use a static IP configuration. I use this on a TC, but the same configuration on an Express might work better than router. It can be a delicate touch of the installation. So after some screenshots if you are having problems.

    https://discussions.Apple.com/message/25135547?ac_cid=tw123456#

  • Satellite A200-193 - installing an extra HARD drive

    Hello

    I have a Satellite A200-193 and I would like to install one additional go 160 HARD drive into the free location.
    The problem is that there is no SATA connector to this place (switch on the motherboard, not more).
    I know there are computer A200 laptop with a second HDD and my question is "if I go into an official TOSHIBA Service Center, it is possible to install a SATA connector in this free site, this is to allow the installation of additional HARD drive?

    If someone could help me on this point, it would be great.

    Thank you.

    Hi Mathieu

    I see that you are a bit confused ;)
    As you known t n, there are probably different Satellite A200 series a series helps the second HARD drive upgrade and some A200 series cannot be upgraded
    But the A200 series was equipped with the same laptop covers

    This means that you will find the second drive HARD on all mobile A200 Bay but the drive HARD (SATA) connectors don t exist on each series.
    It seems that your laptop cannot be upgraded with the second HARD disk because of the second missing HARD drive interface.

    I hope I can clarify this confusing question ;)

    Good bye

  • Satellite A200 - 15l HDD not no projection in the start menu

    Hello everyone, I have a confusing question, on which I would like to get feedback...

    I recently had to change the video cable in this model, nice simple job without having to extract the whole motherboard. However later, the system is unable to display HARD drive of choice of start menu and will not boot to the HARD drive.

    The disc shows perfectly fine in the bios and is fully accessible on another computer.

    What is confusing to me, is that the work had nothing to do with the part of the Board HARD disk, the only interaction I had with her was to remove the disk then plug it in again later. My first thought was maybe the joint on the SATA connection was broken, but then if that were the case it wouldn't show the car brand and model in the Bios?

    Any thoughts would be greatly appreciated :)

    > My first thought was maybe the joint on the SATA connection had become broken, but if that were the case, that it does not show the drive make and model in the Bios?

    The HARD drive is on the first page of the BIOS with details such as the name and size of the HARD drive?
    If so, it means that BIOS correctly recognizes the HARD disk.

    In this case I would try to turn on the unit and press F12
    Now the start menu should appear on the display containing all bootable devices
    The HARD drive is listed here?

  • That is the app use to lock my screen/mac instantly.

    There are times where I have to leave my house with my mac on. so in this case, I used to use an app called sleepless. It was a great app it prevents my mac to sleep automatically in addition, it provides a one-click screen lock service. It worked perfectly until I upgraded to the new OSX (El Capitan). so suggestions that either the app that I use now?

    I think your confusing question.

    skthq wrote:

    It prevents my mac to sleep automatically...

    It seems that 'Sleep' provides exactly the functionality you're looking for!  It is immediate, and, if you wish, it can lock your screen immediately.  It allows to "leave the House with my mac on."

    What exactly are you trying to do?  (Not to say how you try to do so, simply enter what you are trying to accomplish).

  • HP all-in-one wireless with 10 5525 windows insider

    Hello world

    I work with the 5525 printer about 3 years.

    also with wifi wireless, andalso with windows 10.

    all of this until last May.

    in may, I was to format and install windows 10 insider and fromthis point, thast all I tried to solve the problem, it's not helping me. and the problem is:

    that, since may, I can't work with this printer, wireless, with wifi.

    I can to work very well with a usb cable, but not with the wireless.

    Windows don't simply do not see and not detected my impression when I try to work wireless.

    is not see the printer. not even in offline mode.

    in the list of wifi, I can see the HP-printing-da-Office-5525, but in the unit and the printer - no.

    I also tried to install all the latest drivers from hp and for windows 10 - without resluts.

    also, I tried to install the latest windows build - 14390, but this does not help me.

    I think its something with the drivers.

    can someone help me?

    Thank you very much!

    Well, first thing to do is to disable wireless live, because you don't need and it's confusing questions. To disable this feature:

    1. On the printer, click on the wireless icon that looks like a radio tower.
    2. Click settings.
    3. Click on wireless Direct.
    4. Click turn OFF.

    Now, to connect the printer to your wireless network:

    1. From the main screen, click on the wireless icon.
    2. Click settings.
    3. Click Wireless Setup Wizard.

    Please let me know the results after following the above. If you are able to connect to the wireless printer, click on accept solution. If you appreciate my help, please click on the thumbs up icon. The two icons are below this post.

  • the property attribute

    Hi all:

    I am a new learner of teststand, and I confused questions! There are two:

    1: property attributes

    TS help file tells that we can create a property attribute, such as step or sequence; and I don't know under what conditions we can use it,

    Show me the examples may be better; I was confused on this subject for a long time.

    2: the attribute named "TestStand Hyperlink"

    I find a sample for PDM and the attribute named "TestStand Hyperlink", and I don't know where it set?

    Which version of TS are you using?

    It seems to me that you are not aware of how to examine the attributes of propertyobjects.

    Research in the example, that you are referring to, the Locals.WebAddress, the Locals.ImagePath and the Locals.HTMLFilePath have an attribute of type container named "TestStand. You can check this on your own by right clicking on the variable (PropertyObject!) and select Advanced > change attributes...

    For implementation stuff, I've not found much too much. It seems to me that this is part of the modelsupport2.dll which allows to view the data in TS and then creates the string hyper link on the HTML page. Please note that to do this, the PropertyObject with attributes must be "AdditionalResults" of the stage. I fear that only the 'Hyperlink' attribute is implemented in the modelsupport2.dll.

    Norbert

  • R50E does not start after upgrading memory

    I tried to upgrade this laptop from the factory of 512 MB to 1.5 GB. I got a Kingston 1 GB DDR - 333 SO-DIMM, but after I installed it, the laptop does not turn. Only the power led is lit.

    I don't know why this happened, because all tests indicate that it should work.

    1. the new stick is ok. I tested it in another laptop and it worked. I also cleaned the contacts with isopropyl alcohol.

    2. the memory locations are ok. The old memory works in each slot.

    3. I tried to install the new one stick in a slot and it did not work.

    4. This update is officially supported by record of IBM and BIOS is up to date (v2.1, December 2006).

    Unless I'm missing something there is a confusing question. Unfortunately, I don't have an another 1 GB DIMM to test with.

    yehuda1 wrote:

    TBut I don't think it's a matter of density. something fundamentally wrong with this system. I just discovered that I can not upgrade the memory somehow, even not with a stick of 256 MB. The system starts only with the current key.

    OK... This is not good, but I have to tell you that...

    I guess it's time to throw the boy part of retirement and move to a new machine...

    Good luck.

  • Help! -Acer Aspire all-in-one touch screen after upgrade Windows 8 Pro

    Hi all!

    This is a rather confusing questions and about * me off no end!  I know that some of you may have encountered this already and could have a potential solution?

    I have an Acer Aspire all-in-one, AZ5101 (Aspire Z5101), with 4 GB of RAM, etc..

    Since the Developer Preview of Windows 8 came out, I've been running Windows 8 perfectly.  I completely uninstalled (each time itself) and run the following:

    Windows 8 Developer Preview, 64-bit

    Windows 8 Preview of consumer, 64-bit

    Windows 8 Preview, 64-bit version

    In any case, on this PC worked perfectly - y INCLUSIVE of the TOUCH SCREEN.  I never had a problem.

    So far so good.  Then, they finally released updates Windows 8 Pro official licensed by download.  I bought the upgrade and downloaded.  Just like in * ALL * other cases, upgrade, I chose "keep nothing" of the old system (I never really got all the important data on here), and do the upgrade itself.

    After the upgrade was complete, and ALL Windows 8 Pro updates have been applied by Windows update, I have a system where the screen is clear and precise, everything works, and all devices in Device Manager, show the Greens well, it works fine - NO ERRORS.  HOWEVER - NO CONTACT!  No touch no screen function at all.  The screen now has this time as a standard monitor.

    I tried the driver Idéacom - no luck.  Anyone know (please? LOL) how to get the touch screen to work again?  Thank you very much!  I really appreciate any help you can give.  Microsoft technical support had NO idea and no reply emails from Acer! Laughing out loud

    Thanks again,

    Mike

    [edited to conform to the guidelines]

    Hello Mike

    I sent the pilot. Please test and advise.

    Kind regards

    FReeZA

  • is - this will install Windows xp or 7 on a pc which has vista

    my pc had a virur and he waw restored to the status of the plant.  the operating system is vista, but I want to install microsoft word, is it possible to do so.

    Hello

    you have a very confusing question

    XP and Windows 7 operating systems are

    Word is a program that is part of the desktop Suite

    __________________________________________________________

    to see if you can install check XP or Windows 7 with your computer manufacturer and see if they have XP or Windows 7 drivers available for your model computer

    If they do, it is up to you to buy XP or Windows 7

    and reading this on Windows 7

    Windows 7 upgrade advisor

    http://www.Microsoft.com/downloads/en/details.aspx?FamilyId=1b544e90-7659-4BD9-9e51-2497c146af15

    Windows 7 system requirements

    http://Windows.Microsoft.com/en-us/Windows7/products/system-requirements

    Windows 7 upgrade paths

    http://TechNet.Microsoft.com/en-us/library/dd772579 (WS.10) .aspx

    ___________________________________________________________

    in regards to the word, will need it to buy

    It does not free

    read this:

    link below is to the store of microsft office versions and prices

    http://store.Microsoft.com/Microsoft/Office/category/2

    You may also be interested to read everything and downloaded the free free office suite of applications office at the link below

    http://www.OpenOffice.org/

  • How to circumvent the "Assistant" secpol.msc and configure State IPsec (esp, spi, enc, auth-trunc) and political (src, dst, in, on, fwd) directly as in the ip-xfrm Linux command?

    Right off the bat, the wizard tells me that I can't use a multicast address, when it is the only destination I am interested in security.  Here is exactly what I want to do - no more, no less (although I can use the mode of transport instead of tunnel at some point):

    #! / bin/bash

    Echo 2 >/proc/sys/net/ipv4/conf/eth0/force_igmp_version

    # NOTE: To avoid the possibility of breaking IGMPv2 snooping, src should ONLY be defined for SHIPPERS, NOT for RECEIVERS!  Otherwise, joins will be compromised by the IPsec encryption and the switch will not detect them.

    IP xfrm State flush; IP political xfrm hunting

    State of xfrm IP add src 10.0.2.15 dst 239.192.1.1 proto esp spi 0x54c1859e tunnel mode reqid 0x67cea4aa auth-trunc hmac\ (sha256\) 128 0xc8a8bf5ce6330699c3500bd8d2637bc1fa26929bab747d5ff2a1c4dddc7ce7ff enc cbc\ (aes\) 0xfdce8eaf81e3da02fa67e07df975c0111ecfa906561e762e5f3e78dfe106498e # aead rfc4106\ (gcm\ (aes\) \) 0x123456789abcdef0baddeed0deadbeeffeedface900df00d0fedcba987654321 128 #Error: duplicate 'ALGO-TYPE': 'aead' is the second value.

    xfrm IP strategy add 10.0.2.15 src 239.192.1.1 dst dir output stat CBC 10.0.2.15 dst 239.192.1.1 proto reqid 0x67cea4aa tunnel mode esp

    xfrm IP policy add 10.0.2.15 src 239.192.1.1 dst dir in src 10.0.2.15 stat dst 239.192.1.1 proto reqid 0x67cea4aa tunnel mode esp

    xfrm IP strategy add 10.0.2.15 src dst 239.192.1.1 dir fwd stat 10.0.2.15 src dst 239.192.1.1 proto reqid 0x67cea4aa esp tunnel mode

    A graphical interface which requires me to work in step by step mode (in particular to implement a relatively simple configuration of the shared key) with no idea of what irrelevant or confusing questions await us doing me no favor.  And while this computer uses Windows 7, the eventual target can use something older or newer.  I want to do is create the portable equivalent of a preferred scenario, no instructions to repeat the time-consuming and confusing.  This approach exist?  (I already checked cygwin and there seems to be no support for the ip packet, and even if there were, it seems not support sudo is.)

    Hello

    Thank you for visiting Microsoft Community and we provide a detailed description of the issue.

    I suggest you to send your request in the TechNet forums to get the problem resolved.

    Please visit the link below to send your query in the TechNet forums:

    https://social.technet.Microsoft.com/forums/en-us/home?category=WindowsServer

    Hope this information is useful. Please come back to write to us if you need more help, we will be happy to help you.

  • Registration of JSON

    Hi all

    I run quite a confusing question. I have some data that I want to record a json format string, it scans very well before I save it, but after save and load, I can't access the object data. The strings appear exactly the same, I'm puzzled. The code is below. Any help would be appreciated!

    The value utf-8 and go figure it works very well. Knew that I had missed something! Thanks a bunch!

  • How to get code signing keys without filling the field "company"?

    When you use RIM "Sensitive APIs" I am aware that I should get the signature keys and was directed to: https://www.blackberry.com/SignedKeys/

    When you enter information for my keys the field "Company" is required.

    This is why I'm a bit confused (questions below):

    * How the company is associated with these keys?
    * What happens if I change companies after obtaining the keys?
    * Is that my current employer, so I work? (ie: McDonald's, Burger King)
    * What happens if I am a student?
    * Can I create a company just to get the keys?
    * What happens if I put unemployment in the area of the company?
    * What happens if I set the self-employed in the field of the company?

    I have a job with a company (which is a good thing these days), but at home and as a software engineer and passionate about mobile I just began to develop blackberry applications and I wanted access to these very important APIs.

    Thank you.

    Carl

    Put independent Consultant or put your name. RIM expects you to work for a sort of cabinet when filling out the information, but if you're a solo developer so it makes sense to be put your name or a counselor, since you are the company of one of these two.

Maybe you are looking for