Having Problem With "static" When Running a Stand Alone Java Class

I have a Java class that recursively builds a 'tree' . This Java class works as I expected without problem. I am able to write out this 'tree" to the console "line by line" with proper indentation.
The problem occurs when I try to iterate through this 'tree' in the public static void main(String[] arg) method -- Each line in the tree is an Array. And I have to declare this Array (called titleArray in my code) non-static; otherwise, I end up with picking up the very last line of my hard-coded data.
Besides, I also have to declare the List (called recursiveTextArray in my code) non-static; otherwise, I end up with picking up the first Array that I ever build and run into endless iterations till the heap size is exhausted. Note that each element of that List is an Array object.
Then, this non-static Array and this non-static List cannot be accessed in the public static void main(String[] arg) method.
What should I do?
Here is my code that works without problem (the one I do not access the 'titleArray' in the main(String[] arg) method):
import java.util.Iterator;
import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.awt.Color;
import com.aspose.words.*;
public class OplanPhase
     public static void main( String[] args)
          OplanPhase root = new OplanPhase( "", "Oplan 50XX - Phase I" );
          OplanPhase objective1 = new OplanPhase( "OO-3.1", "Destroy enemy conventional ground forces" );
          OplanPhase objective2 = new OplanPhase( "OO-3.2", "Destroy enemy conventional air forces" );          
          OplanPhase objective3 = new OplanPhase( "OO-3.3", "Destroy enemy conventional naval forces" );
          OplanPhase objective4 = new OplanPhase( "OO-3.4", "Influence opposition groups within enemy areas to support friendly forces" );
          OplanPhase effect1 = new OplanPhase( "TgtObj-3.1", "Locate, identify, and destroy key enemy C2 nodes" );
          OplanPhase effect2 = new OplanPhase( "TgtObj-3.2", "Locate, identify, and destroy key enemy C2 nodes" );          
          OplanPhase effect3 = new OplanPhase( "CFSOCC-3.2", "influence enemy opposition groups to support friendly forces campaign objectives" );
          OplanPhase effect4 = new OplanPhase( "JFMECC-3.3", "Destroy SLOC interdiction vessels" );
          OplanPhase effect5 = new OplanPhase( "CFSOCC-3.4", "Influence enemy opposition groups to support friendly forces campaign objectives" );     
          OplanPhase moe1 = new OplanPhase( "MOE-TO-3.1", "Conduct surveillance to locate and identify key enemy C2 nodes" );
          OplanPhase moe2 = new OplanPhase( "MOE-JFSOC-3.1", "Degree of cooperative effort with area opposition groups" );
          OplanPhase moe3 = new OplanPhase( "MOE-JFSOC-3.2", "Number of combined missions successfully completed with opposition groups" );
          OplanPhase moe4 = new OplanPhase( "MOE-JFSOC-3.3", "Number of combined missions successfully completed with opposition groups" );
          OplanPhase task1 = new OplanPhase( "TASK-TO-3.1", "Destroy key enemy C2 nodes" );
          OplanPhase task2 = new OplanPhase( "TASK-TO-3.2", "Conduct surveillance to locate and identify key enemy C2 nodes" );
          OplanPhase task3 = new OplanPhase( "TASK-TO-3.3", "Destroy key enemy C2 nodes" );
          OplanPhase task4 = new OplanPhase( "TASK-JFSOC-3.1", "Degree of cooperative effort with area opposition groups" );
          root.addSubLevel( objective1 );
          root.addSubLevel( objective2 );
          root.addSubLevel( objective3 );
          root.addSubLevel( objective4 );
          objective1.addSubLevel( effect1 );
          objective2.addSubLevel( effect2 );
          objective2.addSubLevel( effect3 );
          objective3.addSubLevel( effect4 );
          objective4.addSubLevel( effect5 );
          effect1.addSubLevel( moe1 );
          effect1.addSubLevel( task1 );
          effect2.addSubLevel( task2 );
          effect2.addSubLevel( task3 );
          effect3.addSubLevel( moe2 );
          effect3.addSubLevel( moe3 );
          effect5.addSubLevel( task4 );
          effect5.addSubLevel( moe4 );
          root.outputAllWithIndentation( 0 );
     private String[] titleArray = { "", "", "" };
     private int indentation = 0;
     private List<OplanPhase> subLevels = new ArrayList<OplanPhase>();
     private List recursiveTextArray = new ArrayList();
     public OplanPhase( String foo, String bar )
          titleArray[1] = foo;
          titleArray[2] = bar;
     public void addSubLevel( OplanPhase op )
          subLevels.add( op );
     public void outputAllWithIndentation( int level )
          indentation = level;
          titleArray[0] = indentString( indentation );
         System.out.println( titleArray[0] + "[" + titleArray[1] + "] " + titleArray[2] );
         recursiveTextArray.add( titleArray );
          for ( int i = 0; i < subLevels.size(); i++ )
               ( ( OplanPhase )subLevels.get( i ) ).outputAllWithIndentation( level + 1 );
     private static String indentString( int count )
          String blank = "";
          for ( int i = 0; i < count; i++ )
               blank = blank.concat( "   " );
          return blank;
}And the code below gives me the static and non-static problem:
import java.util.Iterator;
import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.awt.Color;
import com.aspose.words.*;
public class OplanPhase
     public static void main( String[] args)
          OplanPhase root = new OplanPhase( "", "Oplan 50XX - Phase I" );
          OplanPhase objective1 = new OplanPhase( "OO-3.1", "Destroy enemy conventional ground forces" );
          OplanPhase objective2 = new OplanPhase( "OO-3.2", "Destroy enemy conventional air forces" );          
          OplanPhase objective3 = new OplanPhase( "OO-3.3", "Destroy enemy conventional naval forces" );
          OplanPhase objective4 = new OplanPhase( "OO-3.4", "Influence opposition groups within enemy areas to support friendly forces" );
          OplanPhase effect1 = new OplanPhase( "TgtObj-3.1", "Locate, identify, and destroy key enemy C2 nodes" );
          OplanPhase effect2 = new OplanPhase( "TgtObj-3.2", "Locate, identify, and destroy key enemy C2 nodes" );          
          OplanPhase effect3 = new OplanPhase( "CFSOCC-3.2", "influence enemy opposition groups to support friendly forces campaign objectives" );
          OplanPhase effect4 = new OplanPhase( "JFMECC-3.3", "Destroy SLOC interdiction vessels" );
          OplanPhase effect5 = new OplanPhase( "CFSOCC-3.4", "Influence enemy opposition groups to support friendly forces campaign objectives" );     
          OplanPhase moe1 = new OplanPhase( "MOE-TO-3.1", "Conduct surveillance to locate and identify key enemy C2 nodes" );
          OplanPhase moe2 = new OplanPhase( "MOE-JFSOC-3.1", "Degree of cooperative effort with area opposition groups" );
          OplanPhase moe3 = new OplanPhase( "MOE-JFSOC-3.2", "Number of combined missions successfully completed with opposition groups" );
          OplanPhase moe4 = new OplanPhase( "MOE-JFSOC-3.3", "Number of combined missions successfully completed with opposition groups" );
          OplanPhase task1 = new OplanPhase( "TASK-TO-3.1", "Destroy key enemy C2 nodes" );
          OplanPhase task2 = new OplanPhase( "TASK-TO-3.2", "Conduct surveillance to locate and identify key enemy C2 nodes" );
          OplanPhase task3 = new OplanPhase( "TASK-TO-3.3", "Destroy key enemy C2 nodes" );
          OplanPhase task4 = new OplanPhase( "TASK-JFSOC-3.1", "Degree of cooperative effort with area opposition groups" );
          root.addSubLevel( objective1 );
          root.addSubLevel( objective2 );
          root.addSubLevel( objective3 );
          root.addSubLevel( objective4 );
          objective1.addSubLevel( effect1 );
          objective2.addSubLevel( effect2 );
          objective2.addSubLevel( effect3 );
          objective3.addSubLevel( effect4 );
          objective4.addSubLevel( effect5 );
          effect1.addSubLevel( moe1 );
          effect1.addSubLevel( task1 );
          effect2.addSubLevel( task2 );
          effect2.addSubLevel( task3 );
          effect3.addSubLevel( moe2 );
          effect3.addSubLevel( moe3 );
          effect5.addSubLevel( task4 );
          effect5.addSubLevel( moe4 );
          root.outputAllWithIndentation( 0 );
          try
              Iterator it = recursiveTextArray.iterator(); //compilation error
              while ( it.hasNext() )
                   for ( int i=0; i<titleArray.length; i++ ) //compilation error
                        if ( i == 0 )
                             System.out.println( titleArray[0] ); //compilation error
                        } else if ( i == 1 )
                             System.out.println( "[" + titleArray[1] + "] " ); //compilation error                             
                        } else if ( i == 2 )
                             System.out.println( titleArray[2] ); //compilation error
          } catch (Exception e)
               // TODO Auto-generated catch block
               e.printStackTrace();
     private String[] titleArray = { "", "", "" };
     private int indentation = 0;
     private List<OplanPhase> subLevels = new ArrayList<OplanPhase>();
     private List recursiveTextArray = new ArrayList();
     public OplanPhase( String foo, String bar )
          titleArray[1] = foo;
          titleArray[2] = bar;
     public void addSubLevel( OplanPhase op )
          subLevels.add( op );
     public void outputAllWithIndentation( int level )
          indentation = level;
          titleArray[0] = indentString( indentation );
         System.out.println( titleArray[0] + "[" + titleArray[1] + "] " + titleArray[2] );
         recursiveTextArray.add( titleArray );
          for ( int i = 0; i < subLevels.size(); i++ )
               ( ( OplanPhase )subLevels.get( i ) ).outputAllWithIndentation( level + 1 );
     private static String indentString( int count )
          String blank = "";
          for ( int i = 0; i < count; i++ )
               blank = blank.concat( "   " );
          return blank;
}

What should I do?If you feel you need to cross-post, you should have the courtesy to provide a
link to the other post/s.
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=1&t=016129

Similar Messages

  • I'm having problems with JavaFX applications run on raspberry pi!

    I'm having problems with JavaFX applications run on raspberry pi. I did all the steps of the videos of the course: overclocking, uncommented what I had to uncomment about the framebuffer but Exceptions are still happening. The Fireworks demo example does not work. Someone went through this problem? Java applications are ok. As the versions of java in netbeans project and also on "properties" and they are all JDK 8. So if someone can give a hint, I'm very grateful!

    Can you provide the exceptions you got so I can help you better?
    Would you like to do a coaching session for this?
    -Vinicius

  • When running a "stand-alone" APP..how do I send midi from Logic?

    Hi all,
    When running a "stand-alone" APP..how do I send midi from Logic?.....Please no IAC stuff it doesn't work.......thanx
    SvK

    using IAC here no problems. works very well.
    you can host your au's in another app such as soundflower or au lab, but you are still going to need to get it to hear midi. you can use physical midi ports with something like a MTP midi interface, and getting the midi by routing the out of one port to the in of another (midi loop) but you have to be careful logic doesn't listen to the same midi signal or everything will jam up (midi feedback).

  • Database connection pool to stand alone java class

    Hi all,
    I would like to know the best way to use a database connection pool with a stand alone java class.
    In my web applications I usually use JDBC Data Source version 5 to connect to my database. In this case, I connect to an Oracle database. But in this scene, I've a WebSphere Application Server to provide this connection pool. But for stand alone applications, I don't know how to do because I don't have a Application server to run on.
    Can enyone help me with this beginner question?
    Best regards.

    I tried to find the pool class I created but it must be on another CD. Anyway, you can easily create a number of connections and place them on a stack (your own or java's). When you need one, pop it off. When you are finished, push it back.
    Good luck.

  • Calling a web service from a stand alone java class

    I need to invoke a web service from stand alone java class- Please let me know how to acheive this.
    Thanks

    Hi jazz123,
    There's an example in the [*Java Web Services Tutorial*|http://java.sun.com/webservices/docs/2.0/tutorial/doc/] : see Chapter 1: Building Web Services with JAX-WS - A Simple JAX-WS Client.

  • I just updated to new final cut pro x 10.1.1 and i am also on mavericks so but on my editing timeline i was trying to color grade using magic bullet looks but i am having problem with it. when it comes back to tcp x it's black.

    I just updated to the new final cut pro x 10.1.1 and i am also on mavericks so but on my editing timeline i was trying to color grade using magic bullet looks but i am having problem with it. When i send a sample to MBL and color grade it , it comes back to final cut pro x all black even after render. By the way on the MBL i am using the GPU rendering, I used before like 4months ago and it was fine. And i don't like to use the CPU because it very slow.

    What is the frame rate of the project? At what frame rate was the media recorded? What frame size?
    What are the audio settings?
    What are the specs of the machine, in particular how much RAM, how is the hard drive connected, etc.?
    If possible, post screenshots of the inspector for the project.
    It could be related to the audio frequency?

  • Calling a web service through SSL via a stand alone java class

    HI,
    I am trying to call a web service through SSL via a simple stand alone java client.
    I have imported the SSL certificate in my keystore by using the keytool -import command.
    Basically I want to add a user to a group on the server. Say I add a user user 1 to group group 1 using an admin userid and password. All these values are set in an xml file which I send to the server while calling the server. I pass the web service URL, the soap action name and the xml to post as the command line arguments to the java client.
    My xml file(Add.xml) that is posted looks like :
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
    xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance"
    xmlns:SOAP-ENC = "http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd = "http://www.w3.org/1999/XMLSchema"
    SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <namesp1:modifyGroupOperation xmlns:namesp1 = "/services/modifyGroup/modifyGroupOp">
    <auth>
    <user>adminUser</user>
    <password>adminPassword</password>
    </auth>
    <operationType>ADD</operationType>
    <groupName>group1</groupName>
    <users>
    <userName>user1</userName>
    </users>
    </namesp1:modifyGroupOperation>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I call the client as:
    java PostXML https://com.webservice.com/services/modifyGroup "/services/modifyGroup/modifyGroupOp" Add.xml
    I my client, I have set the following:
    System.setProperty("javax.net.ssl.keyStore", "C:\\Program Files\\Java\\jre1.5.0_12\\lib\\security\\cacerts");
    System.setProperty("javax.net.ssl.keyStorePassword", "password");
    System.setProperty("javax.net.ssl.trustStore", "C:\\Program Files\\Java\\jre1.5.0_12\\lib\\security\\cacerts");
    System.setProperty("javax.net.ssl.trustStorePassword", "password");
    But when I try to execute the java client, I get the following error:
    setting up default SSLSocketFactory
    use default SunJSSE impl class: com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
    class com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl is loaded
    keyStore is : C:\Program Files\Java\jre1.5.0_12\lib\security\cacerts
    keyStore type is : jks
    keyStore provider is :
    init keystore
    init keymanager of type SunX509
    trustStore is: C:\Program Files\Java\jre1.5.0_12\lib\security\cacerts
    trustStore type is : jks
    trustStore provider is :
    init truststore
    adding as trusted cert:
    init context
    trigger seeding of SecureRandom
    done seeding SecureRandom
    instantiated an instance of class com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
    main, setSoTimeout(0) called
    main, setSoTimeout(0) called
    %% No cached client session
    *** ClientHello, TLSv1
    RandomCookie: GMT: .....
    Compression Methods: { 0 }
    [write] MD5 and SHA1 hashes: len = 73
    main, WRITE: TLSv1 Handshake, length = 73
    [write] MD5 and SHA1 hashes: len = 98
    main, WRITE: SSLv2 client hello message, length = 98
    [Raw write]: length = 100
    [Raw read]: length = 5
    [Raw read]: length = 58
    main, READ: TLSv1 Handshake, length = 58
    *** ServerHello, TLSv1
    %% Created: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
    ** SSL_RSA_WITH_RC4_128_MD5
    [read] MD5 and SHA1 hashes: len = 58
    [Raw read]: length = 5
    [Raw read]: length = 5530
    main, READ: TLSv1 Handshake, length = 5530
    *** Certificate chain
    chain [0] = ...
    chain [1] = ...
    chain [2] = ...
    chain [3] = ...
    main, SEND TLSv1 ALERT: fatal, description = certificate_unknown
    main, WRITE: TLSv1 Alert, length = 2
    [Raw write]: length = 7
    0000: 15 03 01 00 02 02 2E .......
    main, called closeSocket()
    main, handling exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    main, called close()
    main, called closeInternal(true)
    main, called close()
    main, called closeInternal(true)
    main, called close()
    main, called closeInternal(true)
    Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.c
    ertpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
    at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
    at java.io.BufferedOutputStream.flush(Unknown Source)
    at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
    at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2110)
    at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1088)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at PostXML.main(PostXML.java:111)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find v
    alid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
    at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
    at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
    ... 18 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
    at java.security.cert.CertPathBuilder.build(Unknown Source)
    ... 23 more
    I do not know where I have gone wrong. Could someone point out my mistake.
    Thanks In advance!

    Hi jazz123,
    There's an example in the [*Java Web Services Tutorial*|http://java.sun.com/webservices/docs/2.0/tutorial/doc/] : see Chapter 1: Building Web Services with JAX-WS - A Simple JAX-WS Client.

  • Eclipse problem with Tomcat when running jsp

    when I start tomcat from CMD, it starts normally and display http://localhost:8080/ properly
    but when I start tomcat from Eclipse, it starts the server normally,
    but it can't display http://localhost:8080/ properly,
    I guess that the problem with the java classpath isn't defined correctly in Eclipse
    but but I've tried it before, and it doesn't work
    here the error msg from Eclipse console:
    [INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on http-8080
    Starting service Tomcat-Standalone
    Apache Tomcat/4.1.31
    [INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
    [INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
    [INFO] PropertyMessageResources - -Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
    [INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on http-8080
    [INFO] ChannelSocket - -JK2: ajp13 listening on /0.0.0.0:8009
    [INFO] JkMain - -Jk running ID=0 time=0/120 config=C:\jakarta-tomcat-4.1.31\conf\jk2.properties
    Error compiling file: C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\/index_jsp.java [javac] Compiling 1 source file
    [javac] Modern compiler not found - looking for classic compiler
    Info: Compile: javaFileName=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_\/index_jsp.java
    classpath=C:/jakarta-tomcat-4.1.31/shared/classes/;C:/jakarta-tomcat-4.1.31/common/classes/;C:/jakarta-tomcat-4.1.31/common/endorsed/xercesImpl.jar;C:/jakarta-tomcat-4.1.31/common/endorsed/xmlParserAPIs.jar;C:/jakarta-tomcat-4.1.31/common/lib/activation.jar;C:/jakarta-tomcat-4.1.31/common/lib/ant-launcher.jar;C:/jakarta-tomcat-4.1.31/common/lib/ant.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-collections.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-dbcp-1.1.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-logging-api.jar;C:/jakarta-tomcat-4.1.31/common/lib/commons-pool-1.1.jar;C:/jakarta-tomcat-4.1.31/common/lib/jasper-compiler.jar;C:/jakarta-tomcat-4.1.31/common/lib/jasper-runtime.jar;C:/jakarta-tomcat-4.1.31/common/lib/jdbc2_0-stdext.jar;C:/jakarta-tomcat-4.1.31/common/lib/jndi.jar;C:/jakarta-tomcat-4.1.31/common/lib/jta.jar;C:/jakarta-tomcat-4.1.31/common/lib/mail.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-common.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-factory.jar;C:/jakarta-tomcat-4.1.31/common/lib/naming-resources.jar;C:/jakarta-tomcat-4.1.31/common/lib/servlet.jar
    cp=C:\jakarta-tomcat-4.1.31\shared\classes
    cp=C:\jakarta-tomcat-4.1.31\common\classes
    cp=C:\jakarta-tomcat-4.1.31\common\endorsed\xercesImpl.jar
    cp=C:\jakarta-tomcat-4.1.31\common\endorsed\xmlParserAPIs.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\activation.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\ant-launcher.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\ant.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-collections.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-dbcp-1.1.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-logging-api.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\commons-pool-1.1.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jasper-compiler.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jasper-runtime.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jdbc2_0-stdext.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jndi.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\jta.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\mail.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-common.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-factory.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\naming-resources.jar
    cp=C:\jakarta-tomcat-4.1.31\common\lib\servlet.jar
    work dir=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_
    srcDir=C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\_
    include=index_jsp.java
    Exception compiling Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
    Exception:
    Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
         at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:72)
         at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:479)
    Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
         at org.apache.tools.ant.taskdefs.compilers.Javac12.execute(Javac12.java:72)
         at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:942)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:479)
    Here are my system settings :
    Eclipse 2.1.3
    plugin : tomcatPluginV21, lomboz.213
    Jakarta-tomcat-4.1.31
    JAVA_HOME      : C:\jdk1.3.1_15
    CATALINA_HOME : C:\jakarta-tomcat-4.1.31
    Here are my Eclipse settings :
    http://server2.uploadit.org/files/marvelousgame-01.JPG
    http://server3.uploadit.org/files/marvelousgame-02.JPG
    http://server2.uploadit.org/files/marvelousgame-03.JPG
    http://server3.uploadit.org/files/marvelousgame-04.JPG
    http://server2.uploadit.org/files/marvelousgame-05.JPG
    http://server3.uploadit.org/files/marvelousgame-06.JPG
    thx!!!

    I would suggest updating your software to the latest versions - java 1.4.2 or higher, tomcat 5 or higher, Eclipse 3. That should fix any incompatibilities you are experiencing.
    As to your problem, it seems the tomcat you are trying to run from Eclipse wants a newer Java version (1.4.2 most likely).

  • Having problems with Photoshop CS5 running on 34 bit Vista

    I recently downloaded CS5 Design premium, and I seem to be having trouble running bridge.  I'm using MS Windows Vista Home Premium 32-bit SP2 on an Intel Core 2 Quad Q6600  @ 2.40GHz.  3gb of RAM and 256MB GeForce 8500 GT graphics card (if that matters).  I was wondering if there is a way to fix this, or maybe a 32-bit version of Photoshop CS5.
    And if there isn't, is there a way to remove the bridge access buttons from photoshop?  Seeing something useless in a five hundred dollar program bothers me quite a bit.  Thanks in advance.

    Apparently, something went wrong with your Photoshop installation. I would try fully uninstalling Photoshop and then run the "CS5 cleaner tool" (see http://kb2.adobe.com/cps/829/cpsid_82947.html). Then try reinstalling making sure you turn off all anti-virus software and UAC (User Account Control) and run as an Administrator equivalent.
    If you still have problems, please contact Adobe Technical support directly.
    To answer you question about the buttons, no, there is no way of disabling that functionality.
              - Dov

  • Problem with JFileChooser when run using Netbeans

    I just want to state that I have NO problem writing the code that brings up this component. My problem is what happens when the JFileChooser component is loaded. My environment is Windows Vista, Java SE 1.6.0. -> Netbeans IDE 5.0. The code I use is as follows:
    public RegexParser()
    JFileChooser openfile = new JFileChooser();
    openfile.showOpenDialog(RegexParser.this);
    int returnVal = openfile.showOpenDialog(RegexParser.this);
    if (returnVal == JFileChooser.APPROVE_OPTION)
    //This code gets the path of the file and uses as a parameter to parse data.
    filename = openfile.getSelectedFile().getPath();
    openfile.setVisible(false);
    ParseData(filename);
    The problem is when I try to select an option from the combobox labeled "Look In:" Every directory I select which is not the root of the drive will display NO FILES even though there are files in that directory.
    Notice: I have also run the same code using the cmd.exe and it works fine. I have also looked at: http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html but have found nothing that has helped me.
    Can someone explain what is the problem? Is this a known bug in Netbeans? Is there any code that can be used as a workaround?

    Yes I copied the code to my machine and run it. The example program had problems when I executed using netbeans it had the problem.
    When I executed using Command Prompt there where no problems.

  • Problems with ADF when running sample EJB, JPA, JSF Tutorial

    Hi,
    I'm new to jDeveloper.
    I've downloaded the version 11.1.1.2.0 and tried to do my first tutorials with the product.
    I started with the sample 'Build Applications with EJB, JPA and JSF' and run to following problems:
    - Part1: Step 10 expose the EJb as a Data Control
    Here right-click FODFacadeBean.java and choose Create Data Control.
    this option 'Create Data Control' does not come up at all. There is not such option
    - Part 2: Step 1 Add Tag Libraries to a project
    The option to select ' ADF Faces Components 11 '
    does not come up either. I can not see any ADF related options...
    Is there something missing from my installation, as I can not access these ADF components ?
    Should I include the ADF components at some stage during the installation to be able to access these
    or is this some licencing option ?
    I downloaded the product yesterday from the public download site, filename jdevstudio11112install.exe
    Jan-Erik

    Hi,
    I'm new to jDeveloper.Welcome to OTN :)
    I've downloaded the version 11.1.1.2.0 and tried to do my first tutorials with the product.
    I started with the sample 'Build Applications with EJB, JPA and JSF' and run to following problems:
    - Part1: Step 10 expose the EJb as a Data Control
    Here right-click FODFacadeBean.java and choose Create Data Control.
    this option 'Create Data Control' does not come up at all. There is not such optionI just tried and able to see the option (and able to generate the DC from the facade as well). Could you please share the tutorial link to see if you are missing something?
    >
    - Part 2: Step 1 Add Tag Libraries to a project
    The option to select ' ADF Faces Components 11 '
    does not come up either. I can not see any ADF related options...Did you select Fusion Web Application (ADF) Template for creating your application? If yes, the ADF Faces Components 11 tag library would've been added by default (Check out in the list of tag libraries that are already added - before clicking on the Add button).
    -Arun

  • Problem with TagLib when running JDeveloper 10.1.3.2

    I recently installed JDeveloper 10.1.3.2, and used the upgrade feature to import my project from JDeveloper 10.1.2.0 My project was building and running fine on the old JDeveloper 10.1.2, yet when I imported it to the new JDeveloper 10.1.3.2 and attempted to rebuild, I got the following error:
    Error(1): java.io.FileNotFoundException: C:\srp-app\srpTagLib (The system cannot find the file specified)
    This is the piece of code where the error occurred:
    <%@ taglib prefix='srp' uri='/srpTagLib' %>
    This is how I set up my web.xml file:
    <taglib>
    <taglib-uri>/srpTagLib</taglib-uri>
    <taglib-location>/WEB-INF/srp.tld</taglib-location>
    </taglib>
    BTW, both my web.xm and my srp.tld file compiled cleanly.
    I attempted to add the srp.tld file to the JSP Tag Librabries under project properties and when I selected the srp.tld file to add, I got the following error:
    "A Valid Tag Library Descriptor (*.tld) was not found"
    Please help!

    JDeveloper 10.1.3.2 supports J2EE 1.4 in which the web.xml does not include the
    <taglib> element. Remove the <taglib> element from the web.xml. Specify the http uri in the <%@ taglib prefix='srp' uri='' %>
    Add the taglib JAR file to project libraries.

  • Help!. Problem with using XmlBeans 1.0 Stand-alone Library

    Hi All,
    I read that XmlBeans requires JDK1.4.1. Is there any way to use this successfully
    within other AppServers ( not Bea 8.1) which are not at JDK1.4.1 Level yet??.
    What I mean is, I am very much interested in using XmlBeans but unfortunately
    the AppServer that is in Production ( WAS4.0) is at level jdk1.3.1.
    Am I dead in the water? or is there any hope?
    Thanks,
    Sudha

    "Sudha" <[email protected]> wrote:
    >
    the AppServer that is in Production ( WAS4.0) is at level jdk1.3.1.Today you do need JDK 1.4.x.
    Am I dead in the water? or is there any hope?Although there should be few things in XMLBeans that intrinsically depend on JDK
    1.4, a port to JDK 1.3 has not yet been done. If (when) we do a JDK 1.3 port,
    we'll do it in the open-source project and I'd encourage you to watch for it,
    try it, and contribute to it. But right now there's been no 1.3 work yet - you
    need JDK 1.4.

  • Running stand alone java class using Maven

    Hi I want to run my main class using Maven.Can anyone help?

    SDET wrote:
    Hi I want to run my main class using Maven.Can anyone help?I'm pretty sure the Maven documentation can be of great help. If not, the Maven-users mailing list is your resource of choice for Maven related questions.

  • I have an IPod touch 4 gen. And I'm having problems with the audio when I use other than Apple brand earphones

    I have an Ipod Touch 4 gen. and I'm having problems with audio when I use other than Apple brand earphones. I'm talking about music only so far, when I use apple earphones all is fine, but if I use other type of phones ( sony for exemple ) I can only hear the music and the background but not the lead singer voice, can anybody explain this to me? thank you.

    - Try cleaning out/blowing out the headphone jack. Try inserting/removing the plug a dozen times or so.
    - If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                                      

Maybe you are looking for

  • Questions on Print Quote report

    Hi, I'm fairly new to Oracle Quoting and trying to get familiar with it. I have a few questions and would appreciate if anyone answers them 1) We have a requirement to customize the Print Quote report. I searched these forums and found that this repo

  • How to change the settings for Last data update in BI

    Dear All, If you want to display that "Status of Data " field in the report... Then you need to set it at... Run the query -> from the BEx toolbar choose LAYOUT -> Display text elements -> General. If this is not set, then it will not show in report

  • CS5 making copy for each action and layer

    Hello, I'm hoping someone might be able to tell me if maybe I have my settings wrong. I run CS5 on my desktop (XP) and it works fine. I just installed on my laptop (windos 7) and everytime I run an action or click in a part of the action to edit, it

  • My MAC Book Pro is hanging after installing Lion OS

    Hi i have recently installed OS X Lion from the apple store and after the installation is commpleted my MAC started to hang and give a black screen with no responce what so ever. the only thing i can do is keep pressing the power button until it gose

  • Urgent: Flat file load issue

    Hi Guru's, Doing loading in data target ODS via flat file, problem is that flat files shows date field values correct of 8 characters but when we do preview it shows 7 characters and loading is not going through. Anyone knows where the problem is why