Please help: com.sun.midp.installer.InvalidJadException: Reason = 2

Hello,
Im getting the following error when trying to run a J2ME MIDlet app. (I'm using sun wireless toolkit 2.52):
com.sun.midp.installer.InvalidJadException: Reason = 2
at com.sun.midp.security.Permissions.openPropertiesFile(), bci=100
at com.sun.midp.security.Permissions.readPermissionsTable(), bci=8
at com.sun.midp.security.Permissions.initialized(Permissions.java:1122)
at com.sun.midp.security.Permissions.getUntrustedDomainName(Permissions.java:385)
at com.sun.midp.security.Permissions.forDomain(), bci=141
at com.sun.midp.installer.InternalMIDletSuiteImpl.initSecurityHandler(), bci=14
at com.sun.midp.installer.InternalMIDletSuiteImpl.setTempProperty(), bci=423
at com.sun.midp.main.MIDletSuiteLoader.main(), bci=1011
I'm using windows 7. permission to read the files is set. So what's wrong? Thanks in advance.

Hi,
when i create the project and give class name then folders created are:
bin
lib
src
res
and a properties file project
Now i m placing the .java file in the src folder .
Then when i build..it shows
build Initializing in a small pop-up window and then in toolkit it displays
No sources to compile
Build failed..
in the bin folder teher was onlu manifest and jad file ..no jar file was created ,i thnk thats why it showed " No sources to compile ".
please tell me where to find the .jar file .
or any settings i need to configure?

Similar Messages

  • Com.sun.kvem.midletsuite.InvalidJadException: Reason = 13 error!

    I get this error in WTK2.1 while trying to create package. Even the demos cannot be packaged.
    The exact error is:
    com.sun.kvem.midletsuite.InvalidJadException: Reason = 13
    The file C:\WTK21\apps\photoalbum\bin\MANIFEST.MF is missing the required attribute: MIDlet-Name
    The parameters are correctly set in Settings (the program above is a demo packaged with WTK2.1)
    Any help is appreciated. I use Windows XP.

    strange, check if the manifest looks like this one
    MIDlet-1: PhotoAlbum,, example.photoalbum.PhotoAlbum
    MIDlet-Data-Size: 256
    MIDlet-Description: Photoalbum of images
    MIDlet-Name: PhotoAlbum
    MIDlet-Permissions: javax.microedition.io.Connector.http
    MIDlet-Vendor: Sun Microsystems, Inc.
    MIDlet-Version: 2.0
    MicroEdition-Configuration: CLDC-1.0
    MicroEdition-Profile: MIDP-2.0
    if not, there is something wrong. These lines above are from my manifest and it works. Maybe you made some strange settings about the MIDlet-Name?
    hth
    Kay

  • Please help me with the installation process.

    i have got free norton antivirus activation keybwith the pirchase of hp 16 gb pendrive .
    please help me with the installation process.

    Hey @10p,
    Welcome to the HP Support Forums!
    I understand that you need assistance with the installation of Norton Antivirus that you received with the purchase of an HP 16gb Pendrive. Did you get the Pendrive with a computer or just purchase the Pendrive on its own?
    Once I know if the Pendrive came with the purchase of a computer I will be able to point you in the right direction for support. Good luck!
    X-23
    I work on behalf of HP
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    Click the "Kudos, Thumbs Up" on the right to say "Thanks" for helping!

  • Please help me with msi installer file for 11.6.8.* as this is our standard version which we use for all machines in our organization

    please help me with msi installer file for 11.6.8.* as this is our standard version which we use for all machines in our organization

    arai-c wrote:
    I have full version of this software but I am not able to install it silently because it always gives Google toolbar pop up which We dont required
    arai-c wrote:
    the problem is we dont have msi file for 10.6.*.* and hence I am not able to create package for it
    I don't understand; two days ago you wrote that you have it, now you don't...?
    If you don't have it, then why not deploy the current version 12.1.3.153 - I don't see the point of installing an old, unsecure software version.

  • Can someone please help me with the installation of Adobe Premiere.

    Hello guys,  i am running a windows 7 64 bit home premium 2.00 ghz pentium b940 sandybridge processor.  500gb hard drive, 4 gb ram, and i have been trying to install a trial of adobe premiere for 2 DAYS!  I'm getting very frustrated.  Please help me.  I will post the error code below.  Please give DETAILED instructions on how to fix it and what is going wrong.  Please, this has been very frustrating,
    Exit Code: 7
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 67 error(s), 70 warning(s)
    WARNING: DW065: Display requirements not met for {0497EAED-70DA-4BBE-BEB3-AF77FD8788EA}
    WARNING: DW065: Display requirements not met for {5D2A85AB-7391-4EAC-AA61-D5D9C09E4F17}
    WARNING: DW065: Display requirements not met for {3D51982E-45C6-4B4B-9362-B356E1610821}
    WARNING: DW065: Display requirements not met for {FB720658-01F4-4002-BB69-49E66CD82E30}
    WARNING: DW065: Display requirements not met for {BF093B6B-F94F-4D77-99C9-4C0F6B2F44B6}
    WARNING: DW065: Display requirements not met for {CE45CAE5-0B56-4C52-AE07-98A05027A049}
    WARNING: DW065: Display requirements not met for {FE35B66A-C8F1-4D62-B823-C2EE2C7DA702}
    ----------- Payload: {92D58719-BBC1-4CC3-A08B-56C9E884CC2C} Microsoft_VC80_CRT_x86 1.0.0.0 -----------
    ERROR: Error 1935.An error occurred during the installation of assembly component {98CB24AD-52FB-DB5F-A01F-C8B3B9A1E18E}. HRESULT: 0x80071A91.
    ERROR: Install MSI payload failed with error: 1603 - Fatal error during installation.
    MSI Error message: Error 1935.An error occurred during the installation of assembly component {98CB24AD-52FB-DB5F-A01F-C8B3B9A1E18E}. HRESULT: 0x80071A91.
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    WARNING: DW036: Payload cannot be installed due to dependent operation failure
    ERROR: DW050: The following payload errors were found during install:
    ERROR: DW050:  - Adobe ExtendScript Toolkit CS5.5: Install failed
    ERROR: DW050:  - Microsoft_VC90_ATL_x86: Install failed
    ERROR: DW050:  - Adobe Premiere Pro CS5.5 Family: Install failed
    ERROR: DW050:  - Microsoft_VC90_CRT_x86: Install failed
    ERROR: DW050:  - Adobe Premiere Pro CS5.5 Support: Install failed
    ERROR: DW050:  - Microsoft_VC80_ATL_x86: Install failed
    ERROR: DW050:  - Recommended Common Fonts Installation x64: Install failed
    ERROR: DW050:  - AdobePDFL x64 CS5: Install failed
    ERROR: DW050:  - DynamiclinkSupport: Install failed
    ERROR: DW050:  - Microsoft_VC80_MFCLOC_x86_x64: Install failed
    ERROR: DW050:  - Adobe XMP Panels CS5: Install failed
    ERROR: DW050:  - Photoshop Camera Raw (64 bit)_6.3_AdobeCameraRaw6.0All-x64: Install failed
    ERROR: DW050:  - CSXS Story Extension: Install failed
    ERROR: DW050:  - Photoshop Camera Raw: Install failed
    ERROR: DW050:  - Adobe OnLocation CS5.1_AdobeOnLocation5.1en_USLanguagePack: Install failed
    ERROR: DW050:  - Camera Profiles Installer: Install failed
    ERROR: DW050:  - Adobe Extension Manager CS5.5: Install failed
    ERROR: DW050:  - Adobe XMP Panels CS5_3.1_AdobeXMPPanelsAll: Install failed
    ERROR: DW050:  - Microsoft_VC80_CRT_x86_x64: Install failed
    ERROR: DW050:  - Adobe Device Central CS5.5: Failed due to Language Pack installation failure
    ERROR: DW050:  - Adobe Mini Bridge CS5.1: Install failed
    ERROR: DW050:  - Adobe OnLocation CS5.1: Failed due to Language Pack installation failure
    ERROR: DW050:  - Photoshop Camera Raw (64 bit): Install failed
    ERROR: DW050:  - Microsoft_VC90_MFC_x86: Install failed
    ERROR: DW050:  - Adobe Media Encoder CS5.5 X64: Install failed
    ERROR: DW050:  - AdobeTypeSupport CS5: Install failed
    ERROR: DW050:  - Adobe CSXS Infrastructure CS5.5: Install failed
    ERROR: DW050:  - Adobe OnLocation CS5.1 Third Party Content Wrapper: Install failed
    ERROR: DW050:  - AdobeHelp: Install failed
    ERROR: DW050:  - Required Common Fonts Installation x64: Install failed
    ERROR: DW050:  - Microsoft_VC90_ATL_x86_x64: Install failed
    ERROR: DW050:  - Adobe Story: Install failed
    ERROR: DW050:  - Microsoft_VC90_CRT_x86_x64: Install failed
    ERROR: DW050:  - Microsoft_VC80_CRT_x86: Install failed
    ERROR: DW050:  - Adobe Device Central CS5.5_DeviceCentral3.5LP-en_US: Install failed
    ERROR: DW050:  - AdobeCMaps x64 CS5: Install failed
    ERROR: DW050:  - AdobeTypeSupport x64 CS5: Install failed
    ERROR: DW050:  - Camera Profiles Installer_6.3_AdobeCameraRawProfile6.0All: Install failed
    ERROR: DW050:  - Microsoft_VC90_MFC_x86_x64: Install failed
    ERROR: DW050:  - AdobeOutputModule: Install failed
    ERROR: DW050:  - Microsoft_VC90_MFCLOC_x86: Install failed
    ERROR: DW050:  - AdobePDFL CS5: Install failed
    ERROR: DW050:  - AdobeCMaps CS5: Install failed
    ERROR: DW050:  - Adobe CSXS Extensions CS5.5: Install failed
    ERROR: DW050:  - Adobe Encore CS5.1_AdobeEncore5.1en_USLanguagePack: Install failed
    ERROR: DW050:  - Microsoft_VC80_MFC_x86_x64: Install failed
    ERROR: DW050:  - ph: Install failed
    ERROR: DW050:  - Adobe ReviewPanel CS5.5: Install failed
    ERROR: DW050:  - Required Common Fonts Installation: Install failed
    ERROR: DW050:  - AmericanEnglishSpeechAnalysisModels: Install failed
    ERROR: DW050:  - Adobe Premiere Pro CS5.5: Failed due to Language Pack installation failure
    ERROR: DW050:  - Adobe Player for Embedding x64 3.1: Install failed
    ERROR: DW050:  - Adobe SwitchBoard 2.0: Install failed
    ERROR: DW050:  - Microsoft_VC80_MFC_x86: Install failed
    ERROR: DW050:  - Adobe Player for Embedding 3.1: Install failed
    ERROR: DW050:  - Microsoft_VC80_MFCLOC_x86: Install failed
    ERROR: DW050:  - SiteCatalyst NetAverages CS5.5: Install failed
    ERROR: DW050:  - Recommended Common Fonts Installation: Install failed
    ERROR: DW050:  - AdobeJRE: Install failed
    ERROR: DW050:  - Suite Shared Configuration CS5.5: Install failed
    ERROR: DW050:  - Adobe Bridge CS5.1: Install failed
    ERROR: DW050:  - Adobe Encore CS5.1: Failed due to Language Pack installation failure
    ERROR: DW050:  - Photoshop Camera Raw_6.3_AdobeCameraRaw6.0All: Install failed
    ERROR: DW050:  - Adobe Premiere Pro CS5.5_AdobePremierePro5.5en_USLanguagePack: Install failed

    What's going wrong?
    Display requirements not met
    How to fix? Read those system requirements. It's called "requirements" for a reason...
    Mylenium

  • Please help...PhotoshopCS4 installation errors

    Hey everyone,
    I am taking a computer imaging class using photoshop.  Since the class started two weeks ago, I have been using the trial version while waiting on my software purchase to arrive in the mail.  Today I tried installing.   I first uninstalled the trial version thinking that is what I am suppposed to do and believe I did so successfully.  I'm not sure if that was even the right thing to do. 
    I then put in my new software and proceeded to install.  The entire install completes and then states "done, with errors" at the end.  Of course the program won't work so I have tried trouble shooting but have no clue what to do.  I tried uninstalling and it won't.  I tried running the install again and it still gives me the message "done with errors" at the end of installation.   Please please help!
    Kara

    When you uninstall, make sure to use the CS4 Clean Utility thereafter. Sometimes remnants of trials get in the way. Also make sure you get rid of Adobe AIR and Acrobat.com. These are separate from the main install and need to be removed individually. Likewise, you may wish to check your Acrobat/ Adobe reader install and remove it, if necessary. Since it uses components shared with PS and those may in fact be newer than the ones on the Photoshop install DVD due to updates, the installer may not liek them. And of course with all things Vista: Run as admin on first program launch so the activation can proceed and all other options can kick in correctly.
    Mylenium

  • Please help with download and installation

    Hi,
    I am trying to download jdk1.4etc to Solaris Sparc. I tried downloading several times, all the times I get corrupt files. How and from where do I install JDK2 on Solaris. i am also in search of a good text editor like textpad for Solaris. Can anyone give me suggestions? Also, I need it immediately for my term assignments.
    Please Help!

    I am also having this problem. I have tried both the
    tar.Z and sh files. I have run the .sh as myself and
    as root. Here's what I see with the .sh installer:
    Do you agree to the above license terms? [yes or no]
    yes
    Unpacking...
    Checksumming...
    1
    The download file appears to be corrupted. Please
    refer to the Troubleshooting section of the Installation
    Instructions on the download page for more information.
    Please do not attempt to install this archive file.
    I am anxious to find a solution.I am having the same problem with both a download, j2sdk-1.4.0-linux-i386-rpm.bin, and Sun ONE cdrom, /disc3/j2se/1.4/j2sdk-1_4_0-linux-i386.bin, versions. I sincerely doubt that both are corrupted, at least I hope not. I'm attempting to set up the sdk under RedHat 7.2 in /usr/java. Have tried as both a user and as root - no joy! I would greatly appreciate any suggestions or help.

  • Please help, java program terminating unexpectedly without reason

    ok, so I have a project I'm working on, here's its description:
    Create a new project named FML_Pig where F is your first initial, M is your middle initial, and L is your last initial. For example, if your name is Alfred Edward Neuman then you would name your project AEN_Pig. If necessary, add a new Java file to this project named FML_Pig.
    Add a java file to the project named FML_Dice.
    Design and implement a Dice class as follows. The Dice class has 2 twenty‑sided dice with numbers on the faces (1 � 20) and 2 twenty-six-sided dice with letters on the faces (a � z).
    import java.util.Random;
    public class FML_Dice
    private static Random gen = new Random();
    private final static int NUM_SIDES = 20;
    private int die1, die2, numSnakeEyes, numVowels, totalPoints;
    private char die3, die4;
    Part 1
    Add a rollDice() method to your FML_Dice class that sets die1 and die2 to a random number between 1 and 20 and it sets die3 and die4 to a random character between �a� and �z�.
    Helpful Hint:
    dice3 = (char)(�a� + gen.nextInt(26)); // sets dice3 to a random char between �a� and �z�.
    Part 2
    Write a constructor that sets die1 and die2 to a random number between 1 and 20 and it sets die3 and die4 to a random character. Your constructor can simply call rollDice() to do this. It should also initialize numSnakeEyes, numVowels, and totalPoints to 0 (after you roll the dice).
    Part 3
    Write methods getDie1(), getDie2(), getDie3(), and getDie4() that returns the value of the respective die. Write a method numSnakes() that returns the number of snake eyes that have been rolled. Write a method numVowels() that returns the number of vowels that have been rolled. Write a method totalPts() that returns the totalPoints.
    Part 4
    Write a toString() method that overwrites the default toString() method. It should return a String representation of the value of all 4 die. For example, 17 2 h w.
    Part 5
    Write a method updateTotals that updates numVowels, numSnakeEyes, and totalPoints based on the current values of die1, die2, die3, and die4. numVowels should be incremented by 1 if either die3 or die4 are a vowel. However, if both die3 and die4 are vowels, the totalPoints should be reset to 0 and numVowels should be reset to 0 also. numSnakeEyes should be incremented by 1 if either die1 or die2 have a face value of 1 (this is not truly a snake eyes, but it gives better odds for the game). totalPoints should be incremented by the sum of die1 and die2 multiplied by (numSnakeEyes + 1).
    Part 6
    Write a main program (use the one in FML_Pig.java) that plays a game of Pig. In this game, two people play against each other. Player1 begins by rolling the dice. The total of die1 and die2 is added to his total score. Player1�s turn continues until he/she rolls a total of 4 vowels then the turn switches to Player2. Whenever a turn switches to the other player, the number of vowels is reset to zero. Also, if at any time both die3 and die4 are vowels, the total score is reset to 0 and the turn switches to the other player. (So the turn switches to the other player whenever the total number of vowels reaches four or there are two vowels rolled at the same time.)
    If a player rolls snakeeyes (for our game, snakeeyes occurs whenever either of the dice have a face value of one � in reality, both die1 and die2 should have a face value of one but then snakeeyes would occur only once every 400 rolls), then his point values are doubled from that point on (all future rolls for the rest of the game, point values for this player are doubled). When a player rolls snake eyes again, point values are tripled for that roll and all future rolls. (Three snake eyes, quadrupled, etc.)
    (continued on the next page)
    Be sure to display the results of the roll for each turn.
    First player to get to 2000 points wins the game and gets to oink like a pig.
    Note: Both players need their own set of Dice since the Dice keeps track of the totalPoints, the number of snake eyes rolled so far, and the number of vowels rolled so far for that particular player. You can do this simply by declaring it that way in the main program:
    Dice player1 = new Dice();
    Dice player2 = new Dice();
    You may add additional methods and instance variables to the class as needed. For example, I would probably write a private helper method isVowel() that is passed a char argument ch and returns true if ch is a vowel.
    Also, you can have the computer play for both player 1 and player 2. Simply loop it until somebody wins. Print out the result for each turn including who rolled the dice (player 1 or player 2), what they rolled, how many snakeeyes do they have, how many points did they get for this turn, and how many total points do they have.
    When you are completely finished, hand in just the java files (FLM_Dice & FLM_Pig). If you happened to write any other classes, make sure they are named with the FML format, and turn these in as well. I do not need EasyReader or p.
    Oink! Oink!
    This pig won the game --------->
    so here's my code:
    this isn't my code but is required to compile my code: // package com.skylit.io;
    import java.io.*;
    *  @author Gary Litvin
    *  @version 1.2, 5/30/02
    *  Written as part of
    *  <i>Java Methods: An Introduction to Object-Oriented Programming</i>
    *  (Skylight Publishing 2001, ISBN 0-9654853-7-4)
    *   and
    *  <i>Java Methods AB: Data Structures</i>
    *  (Skylight Publishing 2003, ISBN 0-9654853-1-5)
    *  EasyReader provides simple methods for reading the console and
    *  for opening and reading text files.  All exceptions are handled
    *  inside the class and are hidden from the user.
    *  <xmp>
    *  Example:
    *  =======
    *  EasyReader console = new EasyReader();
    *  System.out.print("Enter input file name: ");
    *  String fileName = console.readLine();
    *  EasyReader inFile = new EasyReader(fileName);
    *  if (inFile.bad())
    *    System.err.println("Can't open " + fileName);
    *    System.exit(1);
    *  String firstLine = inFile.readLine();
    *  if (!inFile.eof())   // or:  if (firstLine != null)
    *    System.out.println("The first line is : " + firstLine);
    *  System.out.print("Enter the maximum number of integers to read: ");
    *  int maxCount = console.readInt();
    *  int k, count = 0;
    *  while (count < maxCount && !inFile.eof())
    *    k = inFile.readInt();
    *    if (!inFile.eof())
    *      // process or store this number
    *      count++;
    *  inFile.close();    // optional
    *  System.out.println(count + " numbers read");
    *  </xmp>
    public class EasyReader
      protected String myFileName;
      protected BufferedReader myInFile;
      protected int myErrorFlags = 0;
      protected static final int OPENERROR = 0x0001;
      protected static final int CLOSEERROR = 0x0002;
      protected static final int READERROR = 0x0004;
      protected static final int EOF = 0x0100;
       *  Constructor.  Prepares console (System.in) for reading
      public EasyReader()
        myFileName = null;
        myErrorFlags = 0;
        myInFile = new BufferedReader(
                                new InputStreamReader(System.in), 128);
       *  Constructor.  opens a file for reading
       *  @param fileName the name or pathname of the file
      public EasyReader(String fileName)
        myFileName = fileName;
        myErrorFlags = 0;
        try
          myInFile = new BufferedReader(new FileReader(fileName), 1024);
        catch (FileNotFoundException e)
          myErrorFlags |= OPENERROR;
          myFileName = null;
       *  Closes the file
      public void close()
        if (myFileName == null)
          return;
        try
          myInFile.close();
        catch (IOException e)
          System.err.println("Error closing " + myFileName + "\n");
          myErrorFlags |= CLOSEERROR;
       *  Checks the status of the file
       *  @return true if en error occurred opening or reading the file,
       *  false otherwise
      public boolean bad()
        return myErrorFlags != 0;
       *  Checks the EOF status of the file
       *  @return true if EOF was encountered in the previous read
       *  operation, false otherwise
      public boolean eof()
        return (myErrorFlags & EOF) != 0;
      private boolean ready() throws IOException
        return myFileName == null || myInFile.ready();
       *  Reads the next character from a file (any character including
       *  a space or a newline character).
       *  @return character read or <code>null</code> character
       *  (Unicode 0) if trying to read beyond the EOF
      public char readChar()
        char ch = '\u0000';
        try
          if (ready())
             ch = (char)myInFile.read();
        catch (IOException e)
          if (myFileName != null)
            System.err.println("Error reading " + myFileName + "\n");
          myErrorFlags |= READERROR;
        if (ch == '\u0000')
          myErrorFlags |= EOF;
        return ch;
       *  Reads from the current position in the file up to and including
       *  the next newline character.  The newline character is thrown away
       *  @return the read string (excluding the newline character) or
       *  null if trying to read beyond the EOF
      public String readLine()
        String s = null;
        try
          s = myInFile.readLine();
        catch (IOException e)
          if (myFileName != null)
            System.err.println("Error reading " + myFileName + "\n");
          myErrorFlags |= READERROR;
        if (s == null)
          myErrorFlags |= EOF;
        return s;
       *  Skips whitespace and reads the next word (a string of consecutive
       *  non-whitespace characters (up to but excluding the next space,
       *  newline, etc.)
       *  @return the read string or null if trying to read beyond the EOF
      public String readWord()
        StringBuffer buffer = new StringBuffer(128);
        char ch = ' ';
        int count = 0;
        String s = null;
        try
          while (ready() && Character.isWhitespace(ch))
            ch = (char)myInFile.read();
          while (ready() && !Character.isWhitespace(ch))
            count++;
            buffer.append(ch);
            myInFile.mark(1);
            ch = (char)myInFile.read();
          if (count > 0)
            myInFile.reset();
            s = buffer.toString();
          else
            myErrorFlags |= EOF;
        catch (IOException e)
          if (myFileName != null)
            System.err.println("Error reading " + myFileName + "\n");
          myErrorFlags |= READERROR;
        return s;
       *  Reads the next integer (without validating its format)
       *  @return the integer read or 0 if trying to read beyond the EOF
      public int readInt()
        String s = readWord();
        if (s != null)
          return Integer.parseInt(s);
        else
          return 0;
       *  Reads the next double (without validating its format)
       *  @return the number read or 0 if trying to read beyond the EOF
      public double readDouble()
        String s = readWord();
        if (s != null)
          return Double.parseDouble(s);
          // in Java 1, use: return Double.valueOf(s).doubleValue();
        else
          return 0.0;
    }same with this:
    public class p
         public static void l(String S)
          { System.out.println(S);}
         public static void o(String S)
          {System.out.print(S);}
         public static void l(int i)
          { System.out.println(i);}
         public static void o(int i)
          {System.out.print(i);}
         public static void l(boolean b)
          { System.out.println(b);}
         public static void o(boolean b)
          {System.out.print(b);}
        public static void l(char c)
          { System.out.println(c);}
         public static void o(char c)
          {System.out.print(c);}     
         public static void l(double d)
          { System.out.println(d);}
         public static void o(double d)
          {System.out.print(d);} 
        public static void l(Object obj)
          { System.out.println(obj.toString());}
         public static void o(Object obj)
          {System.out.print(obj.toString());}
         public static void l()
          {System.out.println();}
    }       here's my code:
    import java.util.*;
    public class JMM_Pig
         public static void main(String[] args)
              int winner=0;
              int pts=0;
                   JMM_Dice player1=new JMM_Dice();
                   JMM_Dice player2=new JMM_Dice();
                   p.l("Player 1 rolls the dice...");
                   player1.rollDice();
                   player1.updateTotals();
                   boolean loop=true;
                   while(loop)
                   while(player1.numVowels()<=4)
                        p.l("Player 1 continues his turn...");
                        player1.rollDice();
                        player1.updateTotals();
                        p.l("Player 1 rolled a "+player1.getDie1()+" and a "+player1.getDie2()+" and a '"+player1.getDie3()+"' and a '"+player1.getDie4()+"'");
                        p.l("Player 1 rolled "+player1.currvowels()+" vowels.");
                        p.l("Player 1 has "+player1.totalvowels()+" total vowels.");
                        //if(player1.getMagic()==1)
                        //player1.totalPoints=(player1.totalPoints+player1.getDie1()+player1.getDie2())*player1.mult;
                        //pts=(player1.totalPts()+player1.getDie1()+player1.getDie2())*player1.getMult();
                        //player1.setTpts(pts);
                        //if(player1.getMagic()!=1)
                             //player1.totalPoints=player1.totalPoints+player1.getDie1()+player1.getDie2();
                        //pts=player1.totalPts()+player1.getDie1()+player1.getDie2();
                        //player1.setTpts(pts);
                        p.l("Player 1 has "+player1.numSnakes()+" snake eyes.");
                        p.l("Player 1 earned "+player1.ptsreturn()+" points this turn.");
                        p.l("Player 1 has "+player1.totalPts()+" total points.");
                        pts=0;
                        if(player1.totalPts()>=2000)
                             winner=1;
                             player1.setNv(4);loop=false;
                        if((player1.isavowel(player1.getadice()))&&player1.isavowel(player1.getadice2()))
                             player1.setTpts(0);player1.setNv(0);player1.setNv(4);
                   p.l("Player 1's turn has ended...");
                   player1.setNv(0);
                   p.l("Player 2 rolls the dice...");
                   player2.rollDice();
                   player2.setTpts(player2.totalPts()+player2.getDie1()+player2.getDie2());
                   while(player2.numVowels()<=4)
                        p.l("Player 2 continues his turn...");
                        player2.rollDice();
                        player2.updateTotals();
                        p.l("Player 2 rolled a "+player2.getDie1()+" and a "+player2.getDie2()+" and a '"+player2.getDie3()+"' and a '"+player2.getDie4()+"'");
                        p.l("Player 2 rolled "+player2.currvowels()+" vowels.");
                        p.l("Player 2 has "+player2.totalvowels()+" total vowels.");
                        //if(player1.getMagic()==1)
                        //player1.totalPoints=(player1.totalPoints+player1.getDie1()+player1.getDie2())*player1.mult;
                        //pts=(player1.totalPts()+player1.getDie1()+player1.getDie2())*player1.getMult();
                        //player1.setTpts(pts);
                        //if(player1.getMagic()!=1)
                             //player1.totalPoints=player1.totalPoints+player1.getDie1()+player1.getDie2();
                        //pts=player1.totalPts()+player1.getDie1()+player1.getDie2();
                        //player1.setTpts(pts);
                        p.l("Player 2 has "+player2.numSnakes()+" snake eyes.");
                        p.l("Player 2 earned "+player2.ptsreturn()+" points this turn.");
                        p.l("Player 2 has "+player2.totalPts()+" total points.");
                        pts=0;
                        if(player2.totalPts()>=2000)
                             winner=2;
                             player2.setNv(4);loop=false;
                        if((player2.isavowel(player2.getadice()))&&player2.isavowel(player2.getadice2()))
                             player2.setTpts(0);player2.setNv(0);player2.setNv(4);
                   p.l("Player 2's turn has ended...");
                   player2.setNv(0);
                   if(player1.totalPts()>=2000)
                        winner=1;
                        loop=false;
                   if(player2.totalPts()>=2000)
                        winner=2;
                        loop=false;
                   }  //main loop
                   if(winner==1)
                        p.l("It ended with the following statistics...");
                        p.l("Player 1's score was: "+player1.totalPts()+" and Player 2's score was: "+player2.totalPts());
                        p.l("Player 1 had: "+player1.numSnakes()+" snake eye(s) and Player 2 had: "+player2.numSnakes()+" snake eye(s)");
                        p.l("Player 1 wins, oink oink!");
                   if(winner==2)
                        p.l("It ended with the following statistics...");
                        p.l("Player 1's score was: "+player1.totalPts()+" and Player 2's score was: "+player2.totalPts());
                        p.l("Player 1 had: "+player1.numSnakes()+" snake eye(s) and Player 2 had: "+player2.numSnakes()+" snake eye(s)");
                        p.l("Player 2 wins, oink oink!");
    and dice class:
    import java.util.*;
    public class JMM_Dice {
         private static Random gen = new Random();
        private final static int NUM_SIDES = 21;
        private int die1, die2, numSnakeEyes, numVowels, totalPoints;
        private char die3, die4;
        private int dice=0;
           //dice=
           private int dice2=0;
           //dice2=;
           private String adice="";
           //adice=;
           private String adice2="";
           //adice2;
           private int magic=0;
           private int mult=0;
           private int currvowels=0;
           private int totalvowels=0;
      public static EasyReader key = new EasyReader();
      public JMM_Dice()
          dice=0;dice2=0;
           String alpha="abcdefghijklmnopqrstuvwxyz";
          adice="";adice2="";
           rollDice();
           numSnakeEyes=0;numVowels=0;totalPoints=0;
      public void setTpts(int tpts)
           this.totalPoints=tpts;
      public void setNv(int nv)
           this.numVowels=nv;
      public int getDie1()
           return dice;
      public int getDie2()
           return dice2;
      public String getDie3()
           return adice;
      public String getDie4()
           return adice2;
      public int numSnakes()
           return numSnakeEyes;
      public void setSnakes(int s)
           this.numSnakeEyes=s;
      public String getadice()
           return this.adice;
      public String getadice2()
           return this.adice2;
      public int numVowels()
           return numVowels;
      public int getMagic()
           return this.magic;
      public int getNv()
           return this.numVowels;
      public void setMagic(int mag)
           this.magic=mag;
      public int getMult()
           return this.mult;
      public void setMult(int m)
           this.mult=m;
      public int totalPts()
           return totalPoints;
      public String toString()
           return dice+""+dice2+""+adice+""+adice2;
      public boolean isavowel(String str)
           if(str.equals("a")||str.equals("e")||str.equals("i")||str.equals("o")||str.equals("u"))
                return true;
           else
                return false;
      public int ptsreturn()
           return dice+dice2;
      public int currvowels()
           int tmp=currvowels;
           currvowels=0;
           return tmp;
      public int totalvowels()
           return numVowels;
      public void updateTotals()
           if(adice.equalsIgnoreCase("a")||adice.equalsIgnoreCase("e")||adice.equalsIgnoreCase("i")||adice.equalsIgnoreCase("o")||adice.equalsIgnoreCase("u")||adice2.equalsIgnoreCase("a")||adice2.equalsIgnoreCase("e")||adice2.equalsIgnoreCase("i")||adice2.equalsIgnoreCase("o")||adice2.equalsIgnoreCase("u"))
                numVowels++;currvowels++;
           if((isavowel(adice))&&isavowel(adice2))
                totalPoints=0;numVowels=0;
           if(dice==1||dice2==1)
                numSnakeEyes++;
           int fd=dice;
           int sd=dice2;
           int sum=fd+sd;
           totalPoints+=sum*(numSnakeEyes+1);
      public void rollDice()
           dice=gen.nextInt(20)+1;
           dice2=gen.nextInt(20)+1;
           String alpha="abcdefghijklmnopqrstuvwxyz";
           adice=String.valueOf(alpha.charAt(gen.nextInt(26)));
           adice2=String.valueOf(alpha.charAt(gen.nextInt(26)));
      public static void sleep (int wait)
      {     long timeToQuit = System.currentTimeMillis() + wait;
           while (System.currentTimeMillis() < timeToQuit)
                ;   // take no action
    }the program works fine except it's supposed to terminate when one of the two AIs get a score of 2000, right now it terminates no matter what score the AIs get and no matter what I've tried to do it keeps doing that...can someone please tell me why it's terminating so oddly? Thanks! :)

    Here's how my code works in a nutshell, the main program starts with the boolean loop=true;
                   while(loop)
                   {then comes the loops for the two AIs, first the player 1 AI goes with this loop: while(player1.numVowels()<=4)
                   {there the player 1 roles the dice and it keeps going until player 1 gets a total of 2000 points at which time this is supposed to execute: if(player1.totalPts()>=2000)
                             winner=1;
                             player1.setNv(4);loop=false;
                        }, player1.setNv(4); sets numVowels to 4 so that the inner loop exits, loop=false exits the other loop and winner=1; specifies that player 1 won which is used outside of the loops here: if(winner==1)
                        p.l("It ended with the following statistics...");
                        p.l("Player 1's score was: "+player1.totalPts()+" and Player 2's score was: "+player2.totalPts());
                        p.l("Player 1 had: "+player1.numSnakes()+" snake eye(s) and Player 2 had: "+player2.numSnakes()+" snake eye(s)");
                        p.l("Player 1 wins, oink oink!");
                   if(winner==2)
                        p.l("It ended with the following statistics...");
                        p.l("Player 1's score was: "+player1.totalPts()+" and Player 2's score was: "+player2.totalPts());
                        p.l("Player 1 had: "+player1.numSnakes()+" snake eye(s) and Player 2 had: "+player2.numSnakes()+" snake eye(s)");
                        p.l("Player 2 wins, oink oink!");
                   } the same thing happens for player 2 if player 1 didn't already get 2000 points...but the if statement despite everything pointing to the variables containing the right values don't seem to be working, as shown by the example program output I posted it just ends at any random number...hopefully this helps make figuring out what's wrong easier :) ...so can anyone please help me out? thanks! :)

  • Please help... For some reason I can not import any photos on to my elements 10 organier.

    Please help... I can not import any photos on to my elements 10 organizer, it is saying files corrupt!!!!! What do I do?????  I have am using an apple, and i usually always get photos from iphoto but it is just not doing it. Please help!

    How are you trying to import the files? Are you using the import from iphoto command? What happens if you export the photos from iphoto to the desktop and use from files and folders? Does it work that way?

  • Please help! Adobe package installation

    I purchased an Adobe CS6 Design standard and registered my product. Now i dont know how to install it. I have used the CD but everytime i click on setup it says this option is only for windows. what do i do please help!

    There's a PC version and a Mac version. Sounds like you have the wrong one.

  • SSL com.sun.midp.ssl API Doc

    Hi
    Does anyone know the location of ssl API Doc for J2ME ?
    I searched all over the google and yahoo but still can't find it.
    Nokia has a package ssl.jar, but their Developer Suite for J2ME doesn't contain this package API.
    Cheers...

    What�s the difference between theese two packages:
    javax.net.ssl.*;
    com.sun.net.ssl.*;the former seems to be an old version of the latter..
    is this correct?This link might interest you:
    http://java.sun.com/products/jdk/faq/faq-sun-packages.html

  • Please help with Sun Java System Communications Sync crashe with IEx 7.x

    Dear All!
    Recently i've upgrade my IExplorer to 7.x version. After that i began to have problems with Communications Sync (latest version). When i try to sync Outlook 2003 with the server (SSL connection/ self signed certificate) the Comm Sync asks if i want to allow to open connection with wrong certificate (happed only after installing IEx 7.x) and then when i press YES it crashes.
    Any help on how to fix this problem is appriciated.
    Konstantin
    P.S.: Adding a self signed certificate to IEx DB and adding the website to the trusted websites list did not help.

    Hi,
    Not sure how much we can help with this issue - especially if you are already running the latest version of the sync tool. About all I can offer is to uninstall your current sync software and reinstall the latest public version:
    http://sunsolve.sun.com/private-cgi/getpatch.pl (search for patch #124734).
    If that doesn't help I suggest you log a sun support case for this (assuming you have a sun support contract that is).
    Regards,
    Shane.

  • I have problem .. I can't update my any app !! Please help me and give me a reason to solve it !! I am in Iran

    Dear apple support !! I can't update my app ! Just b'cuz I am. At Iran ! Please give me a reason to solve it

    There is no way to solve it. The iPhone is not supported in Iran; there is no App Store.

  • Semi-Emergency! Please Help with Heat Sink Installation!

    I'm mounting the Thermaltake Blue Orb 2 onto my Athlon 64 X2 4800+ on my MSI K8N Neo-Platinum 4 motherboard. The instructions included with the cooler give 2 options for K8 installation. Option 1 is if your MB has a metal backplate with "taller" mounting holes; Option 2 is for a plastic backplate with "shorter" mounting holes.
    Having a metal backplate, I assumed Option 1 was for me, but after fitting the standoffs, and setting the Blue Orb on the core, the screws from the fan didn't seem to reach. They're spring-loaded and I could get them in, but it seemed like I was putting a heck of a lot of pressure on the core and I got really worried.
    I entertained Option 2, which has the user removing the plastic backplate and fitting the one that's included with the Blue Orb 2. The problem is, my backplate is the metal one and doesn't seem to want to come off (of course I didn't attempt to force it).
    So, do I do as I originally planned or can too much pressure be a serious problem? Or do I try to get taller standoffs or what?

    DrZin:
    First, taking off the plate - that would allow you to mount the cooler according to the mfg. setup but is risky:
    I don't know what adhesive is used there, but the idea is to soften it up with heat.  You can slowly heat it up with a heat gun or hair dryer.  It shouldn't get hotter than 60C and things should start to soften up around 50C.  I have used plastic bread scrapers or plastic spackling compound applicators - thin and flat with no sharp edges and NO metal.  Push the edge between the metal and the board, working around the whole periphery.  The adhesive might stretch rather than cutting loose suddenly, so have patience.  It might start very slowly then move more quickly as it gets farther away from the board.
    While you are handling the board be careful not to touch any of the pins or electrical parts unless you are using a ground strap.  Also, don't wear staticky clothing - cotton is best.  I try to keep a conductive foam pad against the bottom of boards while I'm working on them, but that will be hard when messing with the plate.
    If the adhesive was a double sided tape-like material, you can clean it off with a solvent - alcohol?  If it was an epoxy, it should have come away cleanly from the board.  Then you are set to go with the Blue Orb install according to the instructions.  Then look below for instructions about starting up the system.
    IF you decide against taking off the plate:  You have to figure out what the installed height of the springs would be when installed with the back plate.  I just looked at a picture of the Blue Orb kit and it looks like it uses a plastic backplate with shoulder screws on the top side of the board.  I assume you have verified that these shoulder screws DON'T fit in the holes in the metal plate that's on your board now.  If they do, I think you are home free, since the shoulder screws set the compressed height of the springs.  If they don't, you need to get long screws that will fit the threads in the metal plate.  They should be just a bit longer than the overall length of the TT shoulder screws.  Next, measure the height of the top of the shoulder screws above wherever the springs would seat (on the board, I assume but there might be a boss on the TT plastic plate that would stick above the board).  This height is the compressed length of the springs when the Blue Orb is installed correctly.  They should take some pushing to compress to this length - the 'crunch' of the cooler is significant.  AMD recommends a load of 75 lbs for the cooler-processor interface, with a maximum of 100 lbs.  So with two springs, they should require 35-40 lbs to compress them to their installed height.
    To put the whole thing together, apply the thermal compound according to the package directions - smearing it on for one, a drop for the other (that is a low viscosity fluid that spreads out a lot better than traditional thermal compounds so a drop is OK).  Then put the cooler on the CPU and thread the screws through the springs then into the plate.  Start tightening them evenly, 1/2 turn for each one once they start to load up the springs.  Measure the height frequently to make sure they are even - you could make up a gauge or use a machinist's ruler.  Once you have gotten to the correct height you are done.  Check the bottom of the board to make sure the screws don't stick out too far - the board mounts on standoffs so you have some margin.
    Put the rest of the system together - just enough to fire up the CPU and get a video display - maybe 1-2 RAM sticks and the video card.  You could set it up out of the case if you want (pull the anti-static foam out before applying power if you do this).  Run the system on the BIOS setup screen, the one that shows the CPU temps and fan speeds.  Watch the CPU temp and make sure it doesn't head for the sky - it will go up fast but should settle in the 40-50C range (there are some fan control options in the BIOS that allow you to set the fan/temp relationship - you might want to turn these off and let the fan run full speed to see what your lowest no-load temp is).
    If the CPU temp launches, the springs aren't compressed enough or the thermal compound is not on right.  Tighten the springs or re-mount the cooler.
    Good luck,
    ss

  • I had Apple Ibook G4. I had replaced the HDD but thnot able to install the mac os becoz its dvd drive is faulty I dont want to expend onthat stuff but want to use the same Please help me regarding the installation procedure of mac os

    help

    You cannot install OS X without using an installer DVD, and that requires a DVD drive (internal or external.) Alternatively, if you have access to another Mac and if both have Firewire ports, then you can use Target Disk Mode: Transferring files between two computers using FireWire.
    Your profile indicates you have a MacBook, but are using OS X 10.3.x which is not possible. The first MacBook model used a special Intel-only version of Tiger, 10.4.x.

Maybe you are looking for

  • Can I save Pages 5.0.1 documents as a single file?

    I have recently started using CrashPlan to backup my iMac (OS X Mavericks) and tried using CrashPlan's mobile app to restore iWork (Pages, Numbers, Keynote) documents on the go on either my iPhone or iPad.  However, I cannot restore any newer iWork (

  • Help! Adobe Media Encoder disappeared from my Creative Cloud

    2 issues. #1. Was using Adobe Media Encoder (part of my creative cloud subscription) .. it kept saying i needed to activate it all of a sudden.. so (am on a mac) dragged it to trash, and went to adobe application manager to re-install, all of a sudde

  • Why do all my devices ring when I get an incoming call? How do I turn this off?

    Since my last iphone update (8.1.2), everytime I get an incoming call of any form (regular call, facetime, even sms and imessages), all my other devices (ipad, ipods) ring too at the same time. Its driving me crazy. How to I get rid of that?

  • Photo quality dropped

    At the same time I stopped getting any thumbnails in Iphoto, when I open a picture in Photoshop, the image quality is now very poor. I get a 3X5 photo at 72 dpi, when it used to be 22X17 at 72 dpi. File size is now point 1 MB, when it used to 3.5 MB.

  • HT201210 i cant git my iphon3g out of recovery mode

    My iphone3g is stuck in recovery mode and i cant git it out