SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    May 2001
    Location
    Folsom, CA, USA
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Swing controls not found

    The alpha version of a new java app has been released by our development team. Currently, you start up from a .bat file, which opens a DOS window and runs a series of setup initializations, and then the client login UI appears on top.

    I have set my classpath in the autoexec file, as well as placed a copy of the SilkTest_Java2.jar in the /ext directory for the JDK. The Silk Status function seems to think all is OK.

    The problem: When recording window declarations, the forms seem to be recognized (JavaDialogBox, JavaMainWin, etc) but none of the Swing controls are found.

    What am I missing?


  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Swing controls not found

    Clorenger,

    Some of my greatest frustrations with Silk & Java have been almost exactly as you describe. I recently burned 3+ days troubleshooting a problem exactly as you described. Finally wrote a script with a recursive routine that placed the SilkTest_Java2.jar file in every folder on the entire hard drive. I figured that way it HAD to be in the @#$%^$^ classpath. Well, it worked, thus confirming my suspicion that it was a classpath issue. Then I started shaving away till I discovered that I had two /ext folders. One was under JavaSoft in my Progra~1 dir and the other was under JDK1.3.

    I'd bet you dollars against donuts that there is something similar in your situation. I wish you well with it and hope you don't pull out too much hair trying to solve this.

    [This message has been edited by DJGray (edited 06-06-2001).]

  3. #3
    Junior Member
    Join Date
    May 2001
    Location
    Portland, OR
    Posts
    27
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Swing controls not found

    What DJGray said is possible and I've seen the same type of conflict before. The conflict is having two sets of java libraries on your system. Then you place the SilkTest_Java2.jar file in lib/ext of library 1, when the java application is actually being executed using library 2.

    Also, if you run the .bat script from a command window, you should see a message appear stating 'JDKVersion = _version_'. This message is written by the silk code. If you execute your .bat script and this message doesn't appear, that means that the .jar file was not loaded by the application.

    Lastly, make sure that you have enabled the Java Application extentions. You need to do this in two places. The first being in Silk Test under the menu item Options|Extentions. The second is, Start Menu|Programs|Silk Test|Extention Enabler.

    Hope this helps.

    ------------------

  4. #4
    Junior Member
    Join Date
    May 2001
    Location
    Folsom, CA, USA
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Swing controls not found

    Thanks for a few leads on items to check. I did find the two /ext directories, and had placed copies of the SilkTest_Java2.jar file in both places. I was worried that having duplicated the file was my problem - guess not if you could have a copy in every folder on the HD and run just fine! I hope it doesn't come to that.

    I'm guessing that the problem must be that the .bat file doesn't pickup my personal classpath settings. I'm not seeing anything launched that looks like JDK=...

  5. #5
    Junior Member
    Join Date
    May 2001
    Location
    New York.NY
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Swing controls not found

    OK:

    try to append the following to your .bat file

    java -classpath ;c:\partner\javaex\silktest_java2.jar

    Good Luck

    ------------------

  6. #6
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Swing controls not found

    Road's suggestion is another possibility. I've done that as well; editing the product's batch file to include the necessary jar in the classpath. There is something in the purist in me that objects to modifying production code in any way (even if it is just a batch file) because it theoretically "taints" the test environment.

    ------------------

  7. #7
    Junior Member
    Join Date
    May 2001
    Location
    Folsom, CA, USA
    Posts
    9
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Swing controls not found

    I agree with you on not wanting to "taint" the production files. But I finally threw up my hands and did it anyway, not seeing another option that was responding.

    The engineer who wrote the bat files felt that setting the first element of the classpath to ".;" would be enough to pick up my personal settings. Unfortunately, that didn't work either, so it looks like I will need to edit for each build.

    I was VERY happy to finally see controls recognized, so thank you all very much for your help! Pushbuttons and Menu items seem to be recognized with ease. Looks like I'll be recording classes for a lot of other objects though. Here's my list of objects identified as "CustWin":

    JRootPane
    JPanel
    JLayeredPane
    JSplitPane
    JScrollPane
    JViewPort
    JTabbedPane
    JMenuBar

    These seem to all be Swing 1.1.1 items. Given that we're on an older SilkTest release (5.0.2), it could be that these just weren't defined yet. Or is there some way to tell SilkTest that I'm using Swing 1.1.1 ?



    [This message has been edited by clorenger (edited 06-07-2001).]

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:37 PM.

Copyright BetaSoft Inc.