Problem when working with package???Please, help me!!!

I got 3 .java files from one Java tutorial as follow:
Server.java (in package mygame.server)
Utilities.java (in package mygame.shared)
Client.java (in package mygame.client)
All the above files are placed in "E:\Java Programmes\source"
After compiling, i got correspponding .class files:
Server.class (placed in "E:\Java Programmes\class\mygame\server")
Utilities.class (placed in "E:\Java Programmes\class\mygam\shared")
Clients.class (placed in "E:\Java Programmes\class\mygame\client")
But when i run Server.class which contains main method, i got error as follow:
E:\Java Programmes>java class\mygame\server\Server
Exception in thread "main" java.lang.NoClassDefFoundError: class\mygame\server\S
erver (wrong name: mygame/server/Server)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
That was very puzzled for me. I cannot find out what wrong with my files. Please., any boby, help me!!! I always got this problem when working with package and managing files. Thanls a lot.

java -cp "E:\Java Programmes\class" mygame.server.Server

Similar Messages

  • My factory unlocked iphone 4s mms is not working with tmobile, please help...

    my factory unlocked iphone 4s mms is not working with tmobile, please help...

    Check out this link. It should fix the problem
    http://support.t-mobile.com/thread/17918?tstart=0

  • Nexus 1000V. problem when working with the console VMWare

    I have a problem when working with the console VMWare.
    Sometimes it is impossible to connect any of the hypervisor to the guest OS managed by them.
    I get the message: "Unable connect to the MKS: Host address lookup for server <name of the hypervisor> failed: No such host is known."
    This message always appears in conjunction with the reconfiguration of virtual switch: "Reconfigure vNetwork Distributed Switch .... Initiated by Cisco_Nexus_1000V_ ....."
    Upon completion of the reconfiguration, Communication console, with guest OS is restored, or on its own or after a reboot srv-vc.
    In this time, I do not see any message in Nexus 1000v log.
    What is this?
    Thanks in advance.

    Smells of a DNS issue.  Are you sure your ESX hosts are reachable from your client via DNS hostname?  Try pinging them from a command prompt/terminal.  You may have DNS server issues.
    As a temp fix, edit your [windowspath]/system32/etc/drivers/hosts file and manually add the ESX host name and IP, then re-test.
    Regards,
    Robert

  • Keymapping problem when working with emacs and openbox

    I have an apple keyboard and I had to do some remapping of the keys to make the mod-4 key the first key to the left of the space bar for when working with Emacs.  The below script worked fine when I was using the dwm window manager, but after switching to openbox I have found that instead of swapping keycodes between the option and command keys, only the command key seems to be working since the initial openbox command-space doesn't work when pressing option-space.
    One odd thing I noticed, was on the new setup when I click run `showkey` and press the option and command keys I get 56 and 125 respectively, but these keys don't work at all when inserting them into the below script instead of the 64 and 133.
    I must admit I created the script below by continually tweaking it until it worked so there could be a much better way of doing it.
    //.xmodmap
    ### capslock => ctrl
    xmodmap -e "clear Lock"
    xmodmap -e "add Control = Caps_Lock"
    ### switch alt and command
    xmodmap -e "keycode 64 = Alt_L"
    xmodmap -e "keycode 133 = Meta_L"
    ### remap of mod 4
    xmodmap -e "clear Mod4"
    xmodmap -e "add Mod4 = Super_L"
    ** Update:  The Alt key is not being swapped with the command key, but is not just a duplicate.  So no M-x can be done by both Alt-x and Command-x
    Last edited by iso (2011-02-19 19:21:01)

    java -cp "E:\Java Programmes\class" mygame.server.Server

  • Problem when Working With Combo

    Dear all,
    I am having a problem when i am working with Combobox.At the time of modification of any existing record i am retrieving the value and description of a Combo and doing accordingly.But sometimes it is showing error that Object Reference is not set.
    If i click that combo(one time) then i am not getting any of error.
    Error comming from the line like : strDesac=oCombobox.Selected.Description
    The thing is that this is not selected item ,it it comming automatically.
    How to handle this types of error.
    Waiting for as reply soon.
    Regards
    Sanjay

    But, this is the question! I dont know how to initialize the combobox' first option. Help me, please! I am using the addItem method as follow:
    MakeJCombo ( JComboBox ComboObj) {
    ComboObj.addItem ("option1");
    ComboObj.addItem ("option2");
    ComboObj.addItem ("option3");
    then:
    public void itemStateChange(ItemEvent ie) ...
    Object origem = ie.getSource()...
    if (origem == ComboObj) ...

  • FLASH Player 10.1 NOT WORKING WITH FIREFOX PLEASE HELP!!

    Hello I need help with this problem quickly.  I have had this problem for the last month and it's driving me crazy.
    I am running Firefox 3.6.10 on a 32 bit on Windows Vista I have tried uninstalling and re installing nothing is working.  I have read through many post and still haven't got any luck please Help. 
    Here are some of the things listed on my system32  Macromed flash
    FLASH 10K.OCX
    FLASH INSTALL
    FLASH PLAYER.XPT
    FLASHUTIL10K_ActiveX.dll
    FlashUtil10_ActiveX
    FLASHUTIL10k_Plugin
    NPSWF32.DLL
    PLEASE HELP  THANKS IN ADVANCE

    Hi, Just got my Internet connection back! Without knowing what add ons/plugins/extensions you have in FF, it is difficult
    for me to say what else may be conflicting.
    Other than that, your choices are either Uninstall 3.6.10 and Install a version that wasn't giving you a problem. You could Install the FF beta.
    Mozilla has a list of many extensions that conflict with FF if you want that link to look over. One of the other links has to do with other issues that may be helpful.
    Let me know and I'll post those to you.
    Thanks,
    eidnolb

  • Quicktime only works with iTunes - Please help!!!

    if I have iTunes installed on my computer with the quicktime, quicktime will not work when viewing videos that are sent to me via email or on places like myspace. It is just a white screen with a Q and a ? mark. What is causing this problem? In order to view those videos I have to uninstall quicktime and then to listent to my iTunes I have to reinstall it.

    Ok I've followed countless random post instructions, uninstalled and reinstalled both iTunes and Quicktime multiple times, cleaned the registry, temp files, documents and settings, program files, etc. and Quicktime 7 still crashes. What in the **** is the deal here? I have to believe that this is a problem with a straightforward solution. Quicktime used to work fine. There are only two possible problems here:
    1) Some remnant of an old Quicktime install is screwing me up. This should not be this hard to rectify, there are a finite number of places Quicktime puts files. Is there any folder I haven't checked?
    2) Some odd glitch allowed me to successfully run QT7 before but now, for whatever reason, my setup has changed in some way I'm not noticing and its now no longer working. In this case there still must be some solution since the problem is very specific: Works with directx disabled, doesn't with directx enabled.
    I sincerely appreciate these forums and everyone who takes the time to read them and help users like me. Still, am I missing some place where I can get a solid official answer from Apple on this? I paid for pro, and that doesn't even get me a support email address?

  • Problem while working with packages?

    hi,
    I am new to java.while running the program which is using package i am getting the following error
    *Exception in thread "main" java.lang.NoClassDefFoundError: HelloServlet2 (wrongname: coreservlets/HelloServlet2)
    at java.lang.ClassLoader.defineClass1(Nativ... Method)
    at java.lang.ClassLoader.defineClass(Unknow... Source)
    at java.security.SecureClassLoader.defineCl... Source)
    at java.net.URLClassLoader.defineClass(Unkn... Source)
    at java.net.URLClassLoader.access$100(Unkno... Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivile... method)
    at java.net.URLClassLoader.findClass(Unknow... Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadCla... Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(... Source).*iam using windows xp and iam working with jdk1.5 version.plz any one help me to solv this problem.
    thanks in advance.

    This is the program iam trying to run
    package coreservlets;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    /** Simple servlet for testing the use of packages.
    * <P>
    * Taken from Core Servlets and JavaServer Pages 2nd Edition
    * from Prentice Hall and Sun Microsystems Press,
    * http://www.coreservlets.com/.
    public class HelloServlet2 extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String docType =
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
    "Transitional//EN\">\n";
    out.println(docType +
    "<HTML>\n" +
    "<HEAD><TITLE>Hello (2)</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1>Hello (2)</H1>\n" +
    "</BODY></HTML>");
    I have installed jre1.5 version.and i have specified my class name has coreservlet.HelloServlet in my web.xml.after sending the request sever giving the exception like
    javax.servlet.ServletException: Wrapper cannot find servlet class coreservlet.HelloServlet2 or a class it depends on
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Unknown Source)
    iam using Tomcat 5.5 web server for my web appln.After compiling the above program the coreservlets subdirectory must be created in development directory right,but it is not doing that. plz help me.

  • Problem when working with multiple sequences

    Dears,
    In order to make life easier (I am currently working on a rather long project), I work with multiple sequences, one per chapter.
    My problem: I named one sequence "assembly sequences" in order to add the various sequences. I dropped the sequence no 1, then no 2. All works fine, beside that when playing the sequence no 2, I see two black lines on top and bottom of the screen for the all length of the sequence. Which is not the case when I click on the sequence itself and play it independently.
    Any idea how to solve this ?
    Thanks
    Nic

    Thanks, what happened is that :
    1st sequence is like this : Frame size 720x576 pixels, video rate 25fps, Compressor DV-Pal. And I think it is the one appropriate for me and my country.
    2nd sequence is like this : Frame size 720x480 pixels,
    video rate 29.97 fps, Compressor DV-DVPRO-NTSC.
    I think I should change the second sequence setting, but can I do it after all the work I have done, and continue making a 3rd, 4th and so on ?
    Tx for your precious help,
    Nicolas

  • FLASH 10.1 NOT WORKING WITH FIREFOX PLEASE HELP

    I am trying to load some of my games on fb it loads then the contents fades away and there is a grey box that says movie not loaded. and Adobe FLash 10.  This has been happening for at least a week.  I have being pulling my hair out trying to fix it.  So I need your help. I have read some of the threads and none seems to work.  Here is some info abot my computer
    I am running
    Windows Vista 32bit
    My browser is Firefox 3.6.8 32bit
    Installed is flash 10.182.76  I do see the animation so I know it's installed correctly .  Please help I will greatly appreciate it

    Hi, Just got my Internet connection back! Without knowing what add ons/plugins/extensions you have in FF, it is difficult
    for me to say what else may be conflicting.
    Other than that, your choices are either Uninstall 3.6.10 and Install a version that wasn't giving you a problem. You could Install the FF beta.
    Mozilla has a list of many extensions that conflict with FF if you want that link to look over. One of the other links has to do with other issues that may be helpful.
    Let me know and I'll post those to you.
    Thanks,
    eidnolb

  • Apple Mobile Device Support Problem 7.7 with XP - PLEASE HELP!

    Very frustrating problem...
    I get the following message:
    "A later version of Apple Mobile Device Support is already installed. Installation of this version cannot continue."
    Same thing comes up with Quicktime. This setup prior to this update has worked seamlessly since I bought my 1st gen iPhone. Tried uninstalling both programs and received same error message. I've since deleted every apple reference on the system and cleaned the registry, rebooted several times and still get the error.
    Please help!

    "A later version of Apple Mobile Device Support is already installed. Installation of this version cannot continue."
    Go into your Add/Remove programs control panel, and uninstall "Apple Mobile Device Support".
    If you were able to uninstall Apple Mobile Device Support, restart the PC and try another iTunes install.
    If Add/Remove won't let you uninstall Apple Mobile Device Support, or there no entries the for Apple Mobile Device Support there, or even after apparently successfully uninstalling AMDS, an iTunes install still won't go through (throwing the same message at you), download and install the Windows Installer CleanUp utility:
    Description of the Windows Installer CleanUp Utility
    Now launch Windows Installer CleanUp ("Start > All Programs > Windows Install Clean Up"), find any entries called "Apple Mobile Device Support" in the list of programs in CleanUp, select those entries, and click “remove”.
    Quit out of CleanUp, and restart the PC.
    Does an itunes install go through properly after that?

  • Can a 7232 work with 7100 PLEASE HELP!!!

    I have been having a ton of problems with my 6416 DVRs, after trips from Tech Support and multiple calls I finally ended up receiving a 7232 to replace 1 of the units.  That has helped quite a bit and then the 2nd 6416 continued to lag and pixelize so I finally got Verizon to send me a replacement.  The rep on the phone convinced me that getting a multi-room and set top for the house was the "right" option.  So a week later I receive the 7216 and 7100.  
    Come to find out the 7100 has no storage and the 7216 is only 150GB, whereas the 7232 has 320GB.  
    So my question is....
    Can I just keep the 7232 and the 7100 and will it work?  I have been trying to get it set up but I can't get the 7100 to function properly and tired of spending HOURS on the phone with Verizon trying to explain this mess.    

    LuAnnF wrote:
    I have been having a ton of problems with my 6416 DVRs, after trips from Tech Support and multiple calls I finally ended up receiving a 7232 to replace 1 of the units.  That has helped quite a bit and then the 2nd 6416 continued to lag and pixelize so I finally got Verizon to send me a replacement.  The rep on the phone convinced me that getting a multi-room and set top for the house was the "right" option.  So a week later I receive the 7216 and 7100.  
    Come to find out the 7100 has no storage and the 7216 is only 150GB, whereas the 7232 has 320GB.  
    So my question is....
    Can I just keep the 7232 and the 7100 and will it work?  I have been trying to get it set up but I can't get the 7100 to function properly and tired of spending HOURS on the phone with Verizon trying to explain this mess.    
    The QIP-7232 P2 should have a 500 gig drive, even though it says 32. Now the 7100 should have no issues working with the 7232 in a Multi Room configuration. But remember the 7100 only has pause and continue when viewing from recorded conted that is being played back fron the MRDVR 7232. The 7100 can not pause live content. I would send the 7160 back unless the 7232 is broken. The 7232 is a $40 upgrade if they make you pay for it.

  • Flash player 10 Not working with firefox Please Help

    I have posted here before and for some reason flash player is still not working.  I haven't been able to get on any of my fb games because of this.  When I go to
    play any games it loads the pic then it fades to a white screen, when Ieft click on the mouse it shows a grey box that states Movie not loaded or Adobe flash player 10.
    Here is some of the files from my Macromedia
    FlashInstall
    flashplayer.xpt
    FlashUtil10l_Plugin
    NPSWF32.dll
    FlashUtil10k_ActiveX.dll
    If you have any suggestion please help it would be greatly appreciated.

    I'm not sure if you will receive this, Tonyae, but my ability to reply in
    that thread appears to have been disabled.  It says below that I can reply
    to this email and you will get it so hopefully that's true.
    I don't know how or why, but things are working again for me.  I uninstalled
    / reinstalled Firefox and Flash countless times.  I disabled Java, which
    someone had suggested in another thread.  Nothing was working.  I had
    restarted Firefox after every installation, but all of my attempts were
    futile.  Finally, I restarted my laptop and it worked - I can finally watch
    videos on my computer again.  (I know I should have tried that much earlier
    in the process.) Very relieving to say the least.  I'm sorry you're still
    having trouble because I know how frustrating it was.
    If you receive this, I know I haven't offered much but I would highly
    recommend restarting your computer after every change you make.  Keep
    plugging away and one of them will hopefully work.  Good luck!

  • Problem when working with adobe forms

    hi friends,
    i am new to interactive adobe forms
    i am following the tutorials for learning adobe forms
    when i am working with adobe forms error was occured.
    cannot find PDL type for output device local
    Device type unsuitable for ADS documents
    and i am searching for related documents in sdn
    i had found no. of documents related to this issue but i can't find the proper solution
    i have already installed Adobe Life Cycle Designer.
    can anyone explain me clearly about the issue.
    thanks in advance.
    Regards,
    karunakar

    Check this link (and don't forget to search the forums next time...!)
    Re: Adobe document service error: SOAP Runtime Exception
    Regards,
    Trond

  • Working with files(please help:))

    Hello ,
    i am a beginner in java,
    well, i am trying to write a program which will read data from a text file and output it in another text file. Actualiy i have done that. already:)
    The problem is that the data of the input file need to be sorted in a descending order, my question is: can somebody please help and tell me if i should use arrays and how can i fetch the data to manipulate it..i have the copy of the input file in the output but i can not figure out the sorting:(
    please help
    (refering to a code by a profesor) the code i wrote until now without the sorting (which i guess has to come in the while part)is:
    public static void main(String[] args) throws IOException
    FileReader file1 = new FileReader("data.txt");
    BufferedReader inputFile = new BufferedReader(file1);
    FileWriter file2 = new FileWriter("output.txt");
    PrintWriter outputFile = new PrintWriter(file2);
    String dataLine;
    dataLine = inputFile.readLine();
    while (tdataLine != null)
              outputFile.println(dataLine);
              dataLine = inputFile.readLine();
    thanks
    p.s. the input file looks smth like this:
    995.95
    desktop comp
    180.95
    microwave oven
    254.99
    washing machine
    130.90
    freezer
    25.25
    flash drive

    So it is a file containing sequences of:
      price
      item nameI'd suggest you read 2 lines at a time, and stuff the lines into properties of an object that you design, capable of holding (you guessed it) a price, and an item name.
    Build a collection of such objects, then sort it, then output the sorted collection.
    These are just hints. But surely you're not just looking for someone to just hand you the coded up solution are you?

Maybe you are looking for

  • Records are getting duplicated on presing enter key in table control

    Hi All, I am using table control in module pool program.  The issue is records are getting duplicated on press of enter key. I cannot use sy-ucomm enter and do some validation thing in my code. As the record should get update in int_tab(internal tabl

  • Which is better 4Gb or 8Gb iPhone?

    I bought the 4Gb iPhone and I am having second thoughts about it. I am thinking about exchanging it for the 8Gb. Any suggestions? Macbook   Mac OS X (10.4.10)  

  • I can't make/receive calls on days old iPhone 4.  Just says Call Failed.

    Same thing is happening with my girlfriend's 3Gs. The person being called hears half a ring then phone cuts out. I have all bars but when call fails bars all drop for a moment, then return. I've reset network settings and everything else. What the **

  • WHAT DO I NEED TO IN A DOS LAPTOP ?

    I AM GOING TO BUY  A HP LAPTOP. WHAT IS THE PROCEDURE FOR MAKING THE LAPTOP WORK

  • ETM data in customer master

    Hi experts, In CM, there's ETM data except general data, sales area data & company code data. Suppose CM has three data only: general data, etc. Why does CM have ETM data? What does ETM data mean? What's the usage of it? Pls illustrate it. Thx. Edite