Is this JAVA on HP 64  or 32 bit version ?

Hi
This is the JAVA installed on an HP Machine
bash-3.2# ./java -version
java version "1.6.0.00"
Java(TM) SE Runtime Environment (build 1.6.0.00-jinteg_12_nov_2007_21_58-b00)
Java HotSpot(TM) Server VM (build 1.6.0.00 jinteg:11.12.07-21:02 PA2.0 (aCC_AP), mixed mode)
Question : Is this 64 or 32 bit Java version ?
with regards
Karthik

Try starting java with the version -d64 (on any platform!) should try to load the 64bit JVM and tell you if it fails to do it (-d32 does the same thing for the 32bit JVM).
java -version -d64

Similar Messages

  • While installing latest version of iTunes error "This iTunes installer is intended for 32-bit versions of Windows. Please download and install the 64-bit iTunes installer instead" how to deal with it ?

    While installing latest version of iTunes error "This iTunes installer is intended for 32-bit versions of Windows. Please download and install the 64-bit iTunes installer instead" how to deal with it ?

    Doublechecking. What's the filename of the installer you've been downloading? (The 32-bit installer is called iTunesSetup.exe, and the 64-bit installer is called iTunes64Setup.exe.)

  • ITunes for Windows 7 shows error messsage "this ipad cannot be connected. install 64 bit version" even though itunes was unistalled and latest version installed several times. what's next?

    this ipad worked with iTunes on this PC before but I ve installed new software (don't remember what) and changed password to Apple and iCloud
    this ipad works fine with another PC. New iPads can connect to this PC but not the old one. What do i do? buy new PC?
    i did this iPad syncing with iTunes already - no result
    ios 7 ipad 3 Cellular 32

    Make sure you backup prior to following the steps below:
    I'd recommend uninstalling iTunes on your PC, restarting if recommended, then going to the Start button and typing Regedit and searching for anything which mentions iTunes and deleting any mention of it from your Registry as it sounds like something from a previous version of iTunes is still hanging around in your Registry, however be very careful not to delete anything else as this could result in serious issues for you computer.
    Once done and all entries for iTunes are deleted from the Registry, check C:\program files or where iTunes was installed and delete the iTunes folder if still present.
    Then go here: http://www.apple.com/itunes/ and download iTunes.
    Good luck,
    Steve

  • TS1424 has anyone not been able to get the installer to properly load and get a message like: This installer is intended for 32 bit versions of windows. Please download and install 64 bit iTuines installer instead? and even if you uninstall and reinstall

    Has anyone not been able to get the iTunes installer to load properly and get a message like this: This iTunes installer is intended for 32 bit versions of windows. Please download and install 64 bit iTunes installer instead. I have tried repeatedly to get this to load, I have uninstalled iTunes completely and reinstalled and still get the same message. I have windows XP and a brand new ipod touch which I am trying to load.

    Yes, it's come up a number of times. If you look to the right under "more like this", you'll find threads that may offer useful suggestions.
    Regards.

  • There is no boot camp for windows 8.1 32 bit version ? where can i find this ?

    I have Windows 8.1 32 Bit version and there is no Boot camp for this ? nor for Windows 8 32 bit version ? Also the Boot Camp 4 doesn't works and crashes the whole system if installed on windows 8. or 8.1

    you are running 10.7?
    There are direct downloads.
    8.1 is a nice improvement over 8.0 and you probably need BC 5.x
    Boot Camp: Frequently asked questions about installing Windows 8
    Summary
    Learn more about how Mac computers can run Windows 8 using Boot Camp 5.
    http://support.apple.com/kb/HT5628
    Products Affected
    Boot Camp, Windows 8
    General installation questions
    What is Boot Camp 5?
    Boot Camp 5 is not a release of OS X software. Rather, it is a release of the Windows Support Software (drivers). You will need to use this software on your Mac with Windows 8 or Windows 7. For more information on Boot Camp 5, see thttp://support.apple.com/kb/HT5639
    Which Macs support Windows 8?
    MacBook Air (Mid 2011 or newer)
    MacBook Pro (Mid 2010 or newer)
    Mac Pro (Early 2009 or newer)
    Mac Mini (Mid 2011 or newer)
    iMac (27-inch, Mid 2010 or Mid 2011 or newer)
    For more information, see this article.
    What are the System Requirements for Windows 8?
    Please see this article.
    How can I install Windows 8 on an eligible computer?
    Use the Boot Camp Assistant. The assistant will partition your internal hard drives and install Windows 8. For more information on Windows 8 installation, see the Boot Camp Installation & Setup Guide.

  • How to turn this Java into something I can use in CF?

    Hi - Following on from a recent post about how to strip our special characters from a string before insertion to the db I have found this Java code - my question is, how can I turn this into something I can use with CF? I think I need to use the cfscipt tag but that's right on the boundaries of my knowledge base.. If anyone could please help I'd be ever so grateful - thank you!
    package net.htmlescape;
    * HtmlEscape in Java, which is compatible with utf-8
    * @author Ulrich Jensen, http://www.htmlescape.net
    * Feel free to get inspired, use or steal this code and use it in your
    * own projects.
    * License:
    * You have the right to use this code in your own project or publish it
    * on your own website.
    * If you are going to use this code, please include the author lines.
    * Use this code at your own risk. The author does not warrent or assume any
    * legal liability or responsibility for the accuracy, completeness or usefullness of
    * this program code.
    public class HtmlEscape {
      private static char[] hex={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
       * Method for html escaping a String, for use in a textarea
       * @param original The String to escape
       * @return The escaped String
      public static String escapeTextArea(String original)
        return escapeSpecial(escapeTags(original));    
       * Normal escape function, for Html escaping Strings
       * @param original The original String
       * @return The escape String
      public static String escape(String original)
        return escapeSpecial(escapeBr(escapeTags(original)));
      public static String escapeTags(String original)
        if(original==null) return "";
        StringBuffer out=new StringBuffer("");
        char[] chars=original.toCharArray();
        for(int i=0;i<chars.length;i++)
          boolean found=true;
          switch(chars[i])
            case 60:out.append("&lt;"); break; //<
            case 62:out.append("&gt;"); break; //>
            case 34:out.append("&quot;"); break; //"
            default:found=false;break;
          if(!found) out.append(chars[i]);
        return out.toString();
      public static String escapeBr(String original)
        if(original==null) return "";
        StringBuffer out=new StringBuffer("");
        char[] chars=original.toCharArray();
        for(int i=0;i<chars.length;i++)
          boolean found=true;
          switch(chars[i])
            case '\n': out.append("<br/>"); break; //newline
            case '\r': break;
            default:found=false;break;
          if(!found) out.append(chars[i]);
        return out.toString();
      public static String escapeSpecial(String original)
        if(original==null) return "";
        StringBuffer out=new StringBuffer("");
        char[] chars=original.toCharArray();
        for(int i=0;i<chars.length;i++)
            boolean found=true;
          switch(chars[i]) {
            case 38:out.append("&amp;"); break; //&
            case 198:out.append("&AElig;"); break; //Æ
            case 193:out.append("&Aacute;"); break; //Á
            case 194:out.append("&Acirc;"); break; //Â
            case 192:out.append("&Agrave;"); break; //À
            case 197:out.append("&Aring;"); break; //Å
            case 195:out.append("&Atilde;"); break; //Ã
            case 196:out.append("&Auml;"); break; //Ä
            case 199:out.append("&Ccedil;"); break; //Ç
            case 208:out.append("&ETH;"); break; //Ð
            case 201:out.append("&Eacute;"); break; //É
            case 202:out.append("&Ecirc;"); break; //Ê
            case 200:out.append("&Egrave;"); break; //È
            case 203:out.append("&Euml;"); break; //Ë
            case 205:out.append("&Iacute;"); break; //Í
            case 206:out.append("&Icirc;"); break; //Î
            case 204:out.append("&Igrave;"); break; //Ì
            case 207:out.append("&Iuml;"); break; //Ï
            case 209:out.append("&Ntilde;"); break; //Ñ
            case 211:out.append("&Oacute;"); break; //Ó
            case 212:out.append("&Ocirc;"); break; //Ô
            case 210:out.append("&Ograve;"); break; //Ò
            case 216:out.append("&Oslash;"); break; //Ø
            case 213:out.append("&Otilde;"); break; //Õ
            case 214:out.append("&Ouml;"); break; //Ö
            case 222:out.append("&THORN;"); break; //Þ
            case 218:out.append("&Uacute;"); break; //Ú
            case 219:out.append("&Ucirc;"); break; //Û
            case 217:out.append("&Ugrave;"); break; //Ù
            case 220:out.append("&Uuml;"); break; //Ü
            case 221:out.append("&Yacute;"); break; //Ý
            case 225:out.append("&aacute;"); break; //á
            case 226:out.append("&acirc;"); break; //â
            case 230:out.append("&aelig;"); break; //æ
            case 224:out.append("&agrave;"); break; //à
            case 229:out.append("&aring;"); break; //å
            case 227:out.append("&atilde;"); break; //ã
            case 228:out.append("&auml;"); break; //ä
            case 231:out.append("&ccedil;"); break; //ç
            case 233:out.append("&eacute;"); break; //é
            case 234:out.append("&ecirc;"); break; //ê
            case 232:out.append("&egrave;"); break; //è
            case 240:out.append("&eth;"); break; //ð
            case 235:out.append("&euml;"); break; //ë
            case 237:out.append("&iacute;"); break; //í
            case 238:out.append("&icirc;"); break; //î
            case 236:out.append("&igrave;"); break; //ì
            case 239:out.append("&iuml;"); break; //ï
            case 241:out.append("&ntilde;"); break; //ñ
            case 243:out.append("&oacute;"); break; //ó
            case 244:out.append("&ocirc;"); break; //ô
            case 242:out.append("&ograve;"); break; //ò
            case 248:out.append("&oslash;"); break; //ø
            case 245:out.append("&otilde;"); break; //õ
            case 246:out.append("&ouml;"); break; //ö
            case 223:out.append("&szlig;"); break; //ß
            case 254:out.append("&thorn;"); break; //þ
            case 250:out.append("&uacute;"); break; //ú
            case 251:out.append("&ucirc;"); break; //û
            case 249:out.append("&ugrave;"); break; //ù
            case 252:out.append("&uuml;"); break; //ü
            case 253:out.append("&yacute;"); break; //ý
            case 255:out.append("&yuml;"); break; //ÿ
            case 162:out.append("&cent;"); break; //¢
            default:
              found=false;
              break;
          if(!found)
            if(chars[i]>127) {
              char c=chars[i];
              int a4=c%16;
              c=(char) (c/16);
              int a3=c%16;
              c=(char) (c/16);
              int a2=c%16;
              c=(char) (c/16);
              int a1=c%16;
              out.append("&#x"+hex[a1]+hex[a2]+hex[a3]+hex[a4]+";");    
            else
              out.append(chars[i]);
        return out.toString();

    hi Dan, thanks for asking
    I did this in the end..
    <cfscript>
      // function cleantext(string) {
      //   string = "<p>" & string;
      //   string = Replace(string, chr(13) & chr(10) & chr(13) & chr(10), "</p><p>", "all");
      //   string = Replace(string, chr(13) & chr(10), "<br />", "all");
      //   string = string & "</p>";
      //   return string;
    * HtmlEscape in Java, which is compatible with utf-8
    * @author Ulrich Jensen, http://www.htmlescape.net
    * Feel free to get inspired, use or steal this code and use it in your
    * own projects.
    * License:
    * You have the right to use this code in your own project or publish it
    * on your own website.
    * If you are going to use this code, please include the author lines.
    * Use this code at your own risk. The author does not warrent or assume any
    * legal liability or responsibility for the accuracy, completeness or usefullness of
    * this program code.
    function cleantext(string)  {
      private static char[] hex={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};
       * Method for html escaping a String, for use in a textarea
       * @param original The String to escape
       * @return The escaped String
      public static String escapeTextArea(String original)
        return escapeSpecial(escapeTags(original));   
       * Normal escape function, for Html escaping Strings
       * @param original The original String
       * @return The escape String
      public static String escape(String original)
        return escapeSpecial(escapeBr(escapeTags(original)));
      public static String escapeTags(String original)
        if(original==null) return "";
        StringBuffer out=new StringBuffer("");
        char[] chars=original.toCharArray();
        for(int i=0;i<chars.length;i++)
          boolean found=true;
          switch(chars[i])
            case 60:out.append("&lt;"); break; //<
            case 62:out.append("&gt;"); break; //>
            case 34:out.append("&quot;"); break; //"
            default:found=false;break;
          if(!found) out.append(chars[i]);
        return out.toString();
      public static String escapeBr(String original)
        if(original==null) return "";
        StringBuffer out=new StringBuffer("");
        char[] chars=original.toCharArray();
        for(int i=0;i<chars.length;i++)
          boolean found=true;
          switch(chars[i])
            case '\n': out.append("<br/>"); break; //newline
            case '\r': break;
            default:found=false;break;
          if(!found) out.append(chars[i]);
        return out.toString();
      public static String escapeSpecial(String original)
        if(original==null) return "";
        StringBuffer out=new StringBuffer("");
        char[] chars=original.toCharArray();
        for(int i=0;i<chars.length;i++)
            boolean found=true;
          switch(chars[i]) {
            case 38:out.append("&amp;"); break; //&
            case 198:out.append("&AElig;"); break; //Æ
            case 193:out.append("&Aacute;"); break; //Á
            case 194:out.append("&Acirc;"); break; //Â
            case 192:out.append("&Agrave;"); break; //À
            case 197:out.append("&Aring;"); break; //Å
            case 195:out.append("&Atilde;"); break; //Ã
            case 196:out.append("&Auml;"); break; //Ä
            case 199:out.append("&Ccedil;"); break; //Ç
            case 208:out.append("&ETH;"); break; //Ð
            case 201:out.append("&Eacute;"); break; //É
            case 202:out.append("&Ecirc;"); break; //Ê
            case 200:out.append("&Egrave;"); break; //È
            case 203:out.append("&Euml;"); break; //Ë
            case 205:out.append("&Iacute;"); break; //Í
            case 206:out.append("&Icirc;"); break; //Î
            case 204:out.append("&Igrave;"); break; //Ì
            case 207:out.append("&Iuml;"); break; //Ï
            case 209:out.append("&Ntilde;"); break; //Ñ
            case 211:out.append("&Oacute;"); break; //Ó
            case 212:out.append("&Ocirc;"); break; //Ô
            case 210:out.append("&Ograve;"); break; //Ò
            case 216:out.append("&Oslash;"); break; //Ø
            case 213:out.append("&Otilde;"); break; //Õ
            case 214:out.append("&Ouml;"); break; //Ö
            case 222:out.append("&THORN;"); break; //Þ
            case 218:out.append("&Uacute;"); break; //Ú
            case 219:out.append("&Ucirc;"); break; //Û
            case 217:out.append("&Ugrave;"); break; //Ù
            case 220:out.append("&Uuml;"); break; //Ü
            case 221:out.append("&Yacute;"); break; //Ý
            case 225:out.append("&aacute;"); break; //á
            case 226:out.append("&acirc;"); break; //â
            case 230:out.append("&aelig;"); break; //æ
            case 224:out.append("&agrave;"); break; //à
            case 229:out.append("&aring;"); break; //å
            case 227:out.append("&atilde;"); break; //ã
            case 228:out.append("&auml;"); break; //ä
            case 231:out.append("&ccedil;"); break; //ç
            case 233:out.append("&eacute;"); break; //é
            case 234:out.append("&ecirc;"); break; //ê
            case 232:out.append("&egrave;"); break; //è
            case 240:out.append("&eth;"); break; //ð
            case 235:out.append("&euml;"); break; //ë
            case 237:out.append("&iacute;"); break; //í
            case 238:out.append("&icirc;"); break; //î
            case 236:out.append("&igrave;"); break; //ì
            case 239:out.append("&iuml;"); break; //ï
            case 241:out.append("&ntilde;"); break; //ñ
            case 243:out.append("&oacute;"); break; //ó
            case 244:out.append("&ocirc;"); break; //ô
            case 242:out.append("&ograve;"); break; //ò
            case 248:out.append("&oslash;"); break; //ø
            case 245:out.append("&otilde;"); break; //õ
            case 246:out.append("&ouml;"); break; //ö
            case 223:out.append("&szlig;"); break; //ß
            case 254:out.append("&thorn;"); break; //þ
            case 250:out.append("&uacute;"); break; //ú
            case 251:out.append("&ucirc;"); break; //û
            case 249:out.append("&ugrave;"); break; //ù
            case 252:out.append("&uuml;"); break; //ü
            case 253:out.append("&yacute;"); break; //ý
            case 255:out.append("&yuml;"); break; //ÿ
            case 162:out.append("&cent;"); break; //¢
            default:
              found=false;
              break;
          if(!found)
            if(chars[i]>127) {
              char c=chars[i];
              int a4=c%16;
              c=(char) (c/16);
              int a3=c%16;
              c=(char) (c/16);
              int a2=c%16;
              c=(char) (c/16);
              int a1=c%16;
              out.append("&#x"+hex[a1]+hex[a2]+hex[a3]+hex[a4]+";");   
            else
              out.append(chars[i]);
        return out.toString();
    </cfscript>  
    <cfset cleanedtext = cleantext(dirtytext)>
    Although actually I also ended up changing my charset of my tables to utf8 (it was latin_swedish) and that seems to have solved the head issue (with special characters (bullet points i think it was) throwing an error when inserting them in the db)

  • How can i  use  this  java program to access from  a jsp page?

    import java.io.*;
    import java.util.*;
    public class FileProcessing
      //create a vector container  for the input variables
         Vector variables = new Vector();
      //create a vector container for the constants
         Vector constants = new Vector();
      /*create a string expression container for the equation
         as read from the file */
         String expression = " ";
      //create double result container for the final result
         double result = 0;
         public boolean processFile(String filename,String delim)
          //index for values vector
              int num_values = 0;
          //index for constants vector
              int num_constants = 0;
          //current line being read from the external file.
              String curline = " ";
          //start reading from the external file
              try
                   FileReader fr = new FileReader(filename);
                   BufferedReader br = new BufferedReader(fr);
                   while(true)
                        curline = br.readLine();
                        if(curline == null)
                             break;
                    //determine the type of current interaction
                        boolean variable = curline.startsWith("input");
                        boolean constant = curline.startsWith("constant");
                        boolean equation = curline.startsWith("equation");
                        boolean output = curline.startsWith("result");
                   //on input variables
                        if(variable)
                          StringTokenizer st = new StringTokenizer(curline,delim);
                          int num = st.countTokens();
                          int count=0;
                          while(st.hasMoreTokens())
                               String temp = st.nextToken();
                               if(count==1)
                                    byte b[]= new byte[100];
                                    System.out.println(temp);
                                    System.in.read(b);
                                    String inputval = (new String(b)).trim();
                                    variables.add(num_values,inputval);
                                    num_values++;
                               count++;
                        // on constant values
                        if(constant)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==1)
                                       byte b[]= new byte[100];
                                       System.out.println(temp);
                                       System.in.read(b);
                                       String cons = (new String(b)).trim();
                                       constants.add(num_constants,cons);
                                       num_constants++;
                                  count++;
                        // on equation
                        if(equation)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==2)
                                       this.expression = temp;
                                  count++;
              // now we are ready to evaluate the expression
                       if(output)
                          org.nfunk.jep.JEP  myparser= new org.nfunk.jep.JEP();
                          myparser.setAllowAssignment(true);
                          for(int i=1;i<variables.size()+1;i++)
                             String name = "arg"+Integer.toString(i);
                             myparser.addVariable(name,new Double(variables.get(i-1)
                                                .toString()).doubleValue());
                          for(int i=1;i<constants.size()+1;i++)
                               String name = "arg" +Integer.
                                         toString(i+variables.size());
                               myparser.addConstant(name,new Double(constants.get(i-1).toString()));
                   //output is obtained as follows
                          myparser.parseExpression(expression);
                          result = myparser.getValue();
                          System.out.println("Assay value: "+result);
              catch(Exception e)
                   System.out.println(e.toString());
              return true;
         public static void main(String[] args)
              FileProcessing fp = new FileProcessing();
              fp.processFile("input.eqn",":");
    }here i need to generate the strings like 'enter value1' and respective text boxes dynamically . i should use this java program as business logic and a jsp page for view.
    following given is my text file input.eqn
    input:enter value1:arg1
    input:enter value2:arg2
    input:enter value3:arg3
    constant:enter constant1:arg4
    constant:enter constant2:arg5
    equation:enter equation:(arg1+arg2)*(arg3+arg4)*arg5
    result:

    Why do you double post ? http://forum.java.sun.com/thread.jspa?threadID=646988&tstart=0
    Why dint that answer satisfy you ? And why dint you say so in that thread rather than posting the same question again ?
    ram.

  • How can i  apply this  java program for  a jsp page?

    import java.io.*;
    import java.util.*;
    public class FileProcessing
      //create a vector container  for the input variables
         Vector variables = new Vector();
      //create a vector container for the constants
         Vector constants = new Vector();
      /*create a string expression container for the equation
         as read from the file */
         String expression = " ";
      //create double result container for the final result
         double result = 0;
         public boolean processFile(String filename,String delim)
          //index for values vector
              int num_values = 0;
          //index for constants vector
              int num_constants = 0;
          //current line being read from the external file.
              String curline = " ";
          //start reading from the external file
              try
                   FileReader fr = new FileReader(filename);
                   BufferedReader br = new BufferedReader(fr);
                   while(true)
                        curline = br.readLine();
                        if(curline == null)
                             break;
                    //determine the type of current interaction
                        boolean variable = curline.startsWith("input");
                        boolean constant = curline.startsWith("constant");
                        boolean equation = curline.startsWith("equation");
                        boolean output = curline.startsWith("result");
                   //on input variables
                        if(variable)
                          StringTokenizer st = new StringTokenizer(curline,delim);
                          int num = st.countTokens();
                          int count=0;
                          while(st.hasMoreTokens())
                               String temp = st.nextToken();
                               if(count==1)
                                    byte b[]= new byte[100];
                                    System.out.println(temp);
                                    System.in.read(b);
                                    String inputval = (new String(b)).trim();
                                    variables.add(num_values,inputval);
                                    num_values++;
                               count++;
                        // on constant values
                        if(constant)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==1)
                                       byte b[]= new byte[100];
                                       System.out.println(temp);
                                       System.in.read(b);
                                       String cons = (new String(b)).trim();
                                       constants.add(num_constants,cons);
                                       num_constants++;
                                  count++;
                        // on equation
                        if(equation)
                             StringTokenizer st = new StringTokenizer(curline,delim);
                             int num = st.countTokens();
                             int count = 0;
                             while(st.hasMoreTokens())
                                  String temp = st.nextToken();
                                  if(count==2)
                                       this.expression = temp;
                                  count++;
              // now we are ready to evaluate the expression
                       if(output)
                          org.nfunk.jep.JEP  myparser= new org.nfunk.jep.JEP();
                          myparser.setAllowAssignment(true);
                          for(int i=1;i<variables.size()+1;i++)
                             String name = "arg"+Integer.toString(i);
                             myparser.addVariable(name,new Double(variables.get(i-1)
                                                .toString()).doubleValue());
                          for(int i=1;i<constants.size()+1;i++)
                               String name = "arg" +Integer.
                                         toString(i+variables.size());
                               myparser.addConstant(name,new Double(constants.get(i-1).toString()));
                   //output is obtained as follows
                          myparser.parseExpression(expression);
                          result = myparser.getValue();
                          System.out.println("Assay value: "+result);
              catch(Exception e)
                   System.out.println(e.toString());
              return true;
         public static void main(String[] args)
              FileProcessing fp = new FileProcessing();
              fp.processFile("input.eqn",":");
    }//my text file name is: "input.eqn" (given below)
    input:Enter Value1:arg1
    input:Enter Value2:arg2
    input:Enter Value3:arg3
    constant:arg4
    constant:arg5
    Equation:arg1+arg2+arg3
    result:

    how can i apply this java program for a jsp pagewhy do you want to do this ?
    Your program reads from a file on the disk and formats based on a patterm.
    Jsp is not intended for such stuff.
    ram.

  • What is wrong in this java code?

    Can someone please tell me what is wrong in this java code?
    /* The program is intended to start animating text at the click of a button, pause it at another click and resume at the next click. It should continue like this */
    import javax.swing.*;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TextAnime implements Runnable
    JFrame frame;
    boolean flag;
    Thread animeThread;
    JLabel label;
    String[] textArray;
    public TextAnime()
    flag = false;
    animeThread = new Thread(this);
    frame = new JFrame("Animate Text");
    GridBagLayout gbl = new GridBagLayout();
    GridBagConstraints gbc = new GridBagConstraints();
    frame.setLayout(gbl);
    JButton button = new JButton("Start");
    label = new JLabel("Stopped");
    textArray = new String[5];
    String textArray1[] = {"Programmer", "SportsMan", "Genius", "Friend", "Knowledgable"};
    for(int ctr = 0; ctr<5 ; ctr++)
    textArray[ctr] = textArray1[ctr];
    gbc.weightx = 1;
    gbc.gridx = 0;
    gbl.setConstraints(button,gbc);
    frame.getContentPane().add(button);
    ButList bl = new ButList();
    button.addActionListener(bl);
    gbc.gridx = 1;
    gbl.setConstraints(label,gbc);
    frame.getContentPane().add(label);
    frame.setSize(200,150);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
    frame.setVisible(true);
    public class ButList implements ActionListener
    public void actionPerformed(ActionEvent evt)
    if(flag == false)
    flag = true;
    animeStart();
    else
    flag = false;
    //animeStop();
    public synchronized void animeStart()
    animeThread.start();
    Thread newThread;
    newThread = Thread.currentThread();
    newThread.notify();
    public void animeStop()
    animeThread.interrupt();
    public void run()
    int i = 0;
    try
    while(i == i)
    if(i==5)
    i=0;
    label.setText(textArray);
    animeThread.sleep(1000);
    i++;
    if (flag == false)
    animeThread.wait();
    catch(InterruptedException ie)
    label.setText("Stopped");
    public static void main(String args[])
    TextAnime ta = new TextAnime();
    Please tell me if this can be written in a more simpler manner. Also please correct this code. I am tired after trying many times.

    When I fix your error, compile and run it, I get this exception:
    Exception in thread "AWT-EventQueue-0" java.lang.IllegalMonitorStateException
         at java.lang.Object.notify(Native Method)
         at cruft.TextAnime.animeStart(TextAnime.java:81)
         at cruft.TextAnime$ButList.actionPerformed(TextAnime.java:63)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6038)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
         at java.awt.Component.processEvent(Component.java:5803)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4410)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2429)
         at java.awt.Component.dispatchEvent(Component.java:4240)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    %

  • Install Error: "Invocation of this Java Application has caused an InvocationTargetException"

    Hi
    I am installing Weblogic v 6.0 sp2 on Sun Solaris 8 on executing the command "
    sh weblogic600sp2_sol.bin -i console" the installation starts and after selecting
    the language as English, console displays the following error and the installation
    stops, please advice
    "Invocation of this Java Application has caused an InvocationTargetException.
    This application will now exit. (LAX)
    Stack Trace:
    java.lang.NullPointerException
    at java.util.StringTokenizer.<init>(StringTokenizer.java:122)
    at java.util.StringTokenizer.<init>(StringTokenizer.java:138)
    at com.zerog.ia.installer.steps.ChooseJavaVM.j([DashoPro-V1.2-120198])
    at com.zerog.ia.installer.steps.ChooseJavaVM.c([DashoPro-V1.2-120198])
    at com.zerog.ia.installer.Main.a([DashoPro-V1.2-120198])
    at com.zerog.ia.installer.Main.main([DashoPro-V1.2-120198])
    at java.lang.reflect.Method.invoke(Native Method)
    at com.zerog.lax.LAX.launch([DashoPro-V1.2-120198])
    at com.zerog.lax.LAX.main([DashoPro-V1.2-120198])
    GUI-"
    Has someone faced similar problem before? I have also tried installing the WebLogic
    Server 6.1 as well but I get the same error.
    Thanks and Regards
    Kapil Singh Pawar

    Hi.
    What jdk version is currently installed on your solaris 8 machine? If it is not
    already a 1.3.x version I suggest you install that first and put the bin directory in
    your path. You might also check with Sun to see if there are any relevant OS patches
    required by your jdk (or jdk 1.3.1) in order to run.
    Regards,
    Michael
    Kapil Pawar wrote:
    Hi
    I am installing Weblogic v 6.0 sp2 on Sun Solaris 8 on executing the command "
    sh weblogic600sp2_sol.bin -i console" the installation starts and after selecting
    the language as English, console displays the following error and the installation
    stops, please advice
    "Invocation of this Java Application has caused an InvocationTargetException.
    This application will now exit. (LAX)
    Stack Trace:
    java.lang.NullPointerException
    at java.util.StringTokenizer.<init>(StringTokenizer.java:122)
    at java.util.StringTokenizer.<init>(StringTokenizer.java:138)
    at com.zerog.ia.installer.steps.ChooseJavaVM.j([DashoPro-V1.2-120198])
    at com.zerog.ia.installer.steps.ChooseJavaVM.c([DashoPro-V1.2-120198])
    at com.zerog.ia.installer.Main.a([DashoPro-V1.2-120198])
    at com.zerog.ia.installer.Main.main([DashoPro-V1.2-120198])
    at java.lang.reflect.Method.invoke(Native Method)
    at com.zerog.lax.LAX.launch([DashoPro-V1.2-120198])
    at com.zerog.lax.LAX.main([DashoPro-V1.2-120198])
    GUI-"
    Has someone faced similar problem before? I have also tried installing the WebLogic
    Server 6.1 as well but I get the same error.
    Thanks and Regards
    Kapil Singh Pawar--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Please test this Java Test Applet on n900

    I would be so greatful if someone could indicate whether this java applet runs on the n900?
    Oanda Java Test Applet

    Some people have used http://www.microemu.org/ to run opera, but it is in no way supported and therefore no way easy to use!
    It might improve in the future, but it doesn't seem to be on the immediate roadmap.. There isn't a microb plugin to support Java because there is not JRE that supports native maemo controls.. The windowing tool kit is too different

  • HT5493 so do I need this Java OS X 2012-006 update or no?

    so do I need this Java OS X 2012-006 update or no?

    The operative words from that article are:
    "This update also removes the Java Preferences application, which is no longer required to configure applet settings," the support note concludes.
    (My bold)
    In other words, the security risks of using Java have been removed, but without loss of functionality.
    If you feel you must jave Java you can get it from here:
    http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1637588.h tml
    Further information here:
    http://www.oracle.com/us/corporate/press/1735645

  • I uninstalled Java get this messag - Missing JAVA? For your safety, Firefox has disabled your outdated version of Java. Please upgrade to the latest version.

    I am using Windows 7 premium 64-bit. I have uninstalled Java completely through Windows program manager. There is no Java in my list of plugins. Every time I update my plugins I get the following message - "Missing JAVA? For your safety, Firefox has disabled your outdated version of Java. Please upgrade to the latest version." I cannot find Java anywhere on my computer. Checked every troubleshooting website I can find but there seems to be no solution.

    hello, is this happening on the plugin-check page - https://www.mozilla.org/plugincheck/ ?
    if so, you can probably safely dismiss this warning since it's likely a mistake. when java isn't present, the site will give that warning message though a webpage cannot detect if this because of java being blocked or if it isn't even installed on the system.

  • I am trying to get this java program to work

    I need your help, I am trying to get this java program to work. The program is long and massive, but I got stuck in the last point where the program checks if there are a double quotes or a comma in a string.
    The string is an URL retrieved from XML files (this is already done).
    There are 4 conditions:
    Case 1
    =====
    The URL string is of invalid format and contains no commas (,) and no double quotes (").
    Make no changes to the URL string.
    Case 2
    =====
    The URL string is of invalid format and contains 1 or more double quotes (") but no commas.
    Make no changes to the URL string.
    Case 3
    =====
    The URL string is of invalid format and contains 1 or more commas (,) but no double quotes.
    Modify the URL string so that it starts and ends with a double quote (").
    Case 4
    =====
    The URL string is of invalid format and contains 1 or more double quotes (") and one or more commas (,).
    Modify the URL string so that every double quote (") becomes a double double quote (""), and so that it starts and ends with a double quote (").
    ======
    then write the modified URL string to the CSV file.
    ======
    Examples:
    1. hello ---> hello
    2. hello "big" world ---> hello "big" world
    3. hello, world ---> "hello, world"
    4. hello "big,big" world ---> "hello ""big,big"" world"

    You can do the searching with String.indexOf() and then you can make replacements (like " with "") with String.replaceAll().
    As for adding leading and trailing ", that could be done with simple concatenation.

  • I'm updating my plugins and java platform says Firefox is 32 bit. Is this correct? I'm running Windows7 home premium 64 bit.

    At the java update site it says my Firefox 4 is 32 bit and I will have to download both the 32 and 64 bit versions. I have IE9 which is both 32 and 64 bit versions. My primary browser is Firefox 4. My OS is Windows Home premium 64bit. I personally have no problem with the 32 bit but I am curious to know.

    Flash Player is a browser add-on, not an executable program.
    If you need to open a local SWF file you will need the standalone player (Projector) from http://www.adobe.com/support/flashplayer/downloads.html
    Note that the download is the player, not an installer, so you will need to make the file association manually.

Maybe you are looking for

  • Dropdown Lisx box in servlets

    HI, I have a servlet with dropdown list box and text item. Whenever i choose the value based on that I have to display some data below the these Items.( Dropdown and Text item). The input in the text item will search in the below diplayed data and re

  • Sharepoint Foundation 2013 - Conditional formatting

    Hey all, I'm trying to pull of conditional formatting for the outcome of a "Yes or No" column within a Custom List, however all the searching I have done shows that it seems to have been removed in Sharepoint 2013 without using a Jquery (I'm having p

  • Outbound ucce 7.5.8 webview

    Hello I need Help! can anyone tell me me if that field or account number is possible to shown in Layout of ctios toolkit agent for campaign outbound? exist any reports of outbound with AHT statistics? what reports exist for to says a supervisors of r

  • [SOLVED] Mpd and sonata doesn't seem to work

    Hi guys! I 'm facing with an issue . I can't seem to configure mpd correctly to run it with sonata . I've followed the alternative setup from archwiki and this is my config file . # An example configuration file for MPD # See the mpd.conf man page fo

  • What's  GOING ON???. New iTunes and now I can't update my iTouch

    What is going on. My 2nd Gen iTouch is freezing with the new iTunes! I can NOT update the iTiuch to the new 4.1 operating system. It freezes when it starts with the initial backup before intalling the firmware. Anyone know fix?????