Variable not initializing

I have a class that is parsing the standard date string to extract each discrete element using StringTokenizer. There is two loops with a switch. The first loop looks for tokens separated by spaces; the second loop looks for the colons in the time part of the date.
The second StringTokenizer is bombing with the compiler error, as follows:
variable strTime might not have been initialized
StringTokenizer st2 = new StringTokenizer( strTime, ":" );The println in the first switch shows that strTime does hold the date.
Any ideas about how to work around this problem? The class code follows:
     public     DateElements getDateElements( Date baseDate, String szPattern, DateElements datel )     {
          String szBuf;
          String strDate;
          String strTimeZone;
          int token;
          String strTime;
          // get the string date and tokenize its elements
          // Mon Feb 25 16:00:00 EST 2002
          // 1 2 3 4 5 6
          strDate = baseDate.toString( );
          StringTokenizer st = new StringTokenizer( strDate );
          token = 1;
          while( st.hasMoreTokens( ) )     {
               szBuf = st.nextToken( );
               switch( token++ )     {
               case 1:               // string Day of week
                    datel.setDayOfWeek( szBuf );
                    break;
               case 2:               // string month
                    datel.setMonth( szBuf );
                    break;
               case 3:               // numeric date
                    datel.setDate( Integer.parseInt( szBuf) );
                    break;
               case 4:               // Time
                    strTime = szBuf;
                    break;
               case 5:               // Time Zone
                    strTimeZone = szBuf;
                    break;
               case 6:               // Year
                    datel.setYear( Integer.parseInt( szBuf ) );
                    break;
          StringTokenizer st2 = new StringTokenizer( strTime, ":" );
          token = 1;
          while( st2.hasMoreTokens( ) )     {
               szBuf = st2.nextToken( );
               switch( token++ )     {
               case 1:               // st2ring Hour
                    datel.setDayOfWeek( Integer.parseInt( szBuf ) );
                    break;
               case 2:               // st2ring Minute
                    datel.setMonth( Integer.parseInt( szBuf ) );
                    break;
               case 3:               // numeric Second
                    datel.setDate( Integer.parseInt( szBuf) );
                    break;
          return( datel );
TIA,
James
P.S. If anyone can tell me how to make these code snippets maintain the indentation, I'd appreciate it. I've tried both tables and spaces.

try to put in the declaration of the variable
String myString = null;
and the warning message will disapear and your code will work. This message if thrown by the compiler because could be possible that the variable you mentioned would not be inicialized (because the assigment statement is in the case statement the compiler cannot assure it will be executed before you use to declare the StringTokenizer).
To post code here you should use the speacial tokens that are mentioned in the "post" pages. I suggest to watch at them.
Hope this helps
Zerjio

Similar Messages

  • Very small problem RE: Variable not initializing

    //Hey, folks! Having a small problem here. Compiler keeps telling me that "result" variable may not have been initialized for this method. This is probably an issue of variable scope? It's staring me in the face and I can't see the problem. Can you see the problem?      
    public Shape randomShape()
              Random generator = new Random();
              intShapeDecider = generator.nextInt(3);
              int intCrdntX1 = generator.nextInt(500);
              int intCrdntY1 = generator.nextInt(500);
              int intCrdntX2 = generator.nextInt(500);
              int intCrdntY2 = generator.nextInt(500);
              int intWidth = Math.abs(intCrdntX1 - intCrdntX2);
              int intHeight = Math.abs(intCrdntY1 - intCrdntY2);
              Shape result;
              if (intShapeDecider == 0)
                   result = new Line2D.Double(intCrdntX1,intCrdntY1,intCrdntX2,intCrdntY2);
              else if (intShapeDecider == 1)
                   result = new Rectangle(intCrdntX1,intCrdntY1,intWidth,intHeight);
    else if (intShapeDecider == 2)
              result = new Ellipse2D.Double(intCrdntX1,intCrdntY1,intWidth,intHeight);
              return result;
         }

    Nope...don't think that's the problem. My random ints are only 3 possible nums ...0,1, or 2. I have an if for each possible condition. Therefore, nothing "else" can really happen. No?

  • Variable not initialized problem

    This code had been taken from my teacher's website. However, There seems to be an error in her work. It keep telling me that inputFile has not been initialize.
    for the temps.txt file as input:
    101 113 87 97 95 111 107
    I have saved the temps.txt file in the same directory as the test.java directory.
    import java.io.*;
    import java.util.*;
    public class test {
        public static void main(String[] args) {
            Boolean fileOpened = true;
            Scanner inputFile;
            String fileName;
            Scanner input = new Scanner(System.in);
            System.out.print("Please input the name of the file to be opened: ");
            fileName = input.nextLine();
           System.out.println();
            try {
                inputFile = new Scanner(new File(fileName));
            catch (FileNotFoundException e) {
                System.out.println("--- File Not Found! ---");
                fileOpened = false;
            if(fileOpened) {
                int temp1 = inputFile.nextInt();
                while (inputFile.hasNextInt()) {
                    int temp2 = inputFile.nextInt();
                    System.out.println("Temperature changed by " + (temp2 - temp1) + " deg. F");
                    temp1 = temp2;
                inputFile.close();
    }Please can someone help me?
    I have an assignment coming up soon, and the way this teacher teaches doesn't makes sense to me.

    I sorry, I see the error in the solution now. How would I fix that line.
    I referred to another program my teacher wrote to change the one above.
    import java.io.*;
    import java.util.*;
    public class Lab9_1_2 {
        public static void main(String[] args){
            Boolean fileOpened = true;
            String fileName;
            Scanner inputFile = new Scanner(System.in);
            int num, sum = 0, count = 0;
            System.out.print("Please input the name of the file to be opened: ");
            fileName = inputFile.nextLine();
            System.out.println();
            try {
                inputFile = new Scanner(new File(fileName));
            catch (FileNotFoundException e) {
                System.out.println("--- File Not Found! ---");
                fileOpened = false;
            if(fileOpened) {
                while(inputFile.hasNext()) {
                    if(inputFile.hasNextInt()) {
                        num = inputFile.nextInt();
                        count++;
                        System.out.println("Number # " + count + " is: " + num);
                        sum = sum + num;
                    else
                        inputFile.next(); //consume unwanted input
            if(count != 0) {
                System.out.print("The average of " + count + " numbers/file = ");
                System.out.printf("%.2f\n", (double)sum / count);
            else
                System.out.println("The file doesn't contain any integers. Exit program!");
            inputFile.close();
    }As you can see the same Scanner part is used. Again, I'm a beginner, so try to dumb down your reply for me.
    Also, the terms of the assignment is, it must you try and catch.
    Edited by: acastelino2001 on Apr 22, 2010 1:00 AM

  • Constructor not initializing variables

    Hi,
    I have a little dilemma with initializing variables. I have an abstract class that provides an abstract initialize method. It calls this first in its constructor. Now all concrete classes that extend from this abstract class must implement this initialize method. This method will initialize all the variables needed by the concrete class. However, these variables return null. Its best if I coded an example scenario:
    ###### Abstract Class #######
    public abstract class AbstractClass {
    protected Date date = null;
    protected AbstractClass(Date date) {
    initialize();
    this.date = date;
    protected abstract void initialize();
    ##### Concrete class #####
    public class ConcreteClass extends AbstractClass {
    protected Map test = null;
    public ConcreteClass(Date date) {
    super(date);
    System.out.println( "test 1 = " + test);
    test = new HashMap();
    System.out.println( "test 2 = " + test);
    protected void initialize() {
    test = new HashMap();
    Now if I instantiated the ConcreteClass, I would expect to get this output:
    test 1 = java.util.HashMap@123456f
    test 2 = java.util.HashMap@654321f
    However I get this:
    test 1 = null
    test 2 = java.util.HashMap@654321f
    Now why would test 1 = null? Didn't it already get initialized after the call to super?
    Any help would be appreciated. Thanks!
    -los

    I have a more detailed scenario:
    ###### Abstract Class #######
    public abstract class AbstractClass {
    protected Date date = null;
    protected AbstractClass(Date date) {
    initialize();
    this.date = date;
    protected abstract void initialize();
    ##### Concrete class #####
    public class ConcreteClass extends AbstractClass {
    protected Map test = null;
    public ConcreteClass(Date date) {
    super(date);
    System.out.println("3: this class = " + this);
    System.out.println( "4: test 1 = " + test);
    test = new HashMap();
    System.out.println( "5: test 2 = " + test);
    protected void initialize() {
    System.out.println( "1: class = " + this)
    test = new HashMap();
    System.out.println( "2: test = " + test);
    The output comes out to be:
    1: class = ConcreteClass@fec107
    2: test = java.util.HashMap@123ews
    3: this class = ConcreteClass@fec107
    4: test 1 = null
    5: test 2 = java.util.HashMap@des312
    As you can see, the initialize method does indeed get called for the concrete class... and the test variable gets initialized. So I'm not sure what happened...
    -los

  • Can't receive headers from JMS Adapter - "Variable is not initialized"???

    I'm using JDeveloper Studio 10.1.3.4.0.4270 to try to build a BPEL process that is initiated by a JMS Adapter. I want this process to access the headers of the incoming message. Despite what Adapter Technical Note #005 says, JDeveloper says I can't do it! Despite the fact that the Receive activity is set up to store the header to a variable, JDeveloper says the variable is not initialized when I try to access it. (At least this is consistent with BPEL Process Manager's behavior -- the runtime also says it's not initialized.) In the following simple code, it looks initialized to me. What am I missing? Thanks.
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
      Oracle JDeveloper BPEL Designer
      Created: Mon Jun 22 18:10:17 CDT 2009
      Author:  memeyer
      Purpose: Empty BPEL Process
    -->
    <process name="BPELHello3" targetNamespace="http://xmlns.oracle.com/BPELHello3"
             xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
             xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
             xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
             xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/jms/ToHello3/"
             xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/jms/"
             xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
             xmlns:client="http://xmlns.oracle.com/BPELHello3"
             xmlns:ora="http://schemas.oracle.com/xpath/extension"
             xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
      <!--
          PARTNERLINKS                                                     
          List of services participating in this BPEL process              
      -->
      <partnerLinks>
        <partnerLink myRole="Consume_Message_role" name="ToHello3"
                     partnerLinkType="ns1:Consume_Message_plt"/>
      </partnerLinks>
      <!--
          VARIABLES                                                       
          List of messages and XML documents used within this BPEL process
      -->
      <variables>
        <variable name="inputVariable"
                  messageType="ns1:BPELHello2ProcessResponse_msg"/>
        <variable name="header" messageType="ns2:InboundHeader_msg"/>
      </variables>
      <!--
         ORCHESTRATION LOGIC                                              
         Set of activities coordinating the flow of messages across the   
         services integrated within this business process                 
      -->
      <sequence name="main">
        <receive name="Receive_1" partnerLink="ToHello3"
                 portType="ns1:Consume_Message_ptt" operation="Consume_Message"
                 variable="inputVariable" createInstance="yes"
                 bpelx:headerVariable="header"/>
        <assign name="Assign_1">
          <copy>
            <from variable="header" part="inboundHeader"
                  query="/ns2:JMSInboundHeadersAndProperties/ns2:JMSInboundProperties"/>
            <to variable="header" part="inboundHeader"
                query="/ns2:JMSInboundHeadersAndProperties/ns2:JMSInboundProperties"/>
          </copy>
        </assign>
        <bpelx:exec name="Java_Embedding_1" language="java" version="1.3">
          <![CDATA[/*Write your java code below e.g. 
         System.out.println("Hello, World");
    System.out.println("Hello, Whatever");]]>
        </bpelx:exec>
      </sequence>
    </process>

    Hi,
    Your code looks correct to me. However, you should name your durable subscriber: topicSession.createDurableSubscriber(topic, "myDurableSubscriber");
    Then it should be possible to use your JMS provider administration API to check that your durable subscriber is registered with your topic. Once the durable subscriber is registered it will start receiving message.
    To double check that your code is correct, you should test your code with another provide.
    Hope this helps
    Arnaud
    www.arjuna.com

  • What's the difference between a not-initialed object and a null object

    hi guys, i wanna know the difference between a not-initialed object and a null object.
    for eg.
    Car c1;
    Car c2 = null;after the 2 lines , 2 Car obj-referance have been created, but no Car obj.
    1.so c2 is not refering to any object, so where do we put the null?in the heap?
    2.as no c2 is not refering to any object, what's the difference between c2 and c1?
    3.and where we store the difference-information?in the heap?

    For local variables you can't have "Car c1;" the compiler will complain.That's not true. It will only complain if you try to use it without initializing it.
    You can have (never used, so compiler doesn't care):
    public void doSomething()
       Car c1;
       System.out.println("Hello");
    }or you can have (definitely initialized, so doesn't have to be initialized where declared):
    public void doSomething(boolean goldClubMember)
       Car c1;
       if (goldClubMember)
           c1 = new Car("Lexus");
       else
           c1 = new Car("Kia");
       System.out.println("You can rent a " + c1.getMake());
    }

  • Ensuring that variable is initialized only once in a movieclip

    Guys, what is the way to ensure that variable is initialized only once in each instance of a movieclip?
    I tried:
    if (!isLocked)
        trace("setting up isLocked variable");
          var isLocked:Boolean = new Boolean(false);//I need this variable to be initialized only once for each instance of this movieclip and to value of false
    but this doesn't work.
    Any ideas?

    Note that new Boolean() makes zero sense. And this is the beef I have with the convention of checking for existence with !someVariable. Because inexperienced programmers will use that logic with Boolean (which always exists if you're checking it, but is either true or false) or Numbers, which might exist with a value of zero and will make that expression false.
    Try
    if (!this.hasOwnProperty('isLocked')) {
         var isLocked:Boolean = true;
    This may not work because of variable hoisting in AS. It's hard to know what the addFrameScript code will do to this in the background.
    Note that you can avoid this by using a proper Class with accessors and mutators and avoiding timeline code.

  • BPC 7.5 NW - Error Object variable or With block variable not set ?

    Hi, we have BPC 7.5 NW SP07.
    I am getting an error "object variable or with block variable not set" while trying to submit data through an Input schedule
    I went to the Excel Options --> Add-Ins --> COM Add-ins, disable and enable but not working.
    I look in ST22 some errors:
    TSV_TNEW_BLOCKS_NO_ROLL_MEMORY
    TSV_TNEW_PAGE_ALLOC_FAILED
    Error was initial in last days.
    Any idea ?

    Hi Vitoto,
    The problem is not with BPC Excel, but with Memory. I think there is no sufficient memory available in your system.
    Please check SAP Notes 20527 & 369726 for the dump that you are getting in ST22.
    Regards,
    Raghu

  • 64-bit compilation problem on Solaris/Intel: 7th argument not initialized

    I have a problem when compiling a program on a 64-bit Solaris Intel server. The problem is that when calling a function, if the 7th or next arguments are long arguments and I pass uncasted small integers values to it, the first 32-bit of my values are uninitialized.
    I have isolated the problem in the following source code.
    #include <stdio.h>
    #include <strings.h>
    void fnc1(a,b,c,d,e,f,g,h)
    long a,b,c,d,e,f,g,h;
    printf("%ld,%ld,%ld,%ld,%ld,%ld,%ld,%ld\n", a,b,c,d,e,f,g,h);
    void main()
    fnc1(0x10101010deadbeef,0x20202020deadbeef,
         0x30303030deadbeef,0x40404040deadbeef,
         0x50505050deadbeef,0x60606060deadbeef,
         0x70707070deadbeef,0x80808080deadbeef);
    fnc1(1,2,3,4,5,6,7,8);
    }I compile it using the following command:
    cc src1.c -g $* -m64 -o prog1.exeWhen I run the resulting .exe, I get the following result:
    1157442768875667183,2314885534015405807,3472328299155144431,4629771064294883055,5787213829434621679,6944656594574360303,8102099359714098927,-9187201948855714065
    1,2,3,4,5,6,8102099355978170375,-9187201952591642616The problem is that the first 32 bits of my 7th and 8th arguments are not initialized when the function is called.
    I know that in the following cases, I do not have the problem:
    - if I cast the arguments;
    - on other platforms (AIX, SunOs/Sparc, HPUX) or if I compile in 32-bit;
    - if I use optimization (-xO1 to -xO5) ;
    - if I prototype my function at the beginning of my source (void fnc1(long a,long b,long c,long d,long e,long f,long g,long h););
    I have over 1,000,000 lines of existing code to support. I am afraid using optimization would have other impacts and for now, I cast the arguments as problems are reported. Would there be a better way to handle this? By using a compiler switch?
    Thanks in advance.

    Tom.Truscott wrote:
    clamage45 wrote:
    But if you are passing to an ellipsis, you either cast actual arguments to the type the function expects, or the function extracts the default promoted type. Such code always works ...Yes, and developers should attempt to accomplish just that. Alas this is very difficult to ensure, particularly given the lack of a run-time type checking mechanism.In theory, proper use of the ellipsis function would be documented, and programmers would read and follow the documentation. In practice, some programmers don't read the instructions, or forget them, or someone ill-advisedly changes the way the function works so that existing calls stop working. Variable-argument functions are a fragile mechanism. (I program almost exclusively in C++, which has combinations of features such that variable-argument functions are rarely, if ever, needed.)
    Can one even assume that the value of the NULL macro is correct? Never, because the C standard allows a variety of definitions for NULL, and implementations vary. Passing NULL to an ellipsis is a recipe for failure. Don't do it.
    >
    Suppose you have function FI with an ellipsis that expects to get int arguments, and another FL that expects to get long arguments. When you port the code to a 64-bit environment, function FL fails. If you use the -signext option, function FI will fail.Ah, but for us FL never fails, since the compilers always widen the arguments. I fail to see the circumstance in which widening would cause FI to fail, could you please give a more specific example?
    void FI(int count, ...)
        va_list va;
        va_start(va, count);
        int t;
        while( --count >= 0) {
           t = va_arg(va, int);
           do_something(t);
    }Function FI expects to extract 32-bit int arguments. If compiled with -signext, the calling function will pass 64-bit arguments. Perhaps the -signext option also causes the 32-bit extraction to be changed to a 64-bit extraction. I have no personal experience with the option, and I'm not in a position where I can experiment right now.

  • Selection variable not working properly on portal

    Hi,
    We have a report in which Survey is a selection variable(Not a mandatory variable). If I select Two or more surveys simultaneosuly in the initial selection screen, then the Portal is not displaying the data. PFB screenshot of the selection.
    If I select the same two surveys individually in the selection screen, then the portal outputs the result. If I execute without selecting any survey and then apply a filter (after the output is generated) for those two surveys together, then also the data is displayed properly.
    Kindly note that this report is being used by German users and the problem exists only when the Language preferences of the portal is changed to German. With English Language Preferance, the selection variable works properly.
    Please suggest if anybody has faced a similar issue
    Regards,
    Keerthan

    Hi Lakshmi,
    The texts are maintained for those survey values and even with German Language Key, still not getting the output.
    If i select them individually, then I am getting the output.
    For instance, I have selected the surveys "0000084001" and "0000090001" together in the selection screen(I have inserted the Pic in the original post, but i am sorry it is not clear in that) and not getting the output or it hungs up in the execution state.
    If i select the same survey "0000084001" only, then I get the output.
    This is the same case when I select only "0000090001".
    This scenario is only with German Preferance.
    If i change the preferance to English and select these two surveys together, then it outputs the result.
    Regards
    Keerthan

  • Initial & Not initial

    Hi Experts ,
    Im having one doubt in Internal tables .
    i.e.   1.  what is the diff between inital & not initial ..
           2.  wat are all the advantages ?
           3.  need an example ?
    Regards ,
    Narayana Murthy

    Hi,
    Initial value is the value any variable takes based on the type.
    If u declare a char variable of type c the initial value is ' ' (space)
    So if u check if the variable is initial u can check if the value of the variable is space. Thus u ll know if it has been changed after it has been declared.
    Similarly var NOT INITIAL will check if the variable has been assigned any value after it has been declared or not.
    For example see help.sap link below:
    http://help.sap.com/saphelp_webas620/helpdata/en/fc/eb353d358411d1829f0000e829fbfe/frameset.htm
    Regards,
    Aparna

  • Applett not initialized

    I am running a web applicaiton on a windows xp machine and for this one particular user cannot open the application. I have tried logging him onto another computer and still get the same results. I have been able to successfully log on as myself and launch the program - so it must be somewhere in his user profile. But where? This is what the java trace says:
    Java(TM) Plug-in: Version 1.3.1_06
    Using JRE version 1.3.1_06 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\gbennett
    Proxy Configuration: no proxy
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    q: hide console
    s: dump system properties
    t: dump thread list
    x: clear classloader cache
    0-5: set trace level to <n>
    java.lang.NoClassDefFoundError: symantec/itools/lang/Context
         at com.necho.navigater.applications.signon.client.NavLauncher.init(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    All instance variables are initialized...This is not a requirement of the JLS in all cases and cannot be relied upon when not required
    if they are
    primitives they are set to zero or "" if it is a
    string.Strings are objects, in situation where a default is called for then null is used for all objects regardless of class.
    All objects get their default constructors
    called.No, there is no guarantee that a class has a default constructor available to be called, see the answer to your previous statement about default String assignment

  • VTAP+ is not initialized

    VTAP+ is not initialized. get this message after installing fingerprint software update

    Robert,
    Its just a warning, like everyone said! If you want the warning to vanish, prior to the transformation, in some assign activity, make sure that you set some value (for any of the fields) in that variable; your warning should subsequently vanish. In transformations, you are setting only a subset of the fields of the variable with a set of values either from the input or predefined set of values! If the subset covers the entire set of values, the variable gets initialized! See the example below.
    Try this scenario:
    #1 assume a message with the following structure,
    <message>
    <name> ... </name>
    <designation> ... </designation>
    </message>
    #2 Using a transform activity map a field from an input message of your imagination to the 'designation' field of this message.
    #3 Using a assign activity, after this transform, try to assign the 'name' field of this variable.
    #4 Depending on how careful you are, you might get an error above since name might not be there in the message at all. You can avoid this problem by either making sure that a empty tag <name/> or <name>...</name> exists in the transformation (which doesn't happen by default!). The same problem doesn't arise in an assign activity node! Whether you set every field of the variable or just one, the variable gets initialized properly.
    The problem in your care can be a namespace issue! You might be trying to access some element in namespace ns1, whereas in actual it might belong to some other namespace. Can you post the transformation?

  • Must variables be initialized?

    can anyone tell me is it true that variables must be initialized to a value, before we can use it? cos from wat i know, variables by default already have value in it, even if we did not initialized it with our own value. Does this apply only to instance variables, static variables or local variables ? thank you

    As stated previously Java does initialize some
    variables for you. But in my opinion it is a bad
    practice to rely on this. Not all languages do this,
    and if you ever move to one that doesn't (c++, for
    example), you'll be out of luck. In C and C++,
    variables aren't initlized to 0, false, or null for
    you. The compiler initializes them to whatever is
    sitting in the memory location they are allocated.this guy must really hate PERL
    #Erudil from http://www.perlmonks.com/
    #!/usr/bin/perl -w                                      # camel code
    use strict;
                                               $_='ev
                                           al("seek\040D
               ATA,0,                  0;");foreach(1..3)
           {<DATA>;}my               @camel1hump;my$camel;
      my$Camel  ;while(             <DATA>){$_=sprintf("%-6
    9s",$_);my@dromedary           1=split(//);if(defined($
    _=<DATA>)){@camel1hum        p=split(//);}while(@dromeda
    ry1){my$camel1hump=0      ;my$CAMEL=3;if(defined($_=shif
            t(@dromedary1    ))&&/\S/){$camel1hump+=1<<$CAMEL;}
           $CAMEL--;if(d   efined($_=shift(@dromedary1))&&/\S/){
          $camel1hump+=1  <<$CAMEL;}$CAMEL--;if(defined($_=shift(
         @camel1hump))&&/\S/){$camel1hump+=1<<$CAMEL;}$CAMEL--;if(
         defined($_=shift(@camel1hump))&&/\S/){$camel1hump+=1<<$CAME
         L;;}$camel.=(split(//,"\040..m`{/J\047\134}L^7FX"))[$camel1h
          ump];}$camel.="\n";}@camel1hump=split(/\n/,$camel);foreach(@
          camel1hump){chomp;$Camel=$_;y/LJF7\173\175`\047/\061\062\063\
          064\065\066\067\070/;y/12345678/JL7F\175\173\047`/;$_=reverse;
           print"$_\040$Camel\n";}foreach(@camel1hump){chomp;$Camel=$_;y
            /LJF7\173\175`\047/12345678/;y/12345678/JL7F\175\173\0 47`/;
             $_=reverse;print"\040$_$Camel\n";}';;s/\s*//g;;eval;   eval
               ("seek\040DATA,0,0;");undef$/;$_=<DATA>;s/\s*//g;(   );;s
                 ;^.*_;;;map{eval"print\"$_\"";}/.{4}/g; __DATA__   \124
                   \1   50\145\040\165\163\145\040\157\1 46\040\1  41\0
                        40\143\141  \155\145\1 54\040\1   51\155\  141
                        \147\145\0  40\151\156 \040\141    \163\16 3\
                         157\143\   151\141\16  4\151\1     57\156
                         \040\167  \151\164\1   50\040\      120\1
                         45\162\   154\040\15    1\163\      040\14
                         1\040\1   64\162\1      41\144       \145\
                         155\14    1\162\       153\04        0\157
                          \146\     040\11     7\047\         122\1
                          45\15      1\154\1  54\171          \040
                          \046\         012\101\16            3\16
                          3\15           7\143\15             1\14
                          1\16            4\145\163           \054
                         \040            \111\156\14         3\056
                        \040\         125\163\145\14         4\040\
                        167\1        51\164\1  50\0         40\160\
                      145\162                              \155\151
                    \163\163                                \151\1
                  57\156\056

  • Variable not found in class - Newbie

    public void executeSearch() {
    try {
    File startSearchDir = new File(directory);
    } catch (NullPointerException npe) {
    System.out.println("The file path entered is not valid.");
    return;
    File [] fileArray = startSearchDir.listFiles();
    Why is the startSearchDir variable not found on the last line of this method?
    Thanks,
    Devon

    This is the whole class. I have tried the previous suggestion but then I get a duplicate declaration for the variable.
    package PgScan;
    import java.awt.*;
    import javax.swing.JPanel;
    import java.io.*;
    import java.lang.reflect.Array;
    * Title: Page Scanner
    * Description: Page scanner recurisively scans through subdirectories through a provided path and
    * for a provided tag.
    * Copyright: Copyright (c) 2001
    * @author
    * @version 1.0
    public class PgScan extends JPanel {
    BorderLayout borderLayout1 = new BorderLayout();
    private String directory = "";
    private String searchString = "";
    public PgScan() {
    try {
    jbInit();
    catch(Exception ex) {
    ex.printStackTrace();
    private void jbInit() throws Exception {
    this.setLayout(borderLayout1);
    //Main Method
    public static void main(String[] args) {
    PgScan pgScan1 = new PgScan();
    //Properties
    public String getDirectory() {
    return directory;
    public void setDirectory(String newDirectory) {
    directory = newDirectory;
    public String getSearchString() {
    return searchString;
    public void setSearchString(String newString) {
    searchString = newString;
    //Methods
    public void executeSearch() {
    try {
    File startSearchDir = new File(directory);
    } catch (NullPointerException npe) {
    System.out.println("The file path entered is not valid.");
    return;
    File [] fileArray = startSearchDir.listFiles();
    TIA,
    Devon

Maybe you are looking for

  • Calling Web SErvice from Forms 10g R2

    Hi All We are building a new form that calls out a web service. We used JDeveloper to build the stub and successfully import the same into Forms. We added the jar file names to class path, formsweb.cfg and default env files in the desktop. When we ru

  • After changing disc drive letter iTunes no longer recognizes Cd's

    I changed my disc drive letter from G to A, & now iTunes no longer recognizes Cd's but when I change it back to G, iTunes recognizes Cd's again. I've done a full reinstall of all apple software components but still won't recognize disc drive set to d

  • Hi, I want to buy a Macbook Pro, which one is the best for...

    Hi, I'm currently studying graphic design... Besides using Adobe collection like Ai, Ps, Dw, Fl, etc., I'm beginning to use After effects, Final Cut, Cinema 4D, basically stuff for audio&video, 3D modelling.. So I'm looking for a Macbook Pro to buy,

  • J2EE Engine not starting

    Hi I am having a problen in starting J2EE engine. Follwoing is the error log of file  DEV_JCONTROL. Can some body help me in this? Thanks in advance trc file: "D:\usr\sap\PCN\DVEBMGS00\work\dev_jcontrol", trc level: 1, release: "700" node name   : jc

  • Errors while rebuilding library: Master images found in data folders.

    After an upgrade that wreaked havoc on my iPhoto library, I'm now using iPhoto Library Manager to rebuild the library based on a recommendation by Terence. Out of 5000+ photos, the error log showed about 360 missing images. But when I searched inside