BlackBerry JRE 5.0.0 BrowserField has no ScriptEngine

Hello

Ive got a BrowserField:

BrowserFieldConfig config = new BrowserFieldConfig();
config.setProperty (BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE);
This.Browser = new BrowserField (config);

which returns the null value on:

this.browser.getScriptEngine ();

Prevents me to run scripts from the code Java, because browser.executeScript ("somejavascript"); throws IllegalStateException which States that there is no such thing as the ScriptEngine. Which is kinda funny, because when I load JQuery its able to compile the script and the BrowserFieldDebugger tell me, that JSON is not defined. Which is exactly why I want to run a script inside the Java code from in the first place. Well, I need to call javascript functions later as well so I would have needed this feature in one way or another. BTW. : browser.displayContent (' javascript : somejavascript ", someurl" ") seems to generate a kind of error page.

Test on a 9700, build against BlackBerry JRE 5.0.0

ID like to have this app running next Thursday, a quick (and useful) answer would be appreciated (if you need more information, ask away).

Thanks in advance.

Sorry not an area of expertise, but I have some thoughts.

Copy the following code

invokeLater (new Runnable() {public void run() {}

thing to run

(}, 500, flag);

you continue to repeat if the flag is true initially (it is not re-evaluated).  So I think you really want to code something like:

Runnable testScriptEngine = new Runnable() {}

public void run() {}

ScriptEngine scriptEngine = mdBrowserField.getScriptEngine ();

If (scriptEngine == null) {}

invokeLater (this, 500, false);

} else {}

Dialog.Alert ("found Script engine");

}

};

invokeLater (testScriptEngine, 500, false);

If I was looking for something that could be triggered when the browserField 'worked', I would look at the method documentLoaded() of the BrowserField listener:

http://supportforums.BlackBerry.com/T5/Java-development/BrowserField-sample-code-using-the-BrowserFi...

I'm guessing it is significant above using a Script engine, so I can see a reason to not create a Script engine up until you need it - so it does not surprise me that one is not created in BrowserField instantiation.

Tags: BlackBerry Developers

Similar Questions

  • How can I obtain/use BlackBerry JRE 5

    Hello

    Anyone know where I can download Blackberry JRE 5.0? My computer has been recently upgraded to Windows 7, which required a full erase of the hard drive, so I need to configure my Blackberry Eclipse plug-ins for Blackberry JRE 5.0, which is what I did before.

    Thanks in advance

    Steve

    I could figure this out... what a huge waste of time; Download the software installation has failed, that's why it took so long. Fortunately, the people who have updated my machine, copied the component packs in a directory on my machine. Once I have updated the build path to point to it, it resolved the problem.

    Thank you.

  • BlackBerry Z30 unlocked Blackberry Z30 in BB online store has 1700/2100 Mhz frequencies?

    Hi friends:

    Fact unlocked Blackberry Z30 (GSM) in the BB online store has 1700/2100 Mhz frequencies?

    Thank you

    Ouyang Johnson

    Phone model: STA100-5
    3G / HSPA + 800/850 1700 1900 2100
    850 1700 2600 LTE

  • BlackBerry smartphones some of your data has not been saved

    Using BlackBerry Desktop Software 7.1.0.37 I get the following warning message after a return to the top of my BlackBerry Torch 9800 (version 6.0 of 2647 software bundle): 'some of your data has not been saved. Some data are not included in the file back. DataType: BlackBerry Messenger entered: 0/2 ".

    Hello and welcome to the community!

    Could the BBM Contacts... There are situations where those who are not properly saved with desktop software. Reference:

    • KB20554 How to back up and restore the BlackBerry Messenger contacts list

    If you moved to BBM 7, then your BBM contacts are saved "the cloud" as part of your association ID BB to BBM.

    Otherwise, you can compare the databases on your BB against what is contained in the backup file to determine exactly what is missing:

    • KB03974 List of database for the blackBerry smartphone

    You would need a 3rd party PC app to analyze and present you the backup file "readable" format to compare.

    FYI - for all recommendations and backup processes, see for more information:

    Good luck!

  • Sprint blackBerry Curve 8530 - EVDO Rev Smartphones has?

    I see conflicting information on the web...

    Some sites say the 8530 has EVDO Rev 0, others say EVDO Rev A.

    Is Blackberry anyone can confirm what version of EVDO is supported for this phone?

    Thank you!

    Thanks for the tip.

    I talked to the (chat) somone in the Sprint and also met with the Blackberry technical support.

    The answer I got back was it's Rev A, but the Blackberry person said "I think it's Rev" and call Sprint tech support and gave me a number of votes to call.

    I called and talked to someone at Sprint technical support.  He looked at for 1/2 hour but can't find an answer.  I enjoyed telling him simply that he did not know.

    So, I went to the local Verizon store.

    The person in the store pulled up on the info on the computer.

    He said Rev 0.

    I thought that maybe there was a typing error, because the curve and the Tower otherwise have very similar characteristics.  Same processor clocked at the same speed, the same amount of ROM and RAM.

    So, I decided to test the Tour vs Curve 8530.

    (Google "blackberry speed test" to find the app)

    The curve had 46 kbps maximum.

    A sheer tour 284 kbit/s.

    Thus, at least for Verizon, the 8530 isn't Rev.

    This should not really at all unless you tie (which I do).

  • BlackBerry Smartphones of the file transfer has failed to find the service!

    Via connwcted Bluetooth between my Blackberry Bold 9900 and my iMAC, I can't transfer photos from the Blackberry to the iMac.  I keep getting the above message!  What is happening with this device?

    How can I do this?

    The problem is resolved.  I forgot to make sure that Bluetooth sharing is enabled in Mac preferences.

    It worked perfectly transferring files without problem.

  • BlackBerry e-mail account Smartphones one has stopped working

    I tried to delete it and re-add (several times). Had the Sprint Store try different options, including a reeboot in their system. At GoDaddy check their system... Pulled the battery while the phone was on and outside... Nothing works!

    Help, it's the story I receive time sensitive works on.

    It is a Bold 9650 and all my other email accounts (of Go Daddy) work correctly.

    magsowencrouch wrote:

    then they suggested I phone Blackberry for them to resynchronize... but I found the online Forum and no tech support number to call, where my posted question.

    This is where Sprint really let you down... you see, they gave you. They know very well that end users have no way to directly solicit any formal support from RIM. All the formal support of the RIM must be wound with carriers... and that's what Sprint would have been done for you. Instead, they gave you. Sad... but sadder still, it happens far too often.

    End-users who understand the process are equipped with this knowledge and can prevent such a fob off. So, if you want to continue with them (and, frankly, I think that you need more deep support from RIM and others who, unlike us volunteers here on this form, have access to 'behind the scenes' information and other), you will need to go to them again, this time insisting that they honor the support contract you have.

    Think about it... you PAY Sprint for 100% of your service and 100% of your support... training and although now they deliver neither you... even if the case requires an improved rim support, Sprint remains linked contractually to provide assistance in this regard.

    magsowencrouch wrote:

    Now since I have uninstalled and reinstalled again the email address, I don't get emails from this account on my phone, but all my other email accounts are working fine.

    Don't know what else I can tell you, I'm really frustrated with it, because it's a story that I get job offers that are time sensitive, so it's reduce my income.

    Any suggestions would be greatly appreciated.

    Given the critical nature of your need, I do not recommend return you to the Sprint, and this time do not leave you fob OFF... insist that, if indeed they say you need to speak to RIM, that they (Sprint) provide the means to do so (which is to prosecute, provide you necessary information file number and such and then degenerate into RIM).

    In the meantime, I recommend the following steps, in order, even if they seem redundant to what you have already tried (steps 1 and 2, each should result in a message to your BB to come...) Please wait for this before moving on to the next step):

    (1) registry HRT

    • KB00510 How to register a BlackBerry smartphone with wireless network
    • Please wait a 'registration' message reach your Messages application

    (2) remove and return Service directories

    • KB05000 Remove the maintenance book for the BlackBerry Internet Service email account in the BlackBerry smartphone
    • If you do not have access CMIME, continue deleting
    • KB02830 Send the directories for the BlackBerry Internet Service
    • Please wait "the Activation' Messages, one per already configured e-mail account, arrive in your Messages. If you have not already configured email accounts, please wait 1 hour.

    (3) restart to take batt

    • Each time a random strange behavior or slow creeps, the first thing to do is a battery pop reboot. With power ON, remove the hood back and remove the battery. Wait a minute, then replace the battery and cover. Power on and wait patiently through the long reboot - about 5 minutes. See if things return to functioning. Like all computing devices, BB suffers from memory leaks and others... with a hard reboot is the best remedy.

    I hope that will move things again for you! If not, then you certainly should more "behind the scenes" that can be offered through this community and volunteer-contribution users... re-contact Sprint and insist that they solve it, climbing to RIM, if they can't.

    Oh... one more thing... you did not change anything on your PC to access this email account, did you? For example, if you have an email client (Outlook, for example,) also access this email account - AND it is downloading mails from the server more frequently than every 15 minutes - AND it's delete them server when it downloads, then there would be nothing for BIS to find (and place on your BB) when he checks on his interval normal 15 minutes. Honestly, I doubt it's causal, given the symptoms you described... but you never know.

    Good luck!

  • BlackBerry 8310 Smartphone of Smartphones (BB has been DEAD for upgrading applications that use the Device Manager)

    Hello, recently I wanted to install an application but got an error message saying AJAX is not supported on your platform - after checking the forums on this site, I found that I need to upgrade to 4.5.X and for that I downloaded from this site the "8310M_PBr4.5.0_rel52_PL2.7.0.55_A4.5.0.37 [1].

    When I connect the device to the computer, I got the message from device manager asking if I want to upgrade applications to current version,

    I did it-but suddenly during the upgrade process, my blackberry is turned off and since impossible to turn it on again, it looks like my smart phone is completely dead! There's just a red light on the top flashing...

    That's all just amazing, because I have no idea why this happened because I used this official site and Device Manager was the one I downloaded from this site for 8310 Smartphone

    Can someone HELP me please?

    Thank you

    PAM

    Great!

    You please resolve this thread by using the options on the star of the kudo?

    Thank you very much!

  • BlackBerry Smartphones Youtube error - an error has occurred trying to play media

    Hey

    I get the message that error trying to play the media, when I want to watch videos on youtube.

    I tried everything to change the setting in the bb browser, download the Youtube app, visiting m.youtube.com and configure the APN settings. My carrier is Vodafone and I am from Slovenia - Europe.

    My girlfriend has Bold 9700 and it plays youtube very well.

    Please help me.

    Thank you

    I find the solution to the problem.

    My operator, so mobile - Vodafone is blockind direct access to youtube. I have to go on the sivodafone portal and the n from m.youtube.com and it works like a charm. But there's a catch - they can charge me for this, because it is not runing on the bb server and 100 MB data plan is quickly to small and they charge me each another KB of data. They hav done this just to get the benefit. It's how they misslead clients.

    I'm really disappointed... but that's how it is in our small country of the Slovenia.

    Thanks to all who have taken the efford to help me on this.

    Concerning

  • Smartphones blackBerry app world saying an error has occurred, please help!

    Hi, I hope someone can help out me! My app world telling me "an error has occurred please try again later ' and everytime I try to log on it does the same thing. I tried to create a new I.D. but it still does not work, I even tried to delete the app world n re download, but it always does the same thing please help!

    Annoyingly, I had this exact problem happening for weeks, I've been looking around and couldn't find any information to help me. Then today a few other applications do not work either, so I looked into it abit more to try to understand what might be preventing them to connect.

    It turns out that my time had advanced sort 1 additional day (so rather than it be Friday as it should have, it showed as on Saturdays). After the change of this return, everything could connect again.

    Not sure if this is a solution for everyone (or anyone), but I have not seen it mentioned and this is my question, it seems.

  • File Data1.cab of Smartphones from blackBerry Desktop Manager version 5.0 has bad CRC

    The current DTM software appears to be damaged. Clean uninstall of old software version 4.5. Downloaded the "500_b028_multilanguage.exe".  During the installation of software, I get a popup error message titled ' WinZip Self-Extractor ' and the message is "damaged ZIP: file C:\DOCUME~1\ttipps\LOCALS~1\Temp\WZSE0." TMP\SR_MM\Data1.cab: Bad CRC 6f092258 (should be 76f6d0e3).  Possible cause: file transfer error. »

    Any ideas?

    Have you tried to download the most recent (released this week) version of the Desktop Manager 5.0 SP 1?

    Download Desktop Manager here:

    https://www.BlackBerry.com/downloads/entry.do?code=A8BAA56554F96369AB93E4F3BB068C22

  • BlackBerry Smartphones internet on my torch has suddenly stopped working

    Can anyone help me, it worked yesterday now I can't access internet or facebook.  Thank you

    Hello
    try restarting your device,
    Let me know if that makes a difference

  • Documents to Smartphones blackBerry go/sheet EXCEL To Go has no load 8100

    I installed Documents to Go on my BB8100 4.5 OS using Desktop Manager v4.5, which I downloaded.  Word to go and PPT to Go shipped along with a folder called GB but no sheet to Go.  Any suggestions?  I did a reboot hot and cold, uninstalled and reinstalled.  Tried redownloading Documents to Go from DataViz, but have yet to get the link.  Any suggestions?

    WOW, I'm sure it's written "somewhere" but I'll be doggone if I had an idea where to look.  This info is exactly what I needed.  I already downloaded the upgrade and looked at my 1st paper.  Thank YOU MUCH for YOUR SPEED and HELP.

    CV-kc

  • BlackBerry smartphone Error Message "an error has occurred during an attempt to access a file on the computer"

    I get this error message when I try to sync my contacts from my outlook on my device:

    "An error occurred during an attempt to access a file on the computer"

    I use the new desktop version 7.0.0.43

    Any ideas?

    No problem at all.  I appreciate your help.  I finally solved the problem in parade the following:

    Via the Command line, run the following:

    Reg delete "HKCU\SOFTWARE\Classes\CLSID\" /f {B54F3741-5B07-11CF-A4B0-00AA004A55E8}

    Then, run the following via CMD line:

    c:\Windows\system32\regsvr32 vbscript.dll

    Uninstall worked after that and I reinstalled it the version you suggested.

  • Favorites for the BB blackBerry Smartphones. I know this has been discussed...

    I know that you can add one by one in the browser.  Eventually, cut and paste the site.  I still might have 50 that are really important to me.  That I really want to sit to see how long the battery will last up to as well as my fingers entering bookmarks.

    I'm curious as to why they did not have an import option in the office with the exception of Outlook that I hate.  I use Thunderbird and I don't think that office works with it for synchronization of contacts and or bookmarks.  If there is a way, I'd be interested.

    BB should really happen to a process to do it easily without having to go through hoops to get your data into the phone.  If they would have just done a HTML file that can be overwritten, which would have been better still.

    Thank you

    Mike

    Hello!

    I'll steer clear of the "why does" and "it never will be" types of questions...

    But, you can get your bookmarks on your BB without having to type them is to put them as links in an e-mail message, and then send this e-mail to yourself, then open the bookmarks in the e-mail that and then mark them as a bookmark in the BB browser.

    See you soon!

Maybe you are looking for

  • Audit to be

    Here is my report to be. Running late 2009 tips OS X Yosemite MacBook all that acceleration would be greatly appreciated. Thank you. EtreCheck version: 2.6.4 (224) Report generated 12/28/15, 14:42 Time 09:03 Download EtreCheck from http://etresoft.co

  • Help me. I need win7 32-bit driver for sony vaio VPCEB3QFX/Wi

    I can't find win7 ultimate 32-bit driver for sony vaio help .please VPCEB3QFX/Wi me thank you very much...

  • What happens to the W2k3 Server forum space

    Seems of this forum has changed and I can't find the W2k3 box

  • Window Vista 80246002 code

    I try to install Microsoft Office SP2 using Update window and get the code 80246002? How can I solve this problem? :(

  • My Dell Inspiron has developed the Red saturation.

    I tried loading with the CD and it will start correctly most of the time.  But he'll be back with the Red saturation more. I have run diagnostics and through the process, he will correct the color scheme. But will return once again to more red satura