Package Problem

I'm new to Java and am self teaching myself. I have run into a problem that I can't figure out. I have the following code that works fine, however, when I add the package keyword the program does not compile and gives errors. The following code works without any hitches:
public class printMe {
void printThis(String s) {
  System.out.println(s);
class application {
public static void main(String[] args) {
  printMe pm = new printMe();
  pm.printThis("hello");
}Now if I add package to them as follows:
package intro;
public class printMe {
void printThis(String s) {
  System.out.println(s);
package intro;
class application {
public static void main(String[] args) {
  printMe pm = new printMe();
  pm.printThis("hello");
}I get the following error when I compile application
can not find symbol printMe in printMe class. Any help would be appreciated.

Well you're doing something wrong....
When I save this as Application.java
package intro;
public class Application {
public static void main(String[] args) {
  PrintMe pm = new PrintMe();
  pm.printThis("hello");
}and this as PrintMe.java
package intro;
public class PrintMe {
void printThis(String s) {
  System.out.println(s);
}both of those in an intro directory.
Then I go in the directory below and go
javac intro/Application.javait compiles just fine.

Similar Messages

  • TS3074 im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    im can u please help me out this issue im trying to install iTunes  in windows 7 some error showing " windows installer package problem DLL require to complete this installation" this message showing.

    Try the following user tip:
    " ... A DLL required for this installation to complete could not be run ..." error messages when installing iTunes for Windows

  • How to resolve AVCHD package problem in mountain lion

    how to resolve AVCHD package problem in mountain lion

    Thanks, David. I know this workaround. And one more with creating right-click Service. That's why I've used "uncomfortable" instead of "impossible". In my opinion, Apple should leave ability to choose OS's behavior, and I hoped somebody knew where to find it .

  • Apparent SDL package problem

    I installed kdenlive and mlt from community and have a problem with the configuration. A dev on the kdenlive IRC channel said I should ask the mlt devs who in turn said it must be a SDL packaging problem. So I'm here now with this bit:
    #kdenlive
    [19:38] <dust__> need some help getting this program started
    [19:43] <dust__> says it can't find melt or SDL profiles and module
    [19:43] <dust__> but when I run it as root everythings OK
    [19:46] <xzhayon> distro?
    [19:47] <dust__> Arch. I installed both mlt and kdenlive from community repos
    [19:49] <xzhayon> run melt -query consumers 2>&1 | grep sdl
    [19:49] <xzhayon> and show me the results
    [19:49] <dust__> - sdl_image
    [19:51] <dust__> when I run that as su I get this
    [19:51] <dust__> - sdl - sdl_audio - sdl_preview - sdl_still
    [19:53] <xzhayon> as su?
    [19:53] <xzhayon> but that's the output of query consumers
    [19:56] <dust__> just that Im getting different output as su than user
    [19:57] <xzhayon> what's the output of melt -query consumers 2>&1 | grep sdl not run as su?
    [19:57] <dust__> - sdl_image
    [19:58] <xzhayon> that's definitely wrong
    [19:58] <xzhayon> try reinstalling mlt
    [19:58] <dust__> did that at least twice
    [19:59] <dust__> 0.5.10
    [19:59] <dust__> kdenlive 0.7.8
    [20:01] <xzhayon> may i see the pkgbuild for this package?
    [20:03] <dust__> http://repos.archlinux.org/wsvn/community/mlt/repos/community-x86_64/PKGBUILD
    [20:12] <xzhayon> im' sorry but i have no clue on what's happening
    [20:15] <dust__> please tell me what the output above means briefly
    [20:17] <xzhayon> well, that shows the producers and consumers available to melt
    [20:17] <xzhayon> but that's not the expected output
    [20:17] <xzhayon> what you see with "su"
    [20:18] <xzhayon> i what should appear when run as normal user
    [20:18] <xzhayon> while what you see when run as normal user
    [20:18] <xzhayon> is what you should see when querying producers, not consumers
    [20:18] <xzhayon> try asking on [email protected]
    mlt-devel replied as follows:
    Perhaps ask the SDL packager; I doubt the MLT packager will be of much
    help. This appears to be some permission issue with SDL and its access
    to things. Maybe you need to add your account to some groups. Does
    ffplay at the command line work? It too uses SDL. If that does not
    work either, then perhaps 'strace melt -query consumers'. strace is a
    very verbose output, but it might show what it is failing to access.
    any thoughts?

    allan@mugen ~
    > melt -query consumers 2>&1 | grep sdl
    - sdl
    - sdl_audio
    - sdl_preview
    - sdl_still
    Maybe try creating a new user and see if it works for them.

  • Help needed with an AIR language packaging problem

    I have a game that includes resources for the Hebrew language, however the <supportedLanguages/> tag supports only ISO 639-1 languages, and Hebrew is not listed; in fact I got a compiler/packaging error when I tried to use "he".  Currently I am getting a notice in Google play that warns me this game might not be packaged correctly: "You translated the store listing into Hebrew but not the APK."   Is there a way around this problem, perhaps some manual editing of some files somewhere?  I'd like to publish the same app to the Apple app store, I imagine they will be even less lenient there.
    We are using Flash Builder 4.7 and AIR 3.7 on Windows 7 x64 SP1.  Any assistance would be appreciated.

    It can be done for iOS. Check here: http://forums.adobe.com/message/5140906
    Don't know about Android.

  • ITunes 7.0.1 does not install--Windows Installer Package Problem

    I am trying to upgrade from iTunes 6 to the newest version. I downloaded setup and ran it, and it got a bit through installing iTunes before it said, "There is a problem with the Windows Installer Package. A program required for this install to complete could not be run. Contact your support personnel or package vendor."
    I have never had problems installing other programs using Windows Installer. I also never had problems upgrading iTunes until now. There is no info on this specific issue anywhere in the Apple website or on the internet, that I have found. Any ideas?

    okay, let's try getting an itunes 7 installer log to the Apple engineers for a look.
    1. Open a command prompt window. (Start menu -> Run. Type in "cmd". Hit return.)
    2. Drag and drop iTunesSetup.exe onto the window so that the full pathname of the file is at the command line prompt.
    3. Type in a space, then the following line:
    /l*v C:\log.txt
    4. Hit return.
    5. The installer will create a log file:
    C:\log.txt
    Find that file and send it as an attachment to this email address.
    in the email to Roy, be sure to include the following information:
    - A link to the thread on Apple Discussions where the issue is being discussed
    - The username you are using in the thread
    - The version of iTunes you are using or trying to use
    - the version of Windows you are using (mention service packs)
    - A concise description of the issue you are seeing
    - The exact text of the error message you are seeing

  • Dbms_xslprocessor package problems in PL/SQL

    Hi all :)
    I was wondering if anyone has any ideas about this problem I'm having:
    When using the dbms_xslprocessor in PL/SQL, I consistently get dropped connections when trying to either transform a document, or search a document via XPath. So, for instance, if I call dbms_xslprocessor.selectSingleNode('XPATH'), the connection will drop out with the following error (I'm calling a stored procedure here):
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Similar problems happen on XMLType.transform(stylesheet).
    I've only managed to have this happen when transforming or searching documents that are not in the default (i.e., xmlns="") namespace, but I can't get rid of the namespace (too much other code is relying on it being there).
    What's even stranger is that the XSLPROCESSOR package works, but DBMS_XSLPROCESSOR package does not. Unfortunately, the XSLPROCESSOR package doesn't seem to handle namespaces well, and inserts seemingly random namespace declarations in the transformation results (for instance, on the root element, it puts in "xmlns:xmlns='http://www.w3.org/2000/xmlns/'") or redeclares namespaces on nodes that already have that namespace defined for them by their parents. Namespace prefixes, too.
    Does anybody have any ideas as to what this might be?
    Thanks in advance,
    Constantine

    I should also mention that I'm ABSOLUTELY sure that the stylesheets I'm using for transformation are correct as of XSLT ver. 1.0 -- multiple external processors (Xalan and MSXML, specifically) give the correct result on the same stylesheet.

  • Support Package Problem

    Hi Experts,
      While applying the support package of BASIS (KB70012) and ABAP (KA70012) in SAP ECC 6.0.we get the following error.
    <i>The import was stopped, since an error occurred during the phase
    DDIC_ACTIVATION, which the Support Package Manager is unable to resolve
    without your input.
    After you have corrected the cause of the error, continue with the
    import by choosing Support Package -> Import queue from the initial
    screen of the Support Package Manager.
    The following details help you to analyze the problem:
        -   Error in phase: DDIC_ACTIVATION
        -   Reason for error: TP_CANNOT_CONNECT_SYSTEM
        -   Return code: 0230
       -   Error message: Cant create any process
    When I go through the command mode and type tp connect <sid> & tp connect <sid> pf=g:\usr\sap\trans\bin\ TP_DOMAIN_S10.PFL
    It’s give the following error.
    G:\usr\sap\trans>tp connect S10
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    This is tp version 372.04.04 (release 700)
    E-TPSETTINGS could not be opened.
    EXIT
    ERROR: System : Parameter SAPEVTPATH not set. Batch jobs cannot be started.
    Error in TPSETTINGS: transdir not set.
    tp returncode summary:
    TOOLS: Highest return code of single steps was: 0
    ERRORS: Highest tp internal error was: 0208
    tp finished with return code: 208
    meaning:
      error in transportprofil (param missing, unknown,...)
    G:\usr\sap\trans>tp connect S10 pf=G:\usr\sap\trans\bin\TP_DOMAIN_S10.PFL
    sapparam: sapargv( argc, argv) has not been called.
    sapparam(1c): No Profile used.
    sapparam: SAPSYSTEMNAME neither in Profile nor in Commandline
    This is tp version 372.04.04 (release 700)
    Connection to Database of S10 was successful.
    punesrv02\usr\sap\trans\tmp\C071023.S10 for transport: ALL: No such file or di
    rectory
    punesrv02\usr\sap\trans\tmp\SLOG0743.S10.LOC: No such file or directory
    PANIC --> exiting
    tp returncode summary:
    TOOLS: Highest return code of single steps was: 0
    ERRORS: Highest tp internal error was: 0212
    tp finished with return code: 212
    meaning:
      could not access file as supposed (see dev_tp or SLOG0743.S10 for more details
    Please help me.

    Hi Sateesh,
    It seems like your transport management system is not configured properly, Just check your CTS. is it configured properly.
    Check your transport directory too.
    when you imort a support patch it creates a file in this location. this message are co,img that means you transport directory is not configured properly.
    \punesrv02\usr\sap\trans\tmp\C071023.S10 for transport: ALL: No such file or di
    rectory
    punesrv02\usr\sap\trans\tmp\SLOG0743.S10.LOC: No such file or directory
    Regards
    Subhash

  • Flash Builder 4.7 iOS packaging problem

    I get the following error message when compiling my app with air 3.4 with Standard packaging or release build. Interestingly when using fast packaging I don't get any problems.
    Error occurred while packaging the application:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
               at adobe.abc.GlobalOptimizer$InputAbc.readCode(GlobalOptimizer.java:1134 )
               at adobe.abc.GlobalOptimizer$InputAbc.readBody(GlobalOptimizer.java:682)
               at adobe.abc.GlobalOptimizer$InputAbc.readBodies(GlobalOptimizer.java:40 3)
               at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:331)
               at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler .java:533)
               at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:80) Compilation failed while executing : ADT
    I don't have a clue on where to start looking... Tried using an app.xml file from another project that does compile, but still get the same message.
    Any help appreciated!
    /David

    Hi David ,
    I am able to reproduce the issue with project you shared.Thanks for reporting. I have looged a bug to track it.
    Bug ID : http://bugs.adobe.com/jira/browse/FB-33461
    Mean while you can try this workaround:
    1. In the Package settings wizard,click on the the Customize launch button as shown in screenshot.
    2.Click on the Edit Parameter Button.
    3.Choose 'FILE_TO_PACKAGE?' as the name attribute. '?' here means the number which corresponds your swf.
    4.Give bin-debug swf location as the value to the attribute.Choose ok and continue.
    Note:
    This workaround only for testing purpose.
    Let me know if you require more information.
    Thanks,
    Sanjay

  • Deployment Package problems DMS 5.2.1

    All just an FYI for anyone else having issues with a deployment package.
    This is on DMS 5.2.1
    If your presentation references a video file from the Media library that has a space in the Title the deployment does not complete.
    No error - just does not complete.
    It does create the LOCAL --  presentation name  GOTO URL.
    But if you check the deployment/content directory you will see that you are missing assets.
    To fix the problem you need to remove the asset from the presentation.
    Delete from the Media Asset library
    Re-add it withOUT a space.
    Add back to the presentation.
    Re-do the deployment package.
    Then all is good.
    Will try to test later on 5.2.3 but thought I would share this with others!

    [somewhat delayed response]
    The ACNS software will not be corrupted by a power outage, except in the usual situation where you were doing a software upgrade and the power outage occurred right in the middle of the flash write. If this happens, the software will tell you about it, and you can fix it by using the flash-based rescue image or recovery CD. Almost certainly this is not what happened in this case, however.
    What may have happened is that the data in the CFS volume(s) got corrupted due to some bug. ACNS 5.2.1 is pretty old. I would suggest upgrading to the latest 5.3.x build.
    gid

  • Compiling packages problem???

    Thanks for checking this out, noticed there hadn't been a similar compiling question for
    at least 40 pages, so figured I should contribute!!
    I am trying to compile a package class with six other classes added as part of the
    same package and instantiated withing tabbed panes within the first class.
    info
    JDK: j2sdk1.4.0-beta3
    path: path=c:\windows;c:\windows;c:\windows\command\j2sdk1.4.0-beta3\bin
    Folder/directory : c:\Divelog
    javac is accessed by: c:\j2sdk1.4.0-beta3\bin\javac
    package: divelog
    file: DiveLog.java
    -public class DiveLog extends JFrame
    six other files are Welcome.java, Diver.java, Dives.java, Statistics.java, Website.java,
    Resources.java
    -all are started with the package divelog; declaration
    - all are called within a populateTabbedPane() in the DiveLog file and class.
    all .java files can be seen when I enter c:\Divelog>dir
    problem:
    entering c:\j2sdk1.4.0-beta3\bin\javac DiveLog.java
    returns six errors of type : cannot resolve symbol
    symbol: class Welcome
    location: class divelog.Divelog
    new Welcome
    I understand that this is not the way to compile a package so tryed lots of different
    things as suggested by the troubleshooting tutorial, the most effective are
    c:\j2sdk1.4.0-beta3\bin\javac -classpath c:\Divelog.divelog.java
    " \javac -classpath c:\Divelog.divelog
    \javac -classpath c:\Divelog
    all of these pause for about 5 seconds then returns to the c:\Divelog> (as if there
    were no errors)
    enter dir to see if they have been compiled, and there is no .class versions of these
    files.
    entering
    c:\j2sdk1.4.0-beta3\bin\javac -classpath c:\Divelog\ DiveLog.java or \ Divelog or \
    Divelog.DiveLog
    (with the space after the \ ) returns the six error messages above.
    I am positive there is something very simple I am missing, could someone please help
    me out, It would be greatly appreciated, I really like this java programming, but when
    you run into a hurdle like this, It gets very frustrating. Thanks alot in advance!!!

    Thanks alot eric, I spent about 15 hours trying to work that out. Tthat helped alot I have a couple of quick follow up questions
    1. in the classpath \divelog/*.java what does the /*.java do is that the call for the entirity of the divelog
    package.
    2. all of the six sub classes (welcome, Resources, etc) all compiled and are now in the directory of the
    c:\Divelog>
    except that the main class/file DiveLog will not itself, and is not listed as a DiveLog.class,
    there is still only a DiveLog.java even thought the others in the package all have become .class.
    Is there any way I can compile this one file on it's own, or how do I get it to compile into a .class file??
    3. to run the application would I then enter
    c:\Divelog>c:\j2sdk1.4.0-beta3\bin\java -classpath \divelog.?
    Once again, I really appreciate your help, that was great!

  • Package problem when compiling

    Hi,
    I'm new to java. I'm using Win2000 and JDK1.3.1. I set the "c:\jdk1.3.1\bin" in the System's path. There are three java programs with their own package in the directory as follows:
    "pack.java" - under "c:\jdk1.3.1\bin\test", it will call pack1 & pack2.
    "pack1.java" - under "c:\jdk1.3.1\bin\test\sub1"
    "pack2.java" - under "c:\jdk1.3.1\bin\test\sub2"
    It's ok to compile "pack1.java" and "pack2.java" under their directory. But there is the compiling error for the "pack.java" under "c:\jdk1.3.1\bin\test", even though I've put the "import test.sub1.pack1;" and "import test.sub2.pack2;" in the code. The error were as follows:
    - cannot resolve symbol
    - symbol : class pack1
    - location: package sub1
    - import test.sub1.pack1;
    - cannot resolve symbol
    - symbol : class pack2
    - location: package sub2
    - import test.sub2.pack2;
    I'm not sure what the problem is with the package and/or the import statement. Can any experts help me?
    Thanks in advance.
    Hanna

    Hi all gurus,
    Thank you very much for the help!
    After adding the classpath "c:\jdk1.3.1\bin" to the System's setting, I can compile the "pack.java" under the "test" directory with the command "javac -classpath c:\jdk1.3.1\bin c:\jdk1.3.1\bin\test\pack.java". However, when I run "pack" with the command "java -classpath c:\jdk1.3.1\bin c:\jdk1.3.1\bin\test\pack", there is another error appears as follows, although the "pack.class" has been already there:
    - "Exception in thread "main" java.lang.NoClassDefFoundError: c:\jdk1/3/1\bin\test\pack"
    My "pack.java" code is below:
    package test;
    import test.sub1.pack1;
    import test.sub2.pack2;
    class pack{
    public static void main(String[] args){
    System.out.println("Starting pack");
    System.out.println("Instantiate obj of public classes in different packages");
    //Instantiate objects of pack1 and pack2 in different packages.
    new pack1();
    new pack2();
    System.out.println("Ending pack");
    What's wrong with them? Could you please help me on that?
    Thanks again!
    Hanna

  • Java User-defined packages problem!

    Hi everyone,
    I am new to java programming.I am trying to do a small program to see how the user-defined pckages work.I wrote 2 small programs one is Balance.java and TestBalance.java.
    The code for Balance.java is as follows..
    package MyPack;
    public class Balance{
            String name;
            double bal;
            public Balance(String n, double b){
                    name = n;
                    bal = b;
            public void show(){
                    if(bal < 0)
                         System.out.print("--->");
                      System.out.println(name + ": $" + bal);
          }The code for TestBalance.java is as follows..
    import MyPack.*;
    class TestBalance{
            public static void main(String args[]){
                    Balance test = new Balance("Leela",99.88);
                    test.show();
      }These r both in the same directory....I am able to compile Balance.java...but when I try to compile TestBalance.java I am getting the following errors
    TestBalance.java:1: package MyPack does not exist
    import MyPack.Balance;
                  ^
    TestBalance.java:5: cannot resolve symbol
    symbol  : class Balance
    location: class TestBalance
                    Balance test = new Balance("Leela",99.88);
                    ^
    TestBalance.java:5: cannot resolve symbol
    symbol  : class Balance
    location: class TestBalance
                    Balance test = new Balance("Leela",99.88);
                                       ^
    3 errorsI am using j2se1.4 version ....my path is set to bin folder..
    Could someone plz tell me what is the mistake...it would be very helpful for me if someone could plz tell me what the problem is...
    Thanx in advance.

    99% going to work
    i have noticed some of the few thing
    trying to help
    u told that ur both the classes r in same directory right
    ok
    now ur first class has this as first line
    package mypack;//till here its ok only "mypack" should be small case
    now put this same line also in the other class as firat line
    and remove that import statement since both r in same package so no
    need to import it ok
    here's the code
    package mypack;class TestBalance{        public static void main(String args[]){                Balance test = new Balance("Leela",99.88);                test.show();           } }
    now compile it this way
    create a folder call mypack and put this both the classes in that folder
    say its c:\mypack\ur classes
    now in dos prompt
    type this
    set classpath=%classpath%;C:\mypack \
    now u compile ur first class and then second
    Surely this going to work if not tell me the errors u r getting

  • Import package problem

    hi,
    I am trying to import some classes into my java file.The path is as follows:
    "c:\tinyos\tinyos-1.x\tools\java\net\tinyos\mcenter\treetable".I am importing the classes in the treetable package.
    when I write import tinyos.tinyos-1.x.tools.java.net.tinyos.mcenter.treetable,a problem occur because of the folder tinyos-1.x. do you have any idea about this situation? :(
    thanks in advance

    You are right, I cannot use "-" character in a Java identifier. In fact, you exactly point to the problem. The package I want to import is actually net.tinyos.mcenter.treetable. However, I have two similar "net" directories. their exact paths are as follows:
    1. c:/tinyos/cygwin/home/tinyos/tinyos-1.x/tools/java/net
    2. c:/tinyos/cygwin/opt/tinyos-1.x/tools/java/net
    I need to import the classes in the first "net" directory. However, it tries to find the classes in the second path and gives errors. therefore, I need to specify them exactly or somehow distinct them.
    Could you help me?
    thanks..

  • Bluej package problem

    Hi,
    can anyone help im trying to get a pakage to work in bluj compiler but keep getting the error package does not exist
    this is how the import statement is write the other query I have is do where do I put the package as the package I am using is from killer game programming in java?
    import ncsa.j3d.*;

    Pin Head wrote:
    the other query I have is do where do I put the package as the package I am using is from killer game programming in java?You put the library on your classpath, that'll solve your first problem too. Before you ask "how do I do it" go on google and read all you can find about the classpath, it'll save you time in the future.

Maybe you are looking for

  • Safari won't open certain web pages and download/stream speed slow

    I have recently been experiencing problems with viewing certain websites, content on websites, streaming video, and downloading files. Sometimes the website will load but all the images will be blue question marks. I cannot get anything to load on yo

  • How to lose the window bars in Gnome 3?

    I mainly use a amall screened netbook and I'd very much like to get rid of the window bars in Gnome3 as I find they use up too much space and I'd rather use the keyboard to close the open windows and move the windows. I really don't know where to loo

  • Sports Mix? Voice over?

    Quick, perhaps dumb question: I purchased a sports mix from iTunes and the music is great. I'm told that there is supposed to be motivational stuff on the mix(vs. the standard prompts from the nano) but nothing is there but my music? Also, the first

  • Can we manipulate the Show Horizontal Scroll Bar property during runtime?

    Hi i have set the Show Horizontal Scroll bar to true in the property palette during design time but i want to set to false during run-time based on certain conditions. it is possible to set the Show Horizontal Scroll Bar property of the forms window

  • Does jaxrpc with attachments work with Dynamic Proxies?

    I cannot seem to get jaxrpc with attachments to work with a dynamic proxy client. anyone get this to work and if do, can you post an example??? thanks, henry