Langton's Ant - understanding Boolean[][]

hello! I got my hands on this code, but I need some help understanding it.
what does "[][]" after a booelan value do? I have googled it and looked for it beneath boolean @ API but can't find an answer.
here is the code:
import java.awt.*;
public class LangtonsMyra extends java.applet.Applet implements Runnable {
    int x=400, y=300;
    int direction= 0;
      boolean[][] isBlack= new boolean[800][600];
      Image image;
    public void init(){
          setSize( 800,600);
          image= createImage( 800,600);
      public void start(){
         Thread t= new Thread( this);
            t.start();
      public void run(){
          int ix= 100;
          while( true){
                isBlack[x][y]= !isBlack[x][y];
                    if( isBlack[x][y]){
                        direction++;
                          if( direction == 4) direction = 0;
                    } else {
                        direction--;
                          if( direction == -1) direction = 3;
                    if( direction == 0) x++;
                    if( direction == 1) y++;
                    if( direction == 2) x--;
                    if( direction == 3) y--;
                  if( x == -1) x= 799;
                    if( y == -1) y= 599;
                    if( x == 800) x= 0;
                    if( y == 600) y= 0;
                    if( --ix == 0){
                        ix= 100;
                        repaint();
                        try{ Thread.sleep(1);} catch( Exception e){}
      public void update( Graphics g){
          paint( image.getGraphics() );
            g.drawImage( image, 0,0, null);
      public void paint( Graphics g){
         for( int x=0; x<800; x++){
               for( int y=0; y<600; y++){
                     if( isBlack[x][y]){
                             g.setColor( Color.BLACK);
                         } else {
                             g.setColor( Color.WHITE);
                     g.fillRect(x,y, 1,1);
         g.setColor( Color.RED);
       g.fillRect(x*4,y*4, 4,4);
}Thanks in advance.
Edited by: uj2n on Aug 21, 2009 12:49 AM

do you mean the two dimensional array of boolean??I don't understand how the boolean value(s?) isBlack work in this applet. can someone please explain this or link a good howto? I have been googling for arrays for a few days, but can't really understand how this works.
Thanks in advance

Similar Messages

  • How to perform Boolean Search?

    Hi-
    I have an indexed folder on my hard drive that I frequently search using Acrobat 9 (standard). I am able to use it for single-word searches only and I want to be able to input more intricate searches as Acrobat teases me that are possible.  I understand boolean principles but I am unable to apply it in my searches-nothing works!. Can someone who is knowlegable about this aspect of Acrobat please give me a good reference specifically for Acrobat searches (not general boolean searches) for advanced index searches, and also as an example, how would I input the following search: I want to find the words"Material" AND "Disposition" separated by no more than 50 characters.
    Thank you very much in advance.
    -Ben

    For the specific example:
    Open Advanced Search (Edit->Advanced Search)
    Click "Show more options" at the bottom of the dialog
    In the advanced UI, select the folder where your files are
    In results containing, select match all words
    In the options, select Proximity
    The default for Proximity searches in 900 words. You can change that in Edit>Preferences>Search>Range of words for proximity searches.

  • Boolean methods

    Hi this is the first time posting for me.
    I'm a beginner still with Java programming and have a question
    with boolean methods.
    I am writing a boolean method for a triangle to test whether the three sides of
    a triangle (input by the user) is an isosoles (two sides but only two sides are equal). I think I have the syntax and method correct but when I input an equilateral (all sides are equal) I always get "true" (instead of false) for the return value (when I call the isosoles method) on the traingle.
    Here is the calling and method code. Any hints?
    I don't think I fully understand boolean methods.
    Thanks in advance.
    Mark
    import javax.swing.JOptionPane;
    public class TestTriangle {
    public static void main(String[] args) {
    String stringS1 = JOptionPane.showInputDialog(
    "Enter side 1 of triangle");
    int s1 = Integer.parseInt(stringS1);
    String stringS2 = JOptionPane.showInputDialog(
    "Enter side 2 of triangle");
    int s2 = Integer.parseInt(stringS2);
    String stringS3 = JOptionPane.showInputDialog(
    "Enter side 3 of triangle");
    int s3 = Integer.parseInt(stringS3);
    Triangle myTriangle = new Triangle(s1, s2, s3);
    System.out.println(myTriangle.isosoles() + " " + myTriangle.equilateral());
    public class Triangle {
    boolean isosoles(){
    if ((side1 == side2) ^ (side2 == side3)){
    return true;
    else if ((side1 == side3) ^ (side2 == side3)){
    return true;
    else if ((side1 == side2) ^ (side1 == side3)){
    return true;
    else {
    return false;
    boolean equilateral(){
    if ((side1 == side2) && (side2 == side3)){
    return true;
    else {
    return false;
    }

    Just one additional note:
        if ((side1 == side2) ^ (side2 == side3)) {
          return true;
        else if ((side1 == side3) ^ (side2 == side3)) {
          return true;
        else if ((side1 == side2) ^ (side1 == side3)) { // You do not need this condition checked
                                                         // since the first part is identical to the 1st part
                                                         // of condition #1, so if (1 == 2), then !(2 == 3)
                                                         // is the same as !(1 == 3). And the 2nd part is
                                                         // identical to the 1st part of condition #2, so it
                                                         // (1 == 3), then !(1 == 2) is the same as !(2 ==3)
          return true;
        else {
          return false;
        }

  • Need to change a string.

    In my class we were required to write a program that will calculate the weekly pay of an employee. Then it also must allow the user to enter another employee until the user enters the word stop. The program must display the name, hours worked, payrate, and weekly pay. I used a while loop and have set it so that the user enters the employee name before the loop. The problem is if I try to rename the string the compiler says that variable employeeName has already been defined. I know now that you cannot change the name of a string that it is emutable, but what I don't understand is that the proffesor says I have to do it using boolean true and false. The biggest problem is that the school is online and is not giving us all the resources we need so I donot understand boolean values in depth like this to understand how to write the program correctly. If the user enters stop first it will skip the loop unles it will continue to use the same employee name over and over. Here is the code to help better understand:
    //Payroll Calculating Program
    import java.util.Scanner;
    public class Payroll2
    public static void main( String args [] )
    Scanner input = new Scanner( System.in );
    double hours;
    double payrate;
    System.out.println( "Please enter employee name, enter stop to exit program:" );
    String employeeName = input.nextLine();
    while ( !employeeName.equals( "stop" ))
    System.out.println( "Please enter hours worked this week:" );
    hours = input.nextDouble();
    System.out.println( "Please enter pay rate of employee:" );
    payrate = input.nextDouble();
    if ( hours < 0 ) {
    System.out.println( "Please enter a positive amount for hours worked:" );
    hours = input.nextDouble(); }
    else if ( payrate < 0 ) {
    System.out.println( "Please enter a positve amount for the pay rate:" );
    payrate = input.nextDouble(); }
    else if ( ( hours <= 40 ) & ( payrate >= 0 ) & ( hours >= 0 ) ) {
    System.out.printf( "%s worked for %.2f hours,\nHourly wage was: $%.2f per hour,\nIncome for this week before taxes was: $%.2f.\n",
    employeeName, hours, payrate, (hours * payrate) );}
    else if ( ( hours > 40 ) & ( payrate >= 0 ) ) {
    System.out.printf( "%s worked for %.2f hours,\nHourly wage was: $%.2f per hour,\nIncome for this week before taxes was: $%.2f.\n",
    employeeName[ counter ], hours, payrate, (( hours - 40 ) * ( payrate + ( payrate / 2 ) ) + ( payrate * 40 )) ); }
    System.out.println( "Payroll program is exiting, Goodbye." );
    }

    //Nicole Hammers
    //Payroll Calculating Program
    import java.util.Scanner;
    public class Payroll2
    public static void main( String args [] )
    Scanner input = new Scanner( System.in );
    double hours;
    double payrate;
    System.out.println( "Please enter employee name, enter stop to exit program:" );
    String employeeName = input.nextLine();
    while ( !employeeName.equals( "stop" ))
    System.out.println( "Please enter hours worked this week:" );
    hours = input.nextDouble();
    System.out.println( "Please enter pay rate of employee:" );
    payrate = input.nextDouble();
    if ( hours < 0 ) {
    System.out.println( "Please enter a positive amount for hours worked:" );
    hours = input.nextDouble(); }
    else if ( payrate < 0 ) {
    System.out.println( "Please enter a positve amount for the pay rate:" );
    payrate = input.nextDouble(); }
    else if ( ( hours <= 40 ) & ( payrate >= 0 ) & ( hours >= 0 ) ) {
    System.out.printf( "%s worked for %.2f hours,\nHourly wage was: $%.2f per hour,\nIncome for this week before taxes was: $%.2f.\n",
    employeeName, hours, payrate, (hours * payrate) );}
    else if ( ( hours > 40 ) & ( payrate >= 0 ) ) {
    System.out.printf( "%s worked for %.2f hours,\nHourly wage was: $%.2f per hour,\nIncome for this week before taxes was: $%.2f.\n",
    employeeName, hours, payrate, (( hours - 40 ) * ( payrate + ( payrate / 2 ) ) + ( payrate * 40 )) ); }
    System.out.println( "Payroll program is exiting, Goodbye." );
    This program will compile but the loop does not exit because the string cannot be changed.
    //Nicole Hammers
    //Payroll Calculating Program
    import java.util.Scanner;
    public class Payroll2
    public static void main( String args [] )
    Scanner input = new Scanner( System.in );
    double hours;
    double payrate;
    System.out.println( "Please enter employee name, enter stop to exit program:" );
    String employeeName = input.nextLine();
    while ( !employeeName.equals( "stop" ))
    System.out.println( "Please enter hours worked this week:" );
    hours = input.nextDouble();
    System.out.println( "Please enter pay rate of employee:" );
    payrate = input.nextDouble();
    if ( hours < 0 ) {
    System.out.println( "Please enter a positive amount for hours worked:" );
    hours = input.nextDouble(); }
    else if ( payrate < 0 ) {
    System.out.println( "Please enter a positve amount for the pay rate:" );
    payrate = input.nextDouble(); }
    else if ( ( hours <= 40 ) & ( payrate >= 0 ) & ( hours >= 0 ) ) {
    System.out.printf( "%s worked for %.2f hours,\nHourly wage was: $%.2f per hour,\nIncome for this week before taxes was: $%.2f.\n",
    employeeName, hours, payrate, (hours * payrate) );}
    else if ( ( hours > 40 ) & ( payrate >= 0 ) ) {
    System.out.printf( "%s worked for %.2f hours,\nHourly wage was: $%.2f per hour,\nIncome for this week before taxes was: $%.2f.\n",
    employeeName, hours, payrate, (( hours - 40 ) * ( payrate + ( payrate / 2 ) ) + ( payrate * 40 )) ); }
    System.out.println( "Please enter employee name, enter stop to exit program:" );
    String employeeName = input.nextLine();
    System.out.println( "Payroll program is exiting, Goodbye." );
    This progeam will not compile and the error says:
    Payroll2.java:45: employeeName is already defined in main(java.lang.String[])

  • Apple loops are not there

    Hello , I have garageband 08 ,I hope this wasn't a mistake {as imovie 08 was} there are no apple loops.I ant understand how they did not come with it . Can anyone tell me how to get them ? Thanks, Freezer

    OK, and then how do I get them to be loops in garage band? It still says there are no loops installed when I try to open them there.
    First,
    Find your Loops.
    Default is:
    /Library/Audio/Apple Loops/Apple/
    They may also be in:
    Users/~/Library/Audio/Apple Loops/Apple/
    or
    /Library/Application Support/GarageBand/Apple Loops/.
    Then,
    Do a search for this folder: "Apple Loops Index".
    There will likely be more than one, although only one folder probably has all your Indexed Loops.
    So, when you find the one with the "Search Index..." files, delete them.
    Then, open a project in GarageBand, open the Loops Browser, and drag your Loops folder(s) onto the Loops Browser.
    Wait for it to index them, and you should be good to go.
    WH

  • As Few Case AS possible

    Hi all,
    Please let me know what is the best way to tackle the simple problem below with as few case structure as possible.
    input: a 1D array of 2 elements.
    ideal (if possible): there would be a case structure with 3 cases plus a default case.  The condition would be if element 1 or element 2 from the input satistify case 1-execute case 1, same for case 2, same for case 3, and if none of the element satisfy any case, execute the else case.
    Note: I only want to run the default structure only if none of the element in the array match any of the cases.
    Kudos and Accepted as Solution are welcome!
    Solved!
    Go to Solution.

    Using binary for the case is a nice touch.
    If that logic does what you want Its OK but I did not exactly see what you are trying to match up so for the sake of those that follow you, you may want to add some text explaining your logic in plain speak.
    Another thing you can add is an enum to make reading the case easier. After caseting the nimeric as a U32 (or is it I32) you can type cast the numeric as the enum. THe enum can be set up so that you have a clear way of defining the condition.
    For example;
    In the code I showed I set up a case to handle the values "1" and "3" in the same case. If I had type cast it as an enum where the value "3" had the text "Both match", you would not have to understand boolean to understand that case was intended to handle the condition when both values matched up.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Smart collection containing matches with only two keywords

    I have added keyword tags to all my photos with the names of the people in the picture.  I then created a smart collection with two names in it.  For example Jessica and Ryan.  That collection then returns all pictures that have Jessica or Ryan in them. I am trying to get pictures than contain both Jessica and Ryan, but not other names.  The only way I have figured out how to do this is by entering in the other names in the doesn't contain field.  That seems like a lot of work when I have many other names, and it must be updated each time I add new keywords.  Is there an easier way?

    There's no way built-in to LR to do what you want without listing every keyword you want to exclude.  The Any Filter plugin lets you do it, though you need to understand boolean expressions.  See the "Exactly one person in the keywords" example for how to match exactly one person. To get exactly two people, you'd define the filter:
    All of
    Explicit Keywords = Ryan
    Explicit Keywords = Jessica
    Explicit Keywords all items
    Some of
    Keyword = Ryan
    Keyword = Jessica
    None of
    Keyword subkeyword of People

  • Can anybody suggest me on this?

    <p>But I am trying to put zip function in my batch file.</p><p> </p><p>In detail this batch file runs some cmd and maxl scripteverynight and then it takes back up of all the applicaction.</p><p>Now I want to add this backup folders in to the zip. So that ican save disk space.</p><p> </p><p>i have already tried simple pkzip and other commands to do zipbut I am surprised non of them works.</p><p> </p><p>I ant understand exactly why it happens.</p><p> </p><p>Can anybody write me a command for it. It will be greathelp.</p><p> </p><p>I will really appreciate your help as i tried each n everythingwith no luck.</p><p> </p><p>Thanks.</p><p> </p>

    Hi,
    do you have a web server where you can put the file? Once the HTML file is put onto a web server you can integrate the file via URL iView.
    Note, the NW Application server is a web server as well. Basically, you could put the files there.
    Best regards,
    Martin

  • Does any body know?

    <p>Well I know it sounds like silly,</p><p>But I am trying to put zip function in my batch file.</p><p> </p><p>In detail this batch file runs some cmd and maxl scripteverynight and then it takes back up of all the applicaction.</p><p>Now I want to add this backup folders in to the zip. So that ican save disk space.</p><p> </p><p>i have already tried simple pkzip and other commands to do zipbut I am surprised non of them works.</p><p> </p><p>I ant understand exactly why it happens.</p><p> </p><p>Can anybody write me a command for it. It will be greathelp.</p><p> </p><p>I will really appreciate your help as i tried each n everythingwith no luck.</p><p> </p><p>Thanks.</p><p> </p><p> </p>

    <p>To Zip the files use this command:</p><p> </p><p>      Tar -cvf  Filename.tarfile1 file2</p><p> </p><p>           thisgenerates a file with .tar extension</p><p> </p><p>this zips the file</p><p> </p><p>    gzip filename.tar</p><p> </p><p>To unzip the file</p><p> </p><p>    gunzip -f filename.tar</p><p> </p><p>Tar -xvf Filename</p><p> </p><p>Hope this helps</p>

  • How do we get a hashtable from a webservice?

    Hi,
    I want to get a Hashtable result from a webservice. I want to develop a webservice which recieves some company name, It has to display the list of users in that company and the result should be Hashtable. So I have to get a Hashtable as my webservice result?
    Actually I tried with apache axis, eclipse, tomcat giving the following error as no Deserializor found.
    So help to solve this problem....
    Regards,
    Kumar.
    [email protected]
    Client Code is as follows:
    String targetNamespace = "http://192.168.1.165:8080/GP_USER/services/Validation";
              try {
                   /* Service lookup */
                   ServiceFactory serviceFactory = ServiceFactory.newInstance();
                   javax.xml.rpc.Service service = serviceFactory
                             .createService(new QName(targetNamespace,
                                       "UserValidationService"));
                   Call call = (Call) service.createCall();
                   QName qn = new QName("http://bean.getprice.hgv.com", "tns1:UserDetails");
                   call.setProperty(Call.ENCODINGSTYLE_URI_PROPERTY, "");
                   call.setProperty(Call.OPERATION_STYLE_PROPERTY, "document");
                   // call.setProperty(Call.SOAPACTION_USE_PROPERTY, "literal");
                   call.setTargetEndpointAddress("http://192.168.1.165:8080/GP_USER/services/Validation");
                   call.removeAllParameters();
                   call.setPortTypeName(new QName(targetNamespace, "Validation"));
                   call.setOperationName(new QName(targetNamespace, "displayUsers"));
                   if (call.isParameterAndReturnSpecRequired(call.getOperationName())) {
                        call.addParameter("in0", new QName(
                                  "http://www.w3.org/2001/XMLSchema", "string"),
                                  String.class, javax.xml.rpc.ParameterMode.IN);
                        call.registerTypeMapping(UserDetails.class, qn, new BeanSerializerFactory (UserDetails.class, qn),
                        new BeanDeserializerFactory (UserDetails.class, qn));
                        //call.setReturnType(new QName("http://www.w3.org/2001/XMLSchema", "struct"));
                        QName qVec=new QName("http://www.w3.org/2001/XMLSchema","mapItem");
                        call.setReturnType(qVec);
                   /* Service invocation */
                   comp_name ="ggp";
                   //Hashtable ht = (Hashtable) call.invoke(new Object[] {comp_name});
                   System.out.println(call.invoke(new Object[] {comp_name}));
                   Enumeration e = ht.keys();
                   UserDetails ud;
                   while( e. hasMoreElements() ){
                   ud = (UserDetails) e.nextElement();
                   System.out.println(ud);

    You have to remember that when sending data over a WS using SOAP, you are essentially sending the objects as XML (text). Therefore, when you want to transfer a java Hashtable or any other java object, it must be serialized into into text form at serverside, sent over the network, and finally deserialized from text into the Hashtable at the clientside.
    You cannot just send arbitrary Java objects over a WS and expect Axis to understand them. Axis only maps a subset of XML basic datatypes of java objects. For example, Axis understands boolean, int, byte, etc. But for any object that Axis does not natively understand, you must create a custom serializer/deserializer to transfer complex java objects.
    The issue at hand is interoperability. Look at the link below. In particular, look at the section called "What Axis can send via SOAP with restricted Interoperability"
    http://ws.apache.org/axis/java/user-guide.html#XMLJavaDataMappingInAxis

  • Manged to get separate test ant - can't understand error log

    Hi,
    I managed to get a simple example of Junit running through ANT building but not testing correctly.
    my example test class looks like:
    package com.sims.test;
    public class HelloWorldTest extends junit.framework.TestCase {
        public void testNothing() {
        public void testWillAlwaysFail() {
            assertEquals("", "");
    }this runs fine through eclipse with as a JUnit application.
    my buildfile looks like:
    <project name="TestHelloWorld" default="test" basedir=".">
         <property name="test" location="C:/myProjects/runway_core/guitools/sims/build/classes/com/sims/test"/>
         <property name="tests.src" location="${basedir}"/>
         <path id="test.class.path">
         <pathelement path="C:/eclipse-SDK-3.2.1-win32/eclipse/plugins/org.junit_3.8.1/junit.jar"/>                   
         <!-- the test classes are all in here -->
         <pathelement location="${test}"/>
         </path>
         <!-- Build of the Junit test -->
         <target name="build-tests" description="Build the Junit test">
           <javac srcdir="${tests.src}" destdir="${test}">
             <classpath refid="test.class.path"/>
           </javac>
         </target>
         <!-- Run of the Junit test -->
         <target name="test" description="Run the Junit test"
                    depends="build-tests">
           <junit printsummary="yes" haltonfailure="no">
             <classpath refid="test.class.path"/>
               <formatter type="plain"/>
               <test name="com.sims.test.HelloWorldTest" outfile="result"
                        todir="${test}"/>
           </junit>
         </target> 
         </project>Now it build fine, but when I click on 'test' in the Ant perspective of Eclipse it returns:
    Buildfile: C:\myProjects\runway_core\guitools\sims\src\com\sims\test\fileListingbuild.xml
    build-tests:
    test:
    [junit] Running com.sims.test.HelloWorldTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
    [junit] Test com.sims.test.HelloWorldTest FAILED
    BUILD SUCCESSFUL
    Total time: 1 second
    to the console.
    and there is a log file with:
    Testsuite: com.sims.test.HelloWorldTest
    Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
         Caused an ERROR
    com.sims.test.HelloWorldTest
    java.lang.ClassNotFoundException: com.sims.test.HelloWorldTest
         at java.net.URLClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
         at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
         at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
    I know I probably am doing something simple wrong but can't figure it out.
    Thanks,
    Tri

    java.lang.ClassNotFoundException: com.sims.test.HelloWorldTestThat's about as clear as they get right there.
    Check your CLASSPATH and make sure that your "[subfolders]/com/sims/test" directory is included there.

  • Understanding targetNamespace attribute of the service ant tag

    I am using the servicegen and clientgen ant tasks provided by bea to generate the webservices rpc code for a bean client. Nested in the servicegen task, in the service tag is a targetNamespace attribute that is required
    http://e-docs.bea.com/wls/docs81/webserv/anttasks.html#1080062
    I have garbage in there now and things seem to work. What should I have this value set to. I guess a description of the targetNamespace would really help.
    Thank,
    -Fazle

    in short targetNameSpace of servicegen and autotype should be the one you defined in your schema or wsdl

  • Using WLST with ant. Need help

    I try to create ant task which connects to WLST engine and creates datasource.
    This is build.xml :
    +<?xml version="1.0" ?>+
    +<project name="deploy" default="connect" basedir=".">+
    +<echo> ${wl.home} </echo>+
    +<path id="wl.appc.classpath">+
    +<pathelement location="${wl.home}/server/lib/weblogic.jar"/>+
    +</path>+
    +<taskdef name="wlst" classpathref="wl.appc.classpath" classname="weblogic.ant.taskdefs.management.WLSTTask" />+
    +<target name="connect">+
    +<wlst executescriptbeforefile="true" debug="false">+
    +<script>+
    connect('weblogic','weblogic','t3://localhost:7001')
    +</script>+
    +</wlst>+
    +</target>+
    +</project>+
    Running this is script I'm getting the following error:
    Buildfile: c:\wl-ds.xml
    [echo] C:/Oracle/Middleware11.1.1.4/wlserver_10.3
    connect:
    [wlst] java.lang.NoClassDefFoundError: weblogic/management/scripting/WLSTInterpreterInvoker
    [wlst] Caused by: java.lang.ClassNotFoundException: weblogic.management.scripting.WLSTInterpreterInvoker
    [wlst] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    [wlst] at java.security.AccessController.doPrivileged(Native Method)
    [wlst] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    [wlst] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    [wlst] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    [wlst] at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    [wlst] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    [wlst] Could not find the main class: weblogic.management.scripting.WLSTInterpreterInvoker. Program will exit.
    [wlst] Exception in thread "main"
    BUILD FAILED
    c:\wl-ds.xml:12: Java returned: 1
    Ant founds weblogic.ant.taskdefs.management.WLSTTask but in some reasons cannot find weblogic.management.scripting.WLSTInterpreterInvoker, although they both placed in the weblogic.jar
    I can't understand what I do wrong! Please, help or advice what to do...
    Edited by: creed on 03.03.2011 20:55

    Hi,
    Just wanted to check if the issue was resolved, I have the same issue , Below is the details of the error i get when i try jay's script
    Apache Ant version 1.8.0 compiled on February 1 2010
    Trying the default build file: build.xml
    Buildfile: D:\anttest\build.xml
    Adding reference: ant.PropertyHelper
    Detected Java version: 1.6 in: D:\SYS\JAVA\jdk1.6.0_21\jre
    Detected OS: Windows Server 2008
    Adding reference: ant.ComponentHelper
    Setting ro project property: ant.file -> D:\anttest\build.xml
    Setting ro project property: ant.file.type -> file
    Adding reference: ant.projectHelper
    Adding reference: ant.parsing.context
    Adding reference: ant.targets
    parsing buildfile D:\anttest\build.xml with URI = file:/D:/anttest/build.xml
    Setting ro project property: ant.project.name -> deploy
    Adding reference: deploy
    Setting ro project property: ant.project.default-target -> run
    Setting ro project property: ant.file.deploy -> D:\anttest\build.xml
    Setting ro project property: ant.file.type.deploy -> file
    Project base dir set to: D:\anttest
    +Target:
    +Target: connect
    +Target: run
    Adding reference: ant.LocalProperties
    parsing buildfile jar:file:/D:/SYS/apache-ant-1.8.0/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/D:/SYS/apache-ant-1.8.0/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
    Setting project property: wl.home -> D:\SYS\Weblogic1034\wlserver_10.3
    Adding reference: wl.classpath
    fileset: Setup scanner in dir D:\SYS\Weblogic1034\wlserver_10.3\server\lib with patternSet{ includes: [*.jar] excludes: [] }
    Finding class weblogic.ant.taskdefs.management.WLSTTask
    Loaded from D:\SYS\Weblogic1034\wlserver_10.3\server\lib\weblogic.jar weblogic/ant/taskdefs/management/WLSTTask.class
    Class org.apache.tools.ant.taskdefs.Java loaded from parent loader (parentFirst)
    Class weblogic.ant.taskdefs.management.WLSTTask loaded from ant loader (parentFirst)
    Class java.lang.Object loaded from parent loader (parentFirst)
    Class java.lang.Throwable loaded from parent loader (parentFirst)
    Class org.apache.tools.ant.BuildException loaded from parent loader (parentFirst)
    Class java.lang.Exception loaded from parent loader (parentFirst)
    Class java.lang.IllegalStateException loaded from parent loader (parentFirst)
    Class java.io.Reader loaded from parent loader (parentFirst)
    Class java.io.StringReader loaded from parent loader (parentFirst)
    Class java.lang.String loaded from parent loader (parentFirst)
    Class java.io.IOException loaded from parent loader (parentFirst)
    Class java.io.OutputStream loaded from parent loader (parentFirst)
    Class java.io.FileOutputStream loaded from parent loader (parentFirst)
    +Datatype wlst weblogic.ant.taskdefs.management.WLSTTask
    Setting ro project property: ant.project.invoked-targets -> run
    Attempting to create object of type org.apache.tools.ant.helper.DefaultExecutor
    Adding reference: ant.executor
    Build sequence for target(s) `run' is [connect, run]
    Complete build sequence is [connect, run, ]
    connect:
    [echo] WebLogic Home is : D:\SYS\Weblogic1034\wlserver_10.3
    Class org.apache.tools.ant.types.Path loaded from parent loader (parentFirst)
    Finding class weblogic.ant.taskdefs.management.WLSTScript
    Loaded from D:\SYS\Weblogic1034\wlserver_10.3\server\lib\weblogic.jar weblogic/ant/taskdefs/management/WLSTScript.class
    Class org.apache.tools.ant.Task loaded from parent loader (parentFirst)
    Class weblogic.ant.taskdefs.management.WLSTScript loaded from ant loader (parentFirst)
    Class java.lang.Boolean loaded from parent loader (parentFirst)
    Class java.lang.StringBuilder loaded from parent loader (parentFirst)
    Class org.apache.tools.ant.types.Commandline$Argument loaded from parent loader (parentFirst)
    Class org.apache.tools.ant.util.FileUtils loaded from parent loader (parentFirst)
    Class java.io.PrintWriter loaded from parent loader (parentFirst)
    Class java.io.LineNumberReader loaded from parent loader (parentFirst)
    Finding class weblogic.utils.StringUtils
    Loaded from D:\SYS\Weblogic1034\modules\com.bea.core.utils_1.9.0.0.jar weblogic/utils/StringUtils.class
    Class weblogic.utils.StringUtils loaded from ant loader (parentFirst)
    Class java.lang.SecurityException loaded from parent loader (parentFirst)
    Class java.lang.NoSuchMethodException loaded from parent loader (parentFirst)
    Finding class weblogic.utils.StringUtils$StringMaker
    Loaded from D:\SYS\Weblogic1034\modules\com.bea.core.utils_1.9.0.0.jar weblogic/utils/StringUtils$StringMaker.class
    Class weblogic.utils.StringUtils$StringMaker loaded from ant loader (parentFirst)
    Finding class weblogic.utils.StringUtils$ReflectedStringMaker
    Loaded from D:\SYS\Weblogic1034\modules\com.bea.core.utils_1.9.0.0.jar weblogic/utils/StringUtils$ReflectedStringMaker.class
    Class weblogic.utils.StringUtils$ReflectedStringMaker loaded from ant loader (parentFirst)
    Class java.lang.Class loaded from parent loader (parentFirst)
    Class java.lang.Integer loaded from parent loader (parentFirst)
    Class java.lang.reflect.Constructor loaded from parent loader (parentFirst)
    Class java.lang.reflect.InvocationTargetException loaded from parent loader (parentFirst)
    Class java.lang.IllegalAccessException loaded from parent loader (parentFirst)
    Class java.lang.InstantiationException loaded from parent loader (parentFirst)
    Class java.lang.RuntimeException loaded from parent loader (parentFirst)
    Class java.lang.Character loaded from parent loader (parentFirst)
    Class java.io.File loaded from parent loader (parentFirst)
    Class org.apache.tools.ant.types.CommandlineJava loaded from parent loader (parentFirst)
    [wlst] Executing 'D:\SYS\JAVA\jdk1.6.0_21\jre\bin\java.exe' with arguments:
    [wlst] '-Ddebug=false'
    [wlst] '-DfailOnError=true'
    [wlst] '-DexecuteScriptBeforeFile=true'
    [wlst] '-DscriptTempFile=C:\Users\Administrator\AppData\Local\Temp\2\wlsttempfile214271013.py'
    [wlst] '-classpath'
    [wlst] 'D:\SYS\apache-ant-1.8.0\lib\ant-launcher.jar;D:\SYS\apache-ant-1.8.0\lib\ant-antlr.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-bcel.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-bsf.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-log4j.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-oro.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-regexp.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-resolver.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-xalan2.jar;D:\SYS\apache-ant-1.8.0\lib\ant-commons-logging.jar;D:\SYS\apache-ant-1.8.0\lib\ant-commons-net.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jai.jar;D:\SYS\apache-ant-1.8.0\lib\ant-javamail.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jdepend.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jmf.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jsch.jar;D:\SYS\apache-ant-1.8.0\lib\ant-junit.jar;D:\SYS\apache-ant-1.8.0\lib\ant-netrexx.jar;D:\SYS\apache-ant-1.8.0\lib\ant-nodeps.jar;D:\SYS\apache-ant-1.8.0\lib\ant-stylebook.jar;D:\SYS\apache-ant-1.8.0\lib\ant-swing.jar;D:\SYS\apache-ant-1.8.0\lib\ant-testutil.jar;D:\SYS\apache-ant-1.8.0\lib\ant-trax.jar;D:\SYS\apache-ant-1.8.0\lib\ant.jar;D:\SYS\apache-ant-1.8.0\lib\xercesImpl.jar;D:\SYS\apache-ant-1.8.0\lib\xml-apis.jar;D:\SYS\JAVA\jdk1.6.0_21\lib\tools.jar'
    [wlst] 'weblogic.management.scripting.WLSTInterpreterInvoker'
    [wlst]
    [wlst] The ' characters around the executable and arguments are
    [wlst] not part of the command.
    [wlst] Using input " "
    Execute:Java13CommandLauncher: Executing 'D:\SYS\JAVA\jdk1.6.0_21\jre\bin\java.exe' with arguments:
    '-Ddebug=false'
    '-DfailOnError=true'
    '-DexecuteScriptBeforeFile=true'
    '-DscriptTempFile=C:\Users\Administrator\AppData\Local\Temp\2\wlsttempfile214271013.py'
    '-classpath'
    'D:\SYS\apache-ant-1.8.0\lib\ant-launcher.jar;D:\SYS\apache-ant-1.8.0\lib\ant-antlr.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-bcel.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-bsf.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-log4j.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-oro.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-regexp.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-resolver.jar;D:\SYS\apache-ant-1.8.0\lib\ant-apache-xalan2.jar;D:\SYS\apache-ant-1.8.0\lib\ant-commons-logging.jar;D:\SYS\apache-ant-1.8.0\lib\ant-commons-net.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jai.jar;D:\SYS\apache-ant-1.8.0\lib\ant-javamail.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jdepend.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jmf.jar;D:\SYS\apache-ant-1.8.0\lib\ant-jsch.jar;D:\SYS\apache-ant-1.8.0\lib\ant-junit.jar;D:\SYS\apache-ant-1.8.0\lib\ant-netrexx.jar;D:\SYS\apache-ant-1.8.0\lib\ant-nodeps.jar;D:\SYS\apache-ant-1.8.0\lib\ant-stylebook.jar;D:\SYS\apache-ant-1.8.0\lib\ant-swing.jar;D:\SYS\apache-ant-1.8.0\lib\ant-testutil.jar;D:\SYS\apache-ant-1.8.0\lib\ant-trax.jar;D:\SYS\apache-ant-1.8.0\lib\ant.jar;D:\SYS\apache-ant-1.8.0\lib\xercesImpl.jar;D:\SYS\apache-ant-1.8.0\lib\xml-apis.jar;D:\SYS\JAVA\jdk1.6.0_21\lib\tools.jar'
    'weblogic.management.scripting.WLSTInterpreterInvoker'
    The ' characters around the executable and arguments are
    not part of the command.
    [wlst] java.lang.NoClassDefFoundError: weblogic/management/scripting/WLSTInterpreterInvoker
    [wlst] Caused by: java.lang.ClassNotFoundException: weblogic.management.scripting.WLSTInterpreterInvoker
    [wlst] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    [wlst] at java.security.AccessController.doPrivileged(Native Method)
    [wlst] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    [wlst] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    [wlst] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    [wlst] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    [wlst] Could not find the main class: weblogic.management.scripting.WLSTInterpreterInvoker. Program will exit.
    [wlst] Exception in thread "main"

  • If statement in Ant

    Hi,
    Does anyone tell me how to make "if" statement in Ant? I'd like to execute some target if certain conditions are satisfied. <condition> or <available> just sets property values and cannot be "if" statement.
    Let's say, if a property "flag" is true, then I'd like to execute a target called "target1". How can I do this?
    thanks,
    -tom

    most tasks or targets have the ability to check the existence or non-existence of properties. The actual value of a property is not used, its existence is checked.
    The condition task can be used to bring a property in existence under certain conditions.
    Other than that I suggest looking at the ant documentation, it is pretty comprehensive and not hard to understand.

  • Problem with getAttribute() for Booleans

    Hi
    We have an Application which has undergone all the migration path from JDeveloper 9i beta up to JDeveloper 9.0.5.2 (in several steps certainly :-) ) . Now we try do the next step: we want to upgrade from 9.0.5.2 to 10.1.3.
    But there is a problem with Boolean attributes:
    Since there were some problems with Booleans in elder versions of JDeveloper all our Booleans are stored in Attributes of type VARCHAR2(1) ("1" is TRUE, "0" is FALSE). This worked well since 9.0.5.2. But now in JDeveloper 10.1.3 all Boolean Attributes return FALSE, no matter of the content of the database. Since we do not want to convert our data in the database I am now looking for a way, how I can enable this Application to correctly read Booleans from VARCHAR2(1) .
    I've already found some classes like "TypeFactory" and "TypeMapEntries", and I've found the Property "jbo.TypeMapEntries". But I've found no clue, how to use them for my problem.
    Can anyone give me a hint?
    Thanks in advance
    Frank Brandstetter

    You have several problems:
    1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
    2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
    All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
    Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.

Maybe you are looking for

  • ALV Tree and set_table_for_first_display problem

    I am trying to create an alv tree.  I have some sample code that uses the sflight table and this works fine however when i replace sflight with my internal structure and table it crashes at set_table_for_first_display with a "Field symbol has not bee

  • Apple Apps like Weather, the App Store and even the Facebook App don't work on WIFI

    Since a few days all my apple apps (Itunes, AppStore, Weather) don't work via Wifi. The strange thing is that all other apps work without problems (just Facebook and Youtube don't view profile pictures). Via 3G all apps work without any problems. I j

  • Problem compiling PL/SQL code

    I am having problmes compiling the following piece of pl/sql code: declare v_servicekey services.servicekey%type; v_tmodelkey tmodels.tmodelkey%type; l_bindingid bindingtemplates.bindingid%type; i_rowlimit number(28); begin select bindingid into l_bi

  • Screen won't rotate to landscape when in iMessage (iPhone 6)

    Is there a trick to get the screen to rotate into landscape mode and back to portrait when in iMessage on the iPhone 6?  This isn't the only app having the issue.

  • Entering login&password only one time?

    Hello, we have an appllication that is called from another by opening new brower window with URL http://..../pls/htmldb/f?p=107:1:::::P1_ID:12345 The user is redirected to login page and after succesfully enter his login and password id redirected to