Simple win32 JNIEnv problem

I am very new to using jni on windows and am having a C++ compile time problem with a seemingly very simple program. Basically I am trying to do a callback on a java file from my native C++ code. The problem is listed after the following source code excerpts:
<Java file>
class TestJni
     static
          System.loadLibrary("TestJni");
     private native void print();
     public static void main( String [] args )
          new TestJni().print();     
     public void callback()
          System.out.println( "Callback called" );     
<C++ file>
#include <TestJni.h>
#include <iostream.h>
JNIEXPORT void JNICALL Java_TestJni_print( JNIEnv *env, jobject obj )
     cout << "Inside C++" << endl;
     jclass cls = (*env)->GetObjectClass( env, obj );
     jmethodID mid = (*env)->GetMethodId( env, cls, "callback", "()V" );
     if( mid == NULL )
          cout << "Method id was NULL, returning" << endl;
          return;
     (*env)->CallVoidMethod( env, obj, mid );
     return;
Now the actual compile time errors that I am getting from either Visual C++ or command line "cl -I. -IC:\j2sdk1.4.0_01\include -IC:\j2sdk1.4.0_01\include\win32 -MD -LD TestJni.cpp -FeTestJni.dll" are:
d:\java\code\jni_test\testjni.cpp(9) : error C2819: type 'JNIEnv_' does not have an overloaded member 'operator ->'
c:\j2sdk1.4.0_01\include\jni.h(750) : see declaration of 'JNIEnv_'
d:\java\code\jni_test\testjni.cpp(9) : error C2227: left of '->GetObjectClass' must point to class/struct/union
d:\java\code\jni_test\testjni.cpp(10) : error C2819: type 'JNIEnv_' does not have an overloaded member 'operator ->'
c:\j2sdk1.4.0_01\include\jni.h(750) : see declaration of 'JNIEnv_'
d:\java\code\jni_test\testjni.cpp(10) : error C2227: left of '->GetMethodId' must point to class/struct/union
d:\java\code\jni_test\testjni.cpp(18) : error C2819: type 'JNIEnv_' does not have an overloaded member 'operator ->'
c:\j2sdk1.4.0_01\include\jni.h(750) : see declaration of 'JNIEnv_'
d:\java\code\jni_test\testjni.cpp(18) : error C2227: left of '->CallVoidMethod' must point to class/struct/union
Any help would be greatly appreciated. This example is pretty much taken from the book "The Java Native Interface: Programmer Guide and Specification". Thats why I can't understand why it doesn't work.

It was listed this way in the book, honestly. It was almost a complet copy and paste. I would like to know if this is due to the fact that I am on win32 and their are differences between platforms. Do you have any ideas here? It is even a sun certified book, i thought this thing was like the bible for jni.
in the book they always seem to pass env into all the methods, whereas when i looked at jni.h it doesn't expect env because it simply wraps that up for you, for example:
jmethodID GetMethodID(jclass clazz, const char *name,
               const char *sig) {
return functions->GetMethodID(this,clazz,name,sig);
What the hell is going on here, is this book out of date or just plain wrong?

Similar Messages

  • SIMPLE Database Design Problem !

    Mapping is a big problem for many complex applications.
    So what happens if we put all the tables into one table called ENTITY?
    I have more than 300 attributeTypes.And there will be lots of null values in the records of that single table as every entityType uses the same table.
    Other than wasting space if I put a clustered index on my entityType coloumn in that table.What kind of performance penalties to I get?
    Definition of the table
    ENTITY
    EntityID > uniqueidentifier
    EntityType > Tells the entityTypeName
    Name >
    LastName >
    CompanyName > 300 attributeTypes
    OppurtunityPeriod >
    PS:There is also another table called RELATION that points the relations between entities.

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    check the coloumn with WHERE _entityType='PERSON'
    as there is is clustered index on entityType...there
    is NO performance decrease.
    there is also a clustered index on RELATION table on
    relationType
    when we say WHERE _entityType ='PERSON' or
    WHERE relationType='CONTACTMECHANISM'.
    it scans the clustered index first.it acts like a
    table as it is physically ordered.I was thinking in terms of using several conditions in the same select, such as
    WHERE _entityType ='PERSON'
      AND LastName LIKE 'A%' In your case you have to use at least two indices, and since your clustered index comes first ...
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Have you ever thought of using constraints in your
    modell? How would you realize those?
    ...in fact we did.We have arranged the generic object
    model in an object database.The knowledge information
    is held in the object database.So your relational database is used only as a "simple" storage, everything has go through your object database.
    But the data schema is held in the RDBMS with code
    generation that creates a schema to hold data.If you think that this approach makes sense, why not.
    But in able to have a efficent mapping and a good
    performance we have thought about building only one
    table.The problem is we know we are losing some space
    but the thing is harddisk is much cheaper than RAM
    and CPU.So our trade off concerated on the storage
    cost.But I still wonder if there is a point that I
    have missed in terms performance?Just test your approach by using sufficiently data - only you know how many records you have to store in your modell.
    PS: it is not wise effective using generic object
    models also in object databases as CPU cost is a lot
    when u are holding the data.I don't know if I'd have taken your approach - using two database systems to hold data and business logic.
    PS2: RDBMS is a value based system where object
    databases are identity based.we are trying to be in
    the gray area of both worlds.Like I wrote: if your approach works and scales to the required size, why not? I would assume that you did a load test with your approach.
    What I would question though is that your discussing a "SIMPLE Database Design" problem. I don't see anything simple in your approach when it comes to implementation.
    C.

  • Simple SWF File problems

    Hello all, im trying to create a very simple swf file, but have come  across some problems.
    The file i want to create is very much like this - http://davidtest.webcastglobal.com/swf2/flash.swf
    This swf allows me to import it into Flex, and control which frame is  being viewed.
    I achieve this using a app that can be found here -
    http://davidtest.webcastglobal.com/swf2/Main.html
    When you press Next or Previous, it jumps forward or backward a frame.
    Now i want to create a swf file like the ball file, although it will  just contain a series of images, 5 for example.
    I tried creating such a file in Flash, using both AS2 and AS3.
    I created a project with 5 frames, and put an image on each frame,  i  then put the "stop();" tag on each frame.
    When i imported it into my flex app, flex cudnt communicate with it.
    So the ball flash file has been made in a different way ?
    Can anyone shed some light on the situation please?

    Can no one help me on this ?

  • Simple query performance problem

    Hey!
    I'm using two simple XQUpdate queries in my wholedoc container.
    a) insert nodes <node name="my_name"/> as last into collection('xml_content.dbxml')[dbxml:metadata('dbxml:name')='document.xml']/nodes[1]
    b) delete node collection('xml_content.dbxml')[dbxml:metadata('dbxml:name')='document.xml']/nodes[1]/node[@name='my_name'][last()]
    The queries are operating on the same document.
    1) First a bunch of 'insert' queries has been executed (ca.50),
    2) Then a bunch of delete queries (ca. 50).
    The attribute name of element node varies.
    After a couple of iterations 1) and 2) each XQUpdate statement takes a lot of time to be completed (ca. 5-10 secs, whereas before it took much less then a second).
    The number of node elements in nodes element never exceeded 50. And eventually it works very slow even with 2 node elements.
    Does anybody have an idea what goes wrong after certain number of queries? What are the possible solutions here? How can I examine what is wrong?
    I didn't find relevant information in DB XML docs. Maybe I should look at BDB docs?
    Thanks in advance,
    Vyacheslav

    Here is a patch to fix the problem in 2.4.16. Note that the slowdown that this patch fixes only applies to whole document containers.
    Lauren Foutz
    diff -ru dbxml-2.4.16-orig/dbxml/src/dbxml/Indexer.cpp dbxml-2.4.16/dbxml/src/dbxml/Indexer.cpp
    --- dbxml-2.4.16-orig/dbxml/src/dbxml/Indexer.cpp     2008-10-21 17:27:22.000000000 -0400
    +++ dbxml-2.4.16/dbxml/src/dbxml/Indexer.cpp     2009-04-27 14:06:40.000000000 -0400
    @@ -477,7 +477,8 @@
                        if(updateStats_) {
                             // Get the size of the node
                             size_t nodeSize = 0;
    -                         if(ninfo != 0) {
    +                         // Node size is kept only for node containers
    +                         if(ninfo != 0 && container_->isNodeContainer()) {
                                  const NsFormat &fmt =
                                       NsFormat::getFormat(NS_PROTOCOL_VERSION);
                                  nodeSize = ninfo->getNodeDataSize();
    @@ -487,18 +488,22 @@
                                                        0, /*count*/true);
    -                         // Store the node stats for this node
    +                         /* Store the node stats for this node, only the descendants
    +                          * of the node being partially indexed are being removed/added
    +                          */
                             StructuralStats *cstats = &cis->stats[0];
    -                         cstats->numberOfNodes_ = 1;
    +                         cstats->numberOfNodes_ = this->getStatsNumberOfNodes(ninfo);
                             cstats->sumSize_ = nodeSize;
                             // Increment the descendant stats in the parent
                             StructuralStats *pstats = 0;
                             if (pis) {
                                  pstats = &pis->stats[0];
    -                              pstats->sumChildSize_ += nodeSize;
    -                              pstats->sumDescendantSize_ +=
    -                                   nodeSize + cstats->sumDescendantSize_;
    +                              if (container_->isNodeContainer()) {
    +                                   pstats->sumChildSize_ += nodeSize;
    +                                   pstats->sumDescendantSize_ +=
    +                                        nodeSize + cstats->sumDescendantSize_;
    +                              }
                                  pstats = &pis->stats[k.getID1()];
                                  pstats->sumNumberOfChildren_ += 1;
    diff -ru dbxml-2.4.16-orig/dbxml/src/dbxml/Indexer.hpp dbxml-2.4.16/dbxml/src/dbxml/Indexer.hpp
    --- dbxml-2.4.16-orig/dbxml/src/dbxml/Indexer.hpp     2008-10-21 17:27:18.000000000 -0400
    +++ dbxml-2.4.16/dbxml/src/dbxml/Indexer.hpp     2009-04-27 14:08:20.000000000 -0400
    @@ -19,6 +19,7 @@
    #include "OperationContext.hpp"
    #include "KeyStash.hpp"
    #include "StructuralStatsDatabase.hpp"
    +#include "nodeStore/NsNode.hpp"
    namespace DbXml
    @@ -181,6 +182,8 @@
         void checkUniqueConstraint(const Key &key);
         void addIDForString(const unsigned char *strng);
    +     
    +     virtual int64_t getStatsNumberOfNodes(const IndexNodeInfo *ninfo) const { return 1; }
    protected:     
         // The operation context within which the index keys are added
    diff -ru dbxml-2.4.16-orig/dbxml/src/dbxml/nodeStore/NsReindexer.cpp dbxml-2.4.16/dbxml/src/dbxml/nodeStore/NsReindexer.cpp
    --- dbxml-2.4.16-orig/dbxml/src/dbxml/nodeStore/NsReindexer.cpp     2008-10-21 17:27:22.000000000 -0400
    +++ dbxml-2.4.16/dbxml/src/dbxml/nodeStore/NsReindexer.cpp     2009-04-27 14:04:42.000000000 -0400
    @@ -103,6 +103,7 @@
              const DocID &did = document_.getID();
              DbWrapper &db = *document_.getDocDb();
              ElementIndexList nodes(*this);
    +          partialIndexNode_ = node->getNid();
              do {
                   bool hasValueIndex = false;
                   bool hasEdgePresenceIndex = false;
    @@ -124,6 +125,7 @@
              nodes.generate(*this);
    +     partialIndexNode_ = 0;
         return ancestorHasValueIndex;
    @@ -203,6 +205,19 @@
    +
    +int64_t NsReindexer::getStatsNumberOfNodes(IndexNodeInfo *ninfo) const
    +{
    +     /* Get the number of this node being removed or added, only the descendants
    +      * of the node being partially indexed are being removed/added
    +      */
    +     DBXML_ASSERT(!partialIndexNode_ || (ninfo != 0));
    +     if (!partialIndexNode_ || (partialIndexNode_.compareNids(ninfo->getNodeID()) < 0)) {
    +          return 1;     
    +     }
    +     return 0;
    +}
    +
    const char *NsReindexer::lookupUri(int uriIndex)
    diff -ru dbxml-2.4.16-orig/dbxml/src/dbxml/nodeStore/NsReindexer.hpp dbxml-2.4.16/dbxml/src/dbxml/nodeStore/NsReindexer.hpp
    --- dbxml-2.4.16-orig/dbxml/src/dbxml/nodeStore/NsReindexer.hpp     2008-10-21 17:27:18.000000000 -0400
    +++ dbxml-2.4.16/dbxml/src/dbxml/nodeStore/NsReindexer.hpp     2009-04-27 14:09:04.000000000 -0400
    @@ -45,6 +45,7 @@
         const char *lookupUri(int uriIndex);
         void indexAttribute(const char *aname, int auri,
                       NsNodeRef &parent, int index);
    +     virtual int64_t getStatsNumberOfNodes(IndexNodeInfo *ninfo) const;
    private:
         IndexSpecification is_;
         KeyStash stash_;
    @@ -54,6 +55,9 @@
         // this is redundant wrt Indexer, but dict_ in Indexer triggers
         // behavior that this class does not want
         DictionaryDatabase *dictionary_;
    +          
    +     // The node being indexed in partial indexing
    +     NsNid partialIndexNode_;
    }Edited by: LaurenFoutz on May 1, 2009 5:47 AM

  • Simple VISA Setup Problem

    Hi all,
    I'm having issues working with VISA in LabVIEW. Previously, I've used Peek/Poke VIs (before they were VISA VIs) that allowed me to read and write directly to registers at a given Windows address. I have a new, custom PCI Express board that uses the same architecture that I've worked with previously only this time I'm trying to access the registers using VISA.
    As this is my first time using VISA, I'm having some setup problems. Yesterday I got to a state where logically things should work but I still end up getting an error when I try to run a simple VISA Open command (see attached screenshot).
    The initial problem I had was I was not able to acquire a VISA resource that opens a session to my PCIe board...it would simply not show up on the resource list. After reading around I discovered I needed to create a custom VISA driver for my board. Once I did that using the VISA Driver Wizard, the device showed up in my list (as seen in the screenshot). I wrote the simplest of all VIs where I simply open that VISA resource, however, the error seen in the screenshot is produced.
    I'm pretty sure this is a simple setup issue, but does anyone know what I'm doing wrong?
    Attachments:
    Screenshot1.JPG ‏145 KB

    Hi bonhomme,
    I see you're having some issues using VISA. It sounds like you're new to VISA, so I wanted to pass along some information that we have availble on this software. This link gives good general information about VISA, and the related links are extremely helpful in finding specific issues.
    Thank you for attaching your error. This is extremely helpful in debugging since we can actually see the numbers. There is another forumn that talks about these at this link and at this link. 
    Hope this helps you out!!
    Lea D.
    Applications Engineering
    National Instruments

  • Simple DataGrid validation Problem

    hi friends
                   I am working on a application in which i  m facing a problem.i have a datagrid having two column field one is simple datagrid column and in other  datagrid column i render textinput as a component. there are only two row in my datagrid.so now i have to apply validation on that data grid.i mean if any textinput componet which is render in second column in data grid left blank and i click on save button then there should be validation Alert messg.
    i am facing a problem on gettin id(instance) of that two rendered textinput component.Please help me out.
    Thanks and Regards
       Vineet Osho

    Hi Vineet Osho,
    You can try this...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
        >
        <mx:Script>
            <![CDATA[
             import mx.utils.StringUtil;
             import mx.collections.ArrayCollection;
                import mx.controls.TextInput;
                import mx.events.DataGridEvent;
                import mx.controls.Alert;
                public var arr:Array = [];
                public  var incrementer:int;
                private function validateTextInputs():void
                 var strIndexes:String="";
                 var gridDP:ArrayCollection = dataGrid.dataProvider as ArrayCollection;
                 for(var i:int=0;i<gridDP.length;i++)
                  if(StringUtil.trim(gridDP.getItemAt(i).displayText) == "")
                   strIndexes += (i + 1) + ",";
                 if(strIndexes.length > 0)
                  strIndexes = strIndexes.substring(0,strIndexes.length-1);
                  Alert.show("The TextInputs " + strIndexes + " are empty.");
            ]]>
        </mx:Script>
        <mx:DataGrid id="dataGrid" horizontalCenter="0" verticalCenter="0" width="400" height="200">
            <mx:columns>
                <mx:DataGridColumn headerText="First" width="60" dataField="artist" editable="false"/>
                 <mx:DataGridColumn   width = "60" headerText = "Premium %(e.g. Percentage as 100)" >
                       <mx:itemRenderer>
                            <mx:Component>
                                 <mx:TextInput styleName="TextInputRight" focusOut="data.displayText=this.text;" width="100" text="{data.displayText}">
                                 </mx:TextInput>
                            </mx:Component>
                        </mx:itemRenderer>
                  </mx:DataGridColumn>
           </mx:columns> 
                  <mx:dataProvider>
                    <mx:ArrayCollection>
                      <mx:Array>
                        <mx:Object title="Stairway to Heaven" artist="Led Zepplin" displayText=""/>
                        <mx:Object title="How to Save a Life" artist="Fray" displayText=""/>
                      </mx:Array>
                    </mx:ArrayCollection>
                  </mx:dataProvider>
          </mx:DataGrid> 
          <mx:Button id="btn" label="click"  x="527" y="450" click="validateTextInputs()" />
    </mx:Application>
    Thanks,
    Bhasker

  • Simple Mobile Bookshop problem

    Hello,
    I have to write some simple program using choicegroups, textfields, forms and other basic elements. I's kind of bookshop, I have written almost everything, but I have huge problem with displaying basket.
    this is the code for whole my app [ if anybody want to run it, just delete the lines with images ]
    [http://www.iie.org.pl/book.java]
    u see, there are 5 categories of books [ and five ChoiceGroups for them ], user can choose couple of books from different categories, and he/she get the price, this is working just fine, the problem is to display them, I've try to move choosen to separate array, but it can hold just 5 values [ ( no, I can't make it larger ) check the code [ public int checker () ]]. To be honest I don't know how to move it on, try different things [ ignore the last two methods, just for testing reasons ], but without success. Can You just focus on this basket and not making comments about the rest of the code [ I know its messy ]. This is my first larger progam for mobiles.

    OK, this will add the books in the array:
    public int checker( ChoiceGroup chg, int temp[], Form fr){
            String message="";
            boolean arra [] = new boolean[chg.size()];
             chg.getSelectedFlags(arra);
          for (int i = 0; i < arra.length; i++) {
              if (arra) {
    //this will add the books in the array books[]
    books[co] = chg.getString(i);
    //checking the array
    System.out.println(books[co]+" co = "+co);
    co += 1;
    fsuma = temp[i]+ fsuma;
    message = "" + fsuma ;
    //bask_help(chg.getString(i));
    }Edited by: Sypress on Mar 15, 2010 2:11 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Simple project,serious problem

    my flex mobile project for android is so simple that it just outputs a string "hello world",but i get serious problem on many android devices when launch it after successfully installed while some devices work well.can anybody explain why?i use FB4.6+air3.3.

    Hi
    Easy answer is - No not with standard iMovie any version (with plug-ins and
    iMovie prior to iM '08 or 09 - may be)
    Suggested one - Yes but You don't need pro version Express will do it as nicely.
    I think it also can be done with QuickTime-pro.
    I would use FinalCut Express and import the movie here and re-size.
    If only a DVD copy I would either
    • copy back to a new miniDV tape (via a DVD-Player and Camera) - or -
    • use Roxio Toast™ and back convert to streamingDV
    then use this in FCE
    Yours Bengt W

  • Simple action creating problem

    Hi. I'm having a problem with this simple script. All I want
    to is "onClipEvent" go to the next frame in the current movie. I
    have it set to _root - but want to use the next frame in the movie
    symbol only. Anyone have advice?

    Is there any sites you guys know of that actually teaches you
    the concept of coding.(actionscript)

  • Simple Travelling salesman problem

    Dear Anyone,
    i know this query mite sound silly but the fact is i haven found a neat solution to this simple problem on the internet or the forum.. All existing solutions are way too complicated using Genetic algorithms or annealing etc.
    I have a list of 10 places with respective lat/lon. I want to sort them in the travelling Salesman problem taking the first place as origin. Since there are only 10 places, i guess even Brute Force method is practical. So can anyone help out with sample codes or links??? I am kinda newbie in this area of coding..

    Well there are a tonne of ways to tackle this. Since you want to do it brute force, then I suggest you tackle it the simplest possible way:
    Enumerate all of the possible routes through the graph.
    If you think this is too difficult and don't know where to start... then you're going to have to think about it some more. I'm not just going to give you the code - that's not what these forums are for. Frankly this is a homework problem, and regardless of whether it's literally your homework, you're not going to learn anything unless you tackle it yourself.
    I'm happy to give you some advice though. Start off figuring out the steps you'd have to do to tackle this manually. Start with a graph with two nodes. That should be easy. Then try one with three. Doable. Try four. At that point you should have figured out the general algorithm that you're using.
    Once you've figured out how you solve this manually, you need to start coding this up. As indicated, you need to decide what your data structures are going to be - concentrate on how you're going to represent the nodes, the permitted routes between them, and their distances.
    If you get stuck with the coding we can help you with that too, but you have to show that you've made an effort. No free lunch.

  • Simple SQL syntax problem

    Ok, I'm sure this is a very simple problem but I'm confused.
    Statement s = con.createStatement();
    s.execute("SELECT COUNT (*) FROM table WHERE id = 6 AND somechar = 'N'");java.sql.SQLException: Syntax error or access violation message from server: "You have an error in y
    our SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax
    to use near '(*) FROM table WHERE id = 6 AND somechar = 'N'' at line 1"
    This works fine when input into the phpMyAdmin database interface. Is there something blatantly wrong with my syntax, or...?

    Maybe it doesn't like the space between COUNT and (*)
    %Yuck.
    Yep, that was it. Thanks.
    Weird, I'm accustomed to programs ignoring most whitespace as long as it doesn't create ambiguity.

  • Simple FileNotFound exception problems.

    Hello all, just got a quick question if anyone can find the time. I have been having difficulty getting Sun 1.4.1 CE to find textfiles for me, no matter how I do it. (These same exact programs run fine on the UNIX machines we use at school) An example could best illustrate this i suppose
    //HelloFileRead.java - reading a text file
    import tio.*;
    class HelloFileRead {
    public static void main(String[] args)
    ReadInput in = new ReadInput("hello.txt");
    System.out.println(in.readLine());
    This program is straight from the Textbook that we use (Java by Dissection) and again, works fine at school (as long as the hello.txt file is located in the same directory that the source code is located)
    however, no matter where I put the hello.txt file(same dir as the Source, and practically every other directory on my machine :D ) it gives me a single FileNotFoundException.
    I am assuming that there is an option that I am missing, but after pouring over the documentation and trying every concievable option(including uninstall/delete/reinstall) to no avail.
    Any help would be appreciated. this supposedly simple problem is driving me mad!

    '\' is the escape character. To indicate you're not using it in this sense, place another '\' in front of it, like this
    ReadInput in = new ReadInput("c:\\helloproj\\hello.txt");"
    Also, you have to check whether your text file is in the same directory as your class file.
    Cheers.

  • Firefox.exe is not a valid win32 application problem

    I use Firefox very long time. But now I have problem. I mean Big problem! Few days ago I downloaded the latest Firefox (still beta version in Serbian), and used it day or two. After that period Firefox just "shut down". I couldn't start it again, so I wipe it off, and reinstall but nothing happened. I couldn't star it still. (I installed than English version - but didn't work again). When I tried to started Firefox got message, literally: firefox.exe is not a valid win32 application. And so constantly. I wiped again, reinstall, but result is the same. I tried this - http://support.mozilla.com/sr-CYRL/kb/Firefox%20exe%20is%20not%20a%20valid%20win32%20application, but didn't work for me.What should I do? Please, help me.

    ewan,
    i was dealing w/ the same exact problems, and here's what i did to sucessfully install the latest itunes 7.5 on my laptop:
    1. i completely took everything dealing with apple/itunes out of my system (e.g. uninstalling itunes from my laptop)
    2. went to http://www.oldapps.com/itunes.htm and downloaded version 7.4.3 to my laptop
    3. when this was loaded on my laptop, i then went into itunes and went to the "help" tab and then went to "check for updates" and it alerted me that there was version 7.5 available
    4. i then chose to update to that, and it worked fine and now i am sucessfully running 7.5.
    I hope the helps, let me know if it does or not. good luck

  • Simple flex layout problem

    I have what I would expect to be a very simple layout, but
    can't get it to behave the way I thought it should.
    Basically, my application is set to 100% width and height.
    Within that, I have an HDividedBox with 80% width and height.
    Within that, I have 2 VBoxes in which the content is dynamic and
    can grow to any size. The problem is that my inner VBoxes push the
    HDividedBox larger than 80% of the Application resulting in the
    application showing scrollbars instead of the inner VBoxes. All I
    want is for the HDividedBox to remain 80% of the Application
    (browser window) and for the inner VBoxes to do their own scrolling
    if needed. My code is attached.
    Thanks

    The short answer is that what is happening is supposed to
    happen - it is not a bug. Personally, I think this is not the way
    it should work, but that's just my opinion. Here's what's
    happening:
    The Box containers are designed to grow to accomodate their
    children. If you have an HBox, each time you add a child component
    the HBox gets bigger. Makes sense, right? You can position the HBox
    within its parent using x and y properties or the top and left
    styles.
    Here's where it gets weird for me. If you use percentage
    sizes such as width="100%" on the HBox, this is merely a guide to
    how large it is. The HBox will continue to expand to show all of
    its children. When it's parent gets a report of the HBox size that
    it has exceeded its boundaries, the parent will either a) also grow
    larger or b) put up scrollbars - on itself, not on the HBox.
    It is the (a) case you are facing. You've used percentage
    sizing and so the containers are all expanding to fit their
    children.
    The solution is to set the width and/or height to absolute
    values. If you give the HBox a width="600" and you add children
    such that it gets larger than 600 pixels, the HBox won't expand, it
    will show a scrollbar.
    First, set the HDividedBox's width to be {width*.8} which
    will be 80% of the Application's width. Then set its children's
    height and width values to be calculations as well:
    height="{hdivbox.height*.8}" width="{hdivbox.width}" where hdivbox
    is the id of the HDividedBox.
    I can live with the behavior for percentages, but what I find
    frustrating is that the right and bottom constraint styles have no
    effect either. To me, setting top="5" and bottom="5" on a VBox
    should establish a calculated height. But it does not. It acts like
    the height="90%".
    You'll have to play with the calculations a bit, but that's
    the only way this will layout properly in my experience. Please
    file an enhancement request at
    http://bugs.adobe.com if you feel
    strongly about the way this behaves.

  • Validation simple form. (if) problem

    I am trying to create a simple validate on my input form. The form reloads itself when the submit button is pressed and then checks that first the submit has been pressed then if so check each feild if so redirect, if not reload the page with an error message.:
    <%@ page import="java.sql.*,mybookmark.*,java.sql.Date.*,java.text.*,java.util.*" %>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <title>untitled</title>
      </head>
      <body>
    <%
      String Name = request.getParameter("name");
      String Username = request.getParameter("user");
      String Password = request.getParameter("passA");
      String Validate= request.getParameter("sent");
      String valid="false";
      String error="";
      if (Validate == "Register"){  //HERES MY PROBLEM ITS NOT RUNNING THIS CODE
      valid="true";
        if (Name =="" ||Name == null){
        error="Please Enter a Name";
        valid="false";
        } else if (Username =="" ||Username == null){
        error="Please Enter a Username";
        valid="false";
        } else  if (Password=="" ||Password == null){
        error="Please Enter a Password";
        valid="false";
        if (valid =="true"){
           }else {
            out.println(error);
            response.sendRedirect("newuser2.jsp");
    %> 
      Please conplete the Registry Form.
      <form method="post" action="newuser.jsp">
      <p>Please enter your Full Name</p>
      <input type="text" name="name" value=""/>
      <p>Please enter a User Name</p>
      <input type="text" name="user" vaule=""/>
      <p>Please enter a Password:( between 6 and 10 characters)</p>
      <input type="password" name="passA" vaule=""/>
      <p>Please re-enter your Password:</p>
      <input type="password" name="passB" vaule=""/>
      <br/><br/>
      <input type="submit" name="sent" value="Register"/>
      <input type="reset" name="reset" value="Reset"/>
      </form>
      </body>
    </html>the whole thing runs but it is not running the IF statement:
    if (Validate == "Register"){it just by passes this completely.
    any ideas.

    thanks for that, not offended, my java is limited, tried that as we speak and got the following error:
    500 Internal Server Error
    java.lang.NullPointerException
         at newuser.jspService(newuser.jsp:19)
         [newuser.jsp]
         at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
         at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:552)

Maybe you are looking for