SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Need Help on Scripting Java in SP

    Hi,

    i saw this function on silkperformer that allow one to create new java script;
    (File >> new... > java script (.java) )

    i'm really interested to know how this java script works? i appreciate any information or example from anyone, especially on how do i make use of it? =)

  2. #2
    Junior Member
    Join Date
    Sep 2008
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need Help on Scripting Java in SP

    hi ... please go through programmer guide there u can see the total process and from recording to exe the test ,, r go through the www.borland.com there u can find .java acrobat file download it and check it all best [img]/images/graemlins/smile.gif[/img]

  3. #3
    Member
    Join Date
    Feb 2008
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need Help on Scripting Java in SP

    Hello Pultosky,

    First we have to create the java class for write the logic in functions

    Write a Java class in Java.bdh
    ----------
    import silk.performer.*;

    public class UserDefindClass
    {
    private SilkPerformer silkPerformer = null;

    /**
    * @param perf SilkPerformer context object.
    */
    public UserDefindClass(SilkPerformer perf)
    {
    silkPerformer = perf;
    }

    /**
    * userDefindFunc function, that is called from BDL script.
    */
    public void userDefindFunc() throws SilkPerformerException
    {
    if (silkPerformer != null)
    silkPerformer.Print("Method \"Foo\" entered.");
    silkPerformer.MeasureStart("Foo");
    silkPerformer.MeasureStop("Foo");
    }
    }

    -------------------------------------------
    Now we have to call the function (userDefindFunc()) in the BDF script as follows.

    benchmark UserDefindClass

    use "Kernel.bdh"
    use "Java.bdh"

    // Definition of global variables: buffer handles, carrays, strings
    var
    homeDir : string;
    hTestObj : number;

    // Workload Section
    dcluser
    user
    JavaUser
    transactions
    TInit : begin;
    TMyJavaTrans : 1;
    TEnd : end;

    // Java Framework Transactions Section
    dcltrans
    transaction TInit
    var
    hPerf : number;
    begin
    JavaCreateJavaVM();

    hPerf := JavaLoadObject("silk/performer/SilkPerformer");
    JavaSetObject(JAVA_STATIC_METHOD, hPerf);
    hTestObj := JavaLoadObject("UserDefindClass");
    JavaFreeObject(hPerf);
    end TInit;

    transaction TMyJavaTrans
    var
    fValue : float;
    begin
    ThinkTime(0.2);
    JavaCallMethod(hTestObj, "userDefindFunc");
    end TMyJavaTrans;

    transaction TEnd
    begin
    JavaFreeObject(hTestObj);
    end TEnd;


    Please let me know if you need any clarifications.
    Thanks,
    R@M

  4. #4
    Member
    Join Date
    Jul 2008
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need Help on Scripting Java in SP

    Thanks for sharing Ramachandra2 =)

  5. #5
    Member
    Join Date
    Jul 2008
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need Help on Scripting Java in SP

    For the benefit of starters who wish to know more on setting up the java compiler to do java scripting in SP, you may find more information in the following post >> http://www.sqaforums.com/showflat.ph...e=0#Post520384

  6. #6
    Advanced Member
    Join Date
    Jan 2004
    Location
    UK
    Posts
    817
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need Help on Scripting Java in SP

    This is a very good post.... can the MODERATOR please make this a sticky? [img]/images/graemlins/smile.gif[/img]
    I like what i know and I know what i like

  7. #7
    Member
    Join Date
    Jun 2007
    Location
    Sweden
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Need Help on Scripting Java in SP

    R@M,

    Please post your example in the sticky code sharing thread.

    Regards,
    beam

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 9.38%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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 05:48 PM.

Copyright BetaSoft Inc.