HELP!!! I need to update my Java

I am running
Java 2 Runtime Environment , Standard Edition 1.4.1_02
Default Virtual Machine Verison 1.4.1_02-bo6
java Plug-in 1.4.1_02
Not to long ago, I received a virus and it messed up my Java some. I use Earthcam and now I can't get cams to come up. It tells me load: java class can't be found " I think that is what it said"
So I figure since I have not updated my Java for a while. I need to update it.
Can someone tell me what to update and give me a link to it. This stuff confusses me and I have no idea what to update to.
When I go into my Java Control Panel and click on Update, it comes back saying "The page cannot be found" and then it gives me a link to "javadl-esd.sun.com " and I click on that it comes up also saying "The page cannot be found"
I would love to update to a newer verison of Java. I don't develope anything, just need java to veiw websites.
Please Help

Just try to simply download the latest JRE (or the whole JSDK) and reinstall it first.
url: http://java.sun.com/j2se/1.5.0/download.jsp

Similar Messages

  • On YouTube, I can't play playlists there. It says I need to update my Java and it is updated already. When I go to different sites like Yahoo! the links and images are all distorted. This is the second time this has happened to me now

    Hello Firefox,
    I am having problems with my Firefox's image processor I believe. My web browser is fine but then a few minutes later I get some weird look on my page. It then just stays here and I can't fix it. When I go to Yahoo all the links and images do not look normal. I really cannot explain this and wish I could send a picture instead. When I go to the Log in page for Facebook I do not see the image of the small faces networking around the world. It's blank and the links are widely spread apart. With YouTube the page is also distorted. Nothing is arranged properly. I can watch videos. However when I go to someone's profile or a playlist videos cannot play or show up. It says I need to update my Java player and it is already updated. It still happens when I uninstall and re install back. I was only able to fix this problem by uninstalling everything related to Firefox. I do not know how to solve this any other way. I don't like it when all my information is lost such as saved passwords and bookmarks. If there is any way to solve this thanks. I don't want to uninstall this again.

    Your above posted list of installed plugins doesn't show the Flash plugin for Firefox.<br />
    See [[Managing the Flash plugin]] and [[Installing the Flash plugin]]
    You can check the Adobe welcome and test page: http://www.adobe.com/software/flash/about/
    You can use this manual download link:
    *http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller

  • I'm running 10.5.8 on a MacBook Pro and need to update to Java 7 in order to take a software assessment test for a potential job. The Java app will only upgrade from 10.6 or higher. What can I do?

    I'm running 10.5.8 on a MacBook Pro and need to update to Java 7 to take software assessment tests online for a potential job. What can I do?

    Apple Java for Mac OS X 10.5 Update 10
    Apple Java for Mac OS X 10.6 Update 17
    Apple Java 2013-005
    I would suggest you upgrade your computer's OS minimally to Snow Leopard 10.6.8.
    Upgrading to Snow Leopard
    You can purchase Snow Leopard through the Apple Store: Mac OS X 10.6 Snow Leopard - Apple Store (U.S.). The price is $19.99 plus tax. You will be sent physical media by mail after placing your order.
    After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store. Access to the App Store enables you to download Mountain Lion if your computer meets the requirements.
         Snow Leopard General Requirements
           1. Mac computer with an Intel processor
           2. 1GB of memory
           3. 5GB of available disk space
           4. DVD drive for installation
           5. Some features require a compatible Internet service provider;
               fees may apply.
           6. Some features require Apple’s iCloud services; fees and
               terms apply.
    Upgrading from Snow Leopard to Lion or Mountain Lion
    You can upgrade to Mountain Lion from Lion or directly from Snow Leopard. Mountain Lion can be downloaded from the Mac App Store for $19.99.
    If you sign into the App Store and try to purchase Mountain Lion but the App Store says your computer is not compatible then you may still be able to upgrade to Lion per the following information.
    A. Upgrading to Mountain Lion
    To upgrade to Mountain Lion you must have Snow Leopard 10.6.8 or Lion installed. Purchase and download Mountain Lion from the App Store. Sign in using your Apple ID. Mountain Lion is $19.99 plus tax. The file is quite large, over 4 GBs, so allow some time to download. It would be preferable to use Ethernet because it is nearly four times faster than wireless.
         OS X Mountain Lion - System Requirements
           Macs that can be upgraded to OS X Mountain Lion
             1. iMac (Mid 2007 or newer) - Model Identifier 7,1 or later
             2. MacBook (Late 2008 Aluminum, or Early 2009 or newer) - Model Identifier 5,1 or later
             3. MacBook Pro (Mid/Late 2007 or newer) - Model Identifier 3,1 or later
             4. MacBook Air (Late 2008 or newer) - Model Identifier 2,1 or later
             5. Mac mini (Early 2009 or newer) - Model Identifier 3,1 or later
             6. Mac Pro (Early 2008 or newer) - Model Identifier 3,1 or later
             7. Xserve (Early 2009) - Model Identifier 3,1 or later
    To find the model identifier open System Profiler in the Utilities folder. It's displayed in the panel on the right.
         Are my applications compatible?
             See App Compatibility Table - RoaringApps.
         For a complete How-To introduction from Apple see Upgrade to OS X Mountain Lion.
    B. Upgrading to Lion
    If your computer does not meet the requirements to install Mountain Lion, it may still meet the requirements to install Lion.
    You can purchase Lion by contacting Customer Service: Contacting Apple for support and service - this includes international calling numbers. The cost is $19.99 (as it was before) plus tax.  It's a download. You will get an email containing a redemption code that you then use at the Mac App Store to download Lion. Save a copy of that installer to your Downloads folder because the installer deletes itself at the end of the installation.
         Lion System Requirements
           1. Mac computer with an Intel Core 2 Duo, Core i3, Core i5, Core i7,
               or Xeon processor
           2. 2GB of memory
           3. OS X v10.6.6 or later (v10.6.8 recommended)
           4. 7GB of available space
           5. Some features require an Apple ID; terms apply.

  • HELP urgently needed-software update question

    Hi.
    Just installed (20/10/12) latest updates for OSX10.7 Including printer update, Java update (removal) and osx bundle update. Upon restart, the computer won't recognise my password. It wasn't a misstype, I've tried it several times. Not quite sure what's going on. All was fine until I did the update. Any possibility I've been hacked and what's the chance my computer now has key logging on it (worried about going into admin account to check any probs).  Worried this is to do with Java somehow. I'm really security conscious (have now changed all passwords for all accounts and am accessing this from parents computer which is Java free)
    Please help, I'm moving house at the moment and really need my macbook operational!
    Yours desperately
    Kaz

    It just means that you have the latest available updates installed. If any new update is released for your phone's product code, it will automatically show on Ovi Suite if you are connected to the internet.
    If you find my post helpful please click the green star on the left under the avatar. Thanks.

  • Please help me to install update  "software Java for Mac OS 10.5 Update 2"

    Several attempts failed. All applications were closed during these attempts. The upload froze each time in about the middle of the configuration process. No problems encountered when I installed this software on my MacBook 10.5.5.

    When using Software Update from the Apple menu, the update is downloaded and automatically begins installation. Particularly when the update is large (the Java update is more than 136 MB), and if your internet connection is relatively slow (modem or DSL), the download can get corrupted by a glitch in the internet transmission. That is why it is suggested that you download the file manually and install it locally.
    To download it manually, go to:
    http://www.apple.com/support/downloads/
    find the update you want and download it from there.
    Additionally, after I download the .dmg file with the update package in it, I open Disk Utility and do a Repair Disk on the .dmg disk image. Because it is a relatively small disk check, compared to a hard drive, the diagnostic only takes a few seconds and you can be reasonably assured the download was not corrupted.
    Before installing any system updates, and as an important general practice, you should have a bootable backup handy.

  • HT4623 i don't see a software update under general. i have an ipad2... help i need to update to iOS 5.0 or later

    i have no idea what operation system i have. i have an ipad2 and in order to update apps i need ios5.0 or later. How do i update or download or install this. i went under general and i have no software update option. HELP

    That is only a feature of iOS 5 or later...
    If you have iOS 4... See Here...
    http://support.apple.com/kb/HT4972
    OR...
    Connect to iTunes on the computer you usually Sync with and “ Check for Updates “...
    If an Update Appears Install it... if not... you are up to date for your particular Device...
    See the Using iTunes Section Here...
    How to update your iPhone, iPad, or iPod touch
    NOTE:
    The iPad 1 can only Update as far as iOS 5.1.1

  • HT1338 Help, I need to update my OS to Lion. What is the best way? I have a Macbook Pro 2008

    I'm late in updating my OS to Lion. Im on a MacBook Pro 2008. does anyone have advice as to the best way to proceed?

    Click here and read all of the steps to the bottom; if you want to upgrade to 10.7 but not 10.8 for some reason, instead of buying 10.8 from the Mac App Store, phone the online Apple Store and order a download code for 10.7.
    (80630)

  • Streaming video display in v.5 and v.6 is monochrome and distored while Ffox help indicates need to update Nvidia driver that is NOT supported by HP; so is there a Ffox fix or do I play Russian roulette with unapproved Nvidia driver updates?

    For reference, this is HP PC laptop with AMD Turion64 running Windows 7 Home Premium 32 bit with 2G memory and Nvidia Go 6500 series chip. Streaming videos from sites like Comedy Network work in basic format (showing color etc.) but when made full screen are monochrome and distorted (i.e. fill 2/3 page). Current driver number from Nvidia is in the 1.8x range while Ffox and Nvidia show a newer driver that is in the 2.x range but Nvidia warns that drivers should be approved by notebook manufacturer. Since Ffox 4 and previous worked fine, why the problem with Ffox 5 and 6?

    I doubt that your notebook crashed because of the graphic card driver
    Possibly there is another reason why the notebook crashes.
    First of all you should check if new OS installation would help you on many cases the OS hangs or does not response due to damage registry entries or system files
    If the notebook will still crash after new OS installation then you should check if it could be related to a higher temperature inside the notebook
    Higher temperature could be one of the main reasons for such problems.
    Usually you could avoid a higher temperature by cleaning the cooling fans and grilles You could use a compressed air spray in order to remove the dust and debris
    Otherwise the notebook should be checked by an ASP technician I mean the G50 is one of the newest notebooks series and the warranty should be still valid so everything should be done for free!!
    Greets mate

  • My ID files will no longer open?: I need to update our catalog. Please help

    My archived ID Files will no longer open in ID 2014. Please help, I need to update our catalog.

    If the files come from very old versions, like pre-CS (1.0, 1.5 and 2.0) you have to open them in older versions of InDesign first. Try to open them in CS6 (this is the oldest version which comes with the CC subscription), otherwise go back to CS4 which could open every previous version and save it with the version you use.

  • HT1338 how do i update to java runtime environment? Sun JavaVM (Virtual Machine)

    I need to update/install Java Runtime in order to update my Brother Printer. How do I install this program?

    See Using Java in Mac OS X.

  • Help please need to install java update 3

    Just updated to java update 4. I have medical software on the computer and it breaks. I need to roll back one version. Can anyone help me out with this? 10.6.6 OS

    OK, there is a method, but it is risky at best. Backup your data before proceeding*:
    http://www.macmaps.com/backup.html
    Note where it says on these instructions rm -rf:
    http://weblogs.java.net/blog/joshy/archive/2007/11/howto_removej.html
    Change that "f" instruction to i (the letter I as in I am).
    So you would say:
    sudo rm -ri /System/Library/Frameworks/JavaVM.framework/Versions/(whatever the version is that is newer)
    If you are unsure of the version, look it up first by typing:
    ls -aF /System/Library/Frameworks/JavaVM.framework/Versions/
    And determine which ones are newer.
    Answer 'n' to the rm once files are listed that you don't want. Careful not to go trigger happy with the 'y' as it automatically takes every 'y' response as an affirmative.
    - * Links to my pages may give me compensation.
    Message was edited by: a brody

  • HT5228 I am running OSX 10.5.8 and am told I need to update Java in order to protect agains tthe Flashbck Trojan. But cannot figure out where to download such an update. Any help?

    I am running OSX 10.5.8 and am told I need to update Java in order to protect agains tthe Flashback Trojan. But cannot figure out where to download such an update. Any help?

    michael60 wrote:
    Many, many thanks.
    In my Java Prefs App I unchecked
    J2SE 5.0
    J2SE 1.4.2 was already unchecked.
    Did I get this right?
    Wasnt sure if I was  was disabling Java or Java Script here....
    That is Java. Those are also really old versions. You can actually keep them turned on in Java Preferences.
    What you want to change is in Safari > Preferences > Security and turn off Java there. Leave Javascript turned on.
    This way, the only thing you disable is Java applets, which are useless anyway. If you need to run any Java programs, they will still work. If you have any specific site that requires a Java applet, you can always turn it on just for that site and turn it back off when you are done.

  • HT1338 I need java update or java software for mac

    I need java update or java for mac.  I keep updating software but java is not there, can you please help?

    Open up Java preferences located in your Application>Utilities folder. Make sure it's enabled. Mac automatically disables it if not used within a certain amount of time.

  • I am trying to print redplum coupons and I can't, help.  I have updated java, adobe flash, and made sure my printer was set on default.  I am not sure what I am doing wrong.  I have contacted redplum and no one will help.

    I am trying to print redplum coupons and I can't, help.  I have updated java, adobe flash, and made sure my printer was set on default.  I am not sure what I am doing wrong.  I have contacted redplum and no one will help.

    No Apple response???  Redplum/Valassis will not help either.  I searched, using the cups error message and though it is Unbuntu, same error so maybe useful...only problem: details would not display unless I join Unbuntu forum.  What a pain to do anything with my Mac or find any help.  I honestly regret buying this buggy OS.
    Anyway, here is what I found, FYI:
    http://ubuntuforums.org/showthread.php?t=483415
    As the old saying goes: when in doubt, consult the manual. The problem appears to be that I added the printer using the KDE Add Printer Wizard. It was automatically given a "socket" URI instead of an "lpd" one. When I:
    - altered the printer settings at http://localhost:631 (the CUPS admin page) as instructed in the manual for the printer, and
    - copied the PPD file into a second place on the hard drive (as instructed on ubunutuforums, see the link above)
    ..everything started working.
    It's still slower than windows, but I can live with that
    Probably a simple fix. Change the socket I.P. to match the printer I.P. like this:
    socket://192.168.1.86:9100. The thing I'm concerned with using socket:// is that AFAIK the printer I.P. must not change. In my case I'm able to assign a static I.P. address to the printer but it's something to consider.
    I found that the only thing I needed to do was change socket to lpd (and remove :9100 off the end as well). See Solving Ubuntu printer “broken pipe” problem (DocuPrint C525A) . BTW thanks for steering me in the right direction - very grateful.      
    Solving Ubuntu printer “broken pipe” problem (DocuPrint C525A)
    Posted on November 25, 2008
    Are you having a problem with your printer under the latest versions of Ubuntu (perhaps it worked under an older version)? Are you able to print short documents, but not longer, or more graphics-intensive, documents? (e.g. the unfortunate people at http://ubuntuforums.org/showthread.php?t=625493). Do they sit there as Processing for ages and then switch to Held? If you have the same problem I had the solution I tried may work for you too. Firstly, check your cups error log:
    sudo gedit /var/log/cups/error_log
    If you see anything like the following, the solution may be simple:
    [Job 201] Unable to write print data: Broken pipe
    PID 13359 (/usr/lib/cups/backend/socket) stopped with status 1!
    System > Administration > Printing and right click on your printer, selecting Properties. Settings > Device URI
    If you see something like socket://your_printer_ip_address:9100 just change socket to lpd and remove the :9100 off the end. Then click on apply.
    Apparently lpd is a more modern protocol which works with most printers whereas socket is more raw (and potentially faster but riskier in a network situation). Somewhere along the line, the default Ubuntu/Gnome setup for networked printers shifted from lpd to socket. Some primitive printers will have benefited whereas a larger number of more modern printers will have suffered.
    Please correct me if I am wrong (which is highly possible) but the underlying problem could be that socket may make the printer wait a long time for a large file to be processed ready for printing. Some printers, such as the Fuji Xerox DocuPrint C525A, may drop the socket if things take too long to start coming through.
    Changing timeout settings might work but lpd is better than socket so it is the preferred solution in any case.
    If this works for you, please leave a comment to let others know (ideally with a description of the printer and Ubuntu version). Printer may be relevant if it doesn’t support the direct stream protocol properly. NB I may take a while to let your comment through because of the volume of spam. Sorry about that.
    Finally, thanks to sphilli8 for the steer in the right direction at http://ubuntuforums.org/showthread.php?p=6245626.
          http://ubuntuforums.org/showthread.php?t=483415

  • Help needed with Update statements.

    Hello All,
    I am trying to learn Berkeley XMLDB and facing problem to query the inserted XML file. I have a small XML file with the following contents:
    &lt;?xml version="1.0" standalone="yes"?&gt;
    &lt;Bookstore&gt;
    &lt;Book&gt;
    &lt;book_ID&gt;1&lt;/book_ID&gt;
    &lt;title&gt;Harry Potter and the Order of the Phoenix&lt;/title&gt;
    &lt;subtitle&gt;A Photographic History&lt;/subtitle&gt;
    &lt;author&gt;
    &lt;author_fname&gt;J.K.&lt;/author_fname&gt;
    &lt;author_lname&gt;Rowling&lt;/author_lname&gt;
    &lt;/author&gt;
    &lt;price&gt;9.99&lt;/price&gt;
    &lt;year_published&gt;2004&lt;/year_published&gt;
    &lt;publisher&gt;Scholastic, Inc.&lt;/publisher&gt;
    &lt;genre&gt;Fiction&lt;/genre&gt;
    &lt;quantity_in_stock&gt;28997&lt;/quantity_in_stock&gt;
    &lt;popularity&gt;20564&lt;/popularity&gt;
    &lt;/Book&gt;
    &lt;/Bookstore&gt;
    When I try to update the TITLE of this node I have the following error message:
    C:\Users\Chandra\Desktop\BDB&gt;javac -classpath .;"C:\Program Files\Sleepycat Soft
    ware\Berkeley DB XML 2.1.8\jar\dbxml.jar";"C:\Program Files\Sleepycat Software\B
    erkeley DB XML 2.1.8\jar\db.jar" bdb.java
    bdb.java:75: illegal start of expression
    public static final String STATEMENT1 = "replace value of node collection("twopp
    ro.bdbxml")/Bookstore/Book/bookid/title with 'NEWBOOK'";
    ^
    bdb.java:80: ')' expected
    System.out.println("Done query: " + STATEMENT1);
    ^
    2 errors
    But when I remove the update statements and just try to display the TITLE of this node, I dont see any outputs. Please help me to catch up with my mistakes. Below is source code I am using to run this functionality.
    Thanks.
    import java.io.File;
    import java.io.FileNotFoundException;
    import com.sleepycat.db.DatabaseException;
    import com.sleepycat.db.Environment;
    import com.sleepycat.db.EnvironmentConfig;
    import com.sleepycat.dbxml.XmlContainer;
    import com.sleepycat.dbxml.XmlException;
    import com.sleepycat.dbxml.XmlInputStream;
    import com.sleepycat.dbxml.XmlManager;
    import com.sleepycat.dbxml.XmlUpdateContext;
    import com.sleepycat.dbxml.XmlDocument;
    import com.sleepycat.dbxml.XmlQueryContext;
    import com.sleepycat.dbxml.XmlQueryExpression;
    import com.sleepycat.dbxml.XmlResults;
    import com.sleepycat.dbxml.XmlValue;
    public class bdb{
    public static void main(String[] args)
    Environment myEnv = null;
    File envHome = new File("D:/xmldata");
    try {
    EnvironmentConfig envConf = new EnvironmentConfig();
    envConf.setAllowCreate(true); // If the environment does not
    // exits, create it.
    envConf.setInitializeCache(true); // Turn on the shared memory
    // region.
    envConf.setInitializeLocking(true); // Turn on the locking subsystem.
    envConf.setInitializeLogging(true); // Turn on the logging subsystem.
    envConf.setTransactional(true); // Turn on the transactional
    envConf.setRunRecovery(true);
    // subsystem.
    myEnv = new Environment(envHome, envConf);
    // Do BDB XML work here.
    } catch (DatabaseException de) {
    // Exception handling goes here
    } catch (FileNotFoundException fnfe) {
    // Exception handling goes here
    } finally {
    try {
    if (myEnv != null) {
    myEnv.close();
    } catch (DatabaseException de) {
    // Exception handling goes here
    XmlManager myManager = null;
    XmlContainer myContainer = null;
    // The document
    String docString = "D:/xmldata/test.xml";
    // The document's name.
    String docName = "cia";
    try {
    myManager = new XmlManager(); // Assumes the container currently exists.
    myContainer =
    myManager.createContainer("twoppro.bdbxml");
    myManager.setDefaultContainerType(XmlContainer.NodeContainer); // Need an update context for the put.
    XmlUpdateContext theContext = myManager.createUpdateContext(); // Get the input stream.
    XmlInputStream theStream =
    myManager.createLocalFileInputStream(docString); // Do the actual put
    myContainer.putDocument(docName, // The document's name
    theStream, // The actual document.
    theContext, // The update context
    // (required).
    null); // XmlDocumentConfig object
    theStream.delete();
    // Update the title
    public static final String STATEMENT1 = "*replace value of node collection("twoppro.bdbxml")/Bookstore/Book/[bookid=1]/title with 'NEWBOOK'";*
    XmlQueryContext context = myManager.createQueryContext();
    XmlQueryExpression queryExpression1 = myManager.prepare(STATEMENT1, context);
    System.out.println("Try to execute query: " +
    System.out.println("Done query: " + STATEMENT1);
    queryExpression1.execute(context);
    // Get a query context
    XmlQueryContext context = myManager.createQueryContext();
    // Set the evaluation type to Lazy.
    context.setEvaluationType(XmlQueryContext.Lazy);
    // Declare the query string
    String queryString =
    "for $u in collection('twoppro.dbxml')/Bookstore/Book/[bookid=1]"
    + "*return $u/title";*
    // Prepare (compile) the query
    XmlQueryExpression qe = myManager.prepare(queryString, context);
    XmlResults results = qe.execute(context);
    System.out.println("ok");
    System.out.println(results);
    } catch (XmlException e) {
    // Error handling goes here. You may want to check
    // for XmlException.UNIQUE_ERROR, which is raised
    // if a document with that name already exists in
    // the container. If this exception is thrown,
    // try the put again with a different name, or
    // use XmlModify to update the document.
    } catch (FileNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } finally {
    try {
    if (myContainer != null) {
    myContainer.close();
    if (myManager != null) {
    myManager.close();
    } catch (XmlException ce) {
    // Exception handling goes here

    Thanks Rucong. The change you suggested did helped me to run the program correct. But I also have the display function to retrive the results and my program is parsed without any output.
    C:\Users\C\Desktop\BDB&gt;Clientbuild.bat
    C:\Users\C\Desktop\BDB&gt;javac -classpath .;"C:\Program Files\Sleepycat Soft
    ware\Berkeley DB XML 2.1.8\jar\dbxml.jar";"C:\Program Files\Sleepycat Software\B
    erkeley DB XML 2.1.8\jar\db.jar" bdb.java
    C:\Users\C\Desktop\BDB&gt;Client.bat
    C:\Users\C\Desktop\BDB&gt;java -classpath .;"C:\Program Files\Sleepycat Softw
    are\Berkeley DB XML 2.1.8\jar\dbxml.jar";"C:\Program Files\Sleepycat Software\Be
    rkeley DB XML 2.1.8\jar\db.jar" bdb
    See there is no OUPUT displayed. Is there somethinglike a 'print' I have to use in this java code.
    Any ideas ? Below is the code I am using now
    import java.io.File;
    import java.io.FileNotFoundException;
    import com.sleepycat.db.DatabaseException;
    import com.sleepycat.db.Environment;
    import com.sleepycat.db.EnvironmentConfig;
    import com.sleepycat.dbxml.XmlContainer;
    import com.sleepycat.dbxml.XmlException;
    import com.sleepycat.dbxml.XmlInputStream;
    import com.sleepycat.dbxml.XmlManager;
    import com.sleepycat.dbxml.XmlUpdateContext;
    import com.sleepycat.dbxml.XmlDocument;
    import com.sleepycat.dbxml.XmlQueryContext;
    import com.sleepycat.dbxml.XmlQueryExpression;
    import com.sleepycat.dbxml.XmlResults;
    import com.sleepycat.dbxml.XmlValue;
    public class bdb{
    public static void main(String[] args)
    Environment myEnv = null;
    File envHome = new File("D:/xmldata");
    try {
    EnvironmentConfig envConf = new EnvironmentConfig();
    envConf.setAllowCreate(true); // If the environment does not
    // exits, create it.
    envConf.setInitializeCache(true); // Turn on the shared memory
    // region.
    envConf.setInitializeLocking(true); // Turn on the locking subsystem.
    envConf.setInitializeLogging(true); // Turn on the logging subsystem.
    envConf.setTransactional(true); // Turn on the transactional
    envConf.setRunRecovery(true);
    // subsystem.
    myEnv = new Environment(envHome, envConf);
    // Do BDB XML work here.
    } catch (DatabaseException de) {
    // Exception handling goes here
    } catch (FileNotFoundException fnfe) {
    // Exception handling goes here
    } finally {
    try {
    if (myEnv != null) {
    myEnv.close();
    } catch (DatabaseException de) {
    // Exception handling goes here
    XmlManager myManager = null;
    XmlContainer myContainer = null;
    // The document
    String docString = "D:/xmldata/test.xml";
    // The document's name.
    String docName = "cia";
    try {
    myManager = new XmlManager(); // Assumes the container currently exists.
    myContainer =
    myManager.createContainer("twoppro.bdbxml");
    myManager.setDefaultContainerType(XmlContainer.NodeContainer); // Need an update context for the put.
    XmlUpdateContext theContext = myManager.createUpdateContext(); // Get the input stream.
    XmlInputStream theStream =
    myManager.createLocalFileInputStream(docString); // Do the actual put
    myContainer.putDocument(docName, // The document's name
    theStream, // The actual document.
    theContext, // The update context
    // (required).
    null); // XmlDocumentConfig object
    theStream.delete();
    // Update the title
    String STATEMENT1 = "for $n in collection('twoppro.bdbxml')/Bookstore/Book[book_ID=1]/title return replace value of node $n with 'NEWBOOK'";
    XmlQueryContext context = myManager.createQueryContext();
    XmlQueryExpression queryExpression1 = myManager.prepare(STATEMENT1, context);
    System.out.println("Done query: " + STATEMENT1);
    queryExpression1.execute(context);
    // Get a query context
    XmlQueryContext thiscontext = myManager.createQueryContext();
    // Set the evaluation type to Lazy.
    context.setEvaluationType(XmlQueryContext.Lazy);
    // Declare the query string
    String queryString =
    "for $u in collection('twoppro.dbxml')/Bookstore/Book/[bookid=1]"
    + "return $u/title";
    // Prepare (compile) the query
    XmlQueryExpression qe = myManager.prepare(queryString, thiscontext);
    XmlResults results = qe.execute(thiscontext);
    System.out.println("ok");
    System.out.println(results);
    } catch (XmlException e) {
    // Error handling goes here. You may want to check
    // for XmlException.UNIQUE_ERROR, which is raised
    // if a document with that name already exists in
    // the container. If this exception is thrown,
    // try the put again with a different name, or
    // use XmlModify to update the document.
    } catch (FileNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } finally {
    try {
    if (myContainer != null) {
    myContainer.close();
    if (myManager != null) {
    myManager.close();
    } catch (XmlException ce) {
    // Exception handling goes here
    Thanks.

Maybe you are looking for

  • Why ipad mini released with a non-retina display.. The only reason i didn't buy that..

    I was so much after the ipad mini.. but released with the non-retina display and this put me down a lot and I didnt buy this one at all. Now I am looking one but with a larger screen and where i can use that as a phone around 4.5" min. Thanks

  • Populating values in jsp without submitting the form

    Hi, I have a jsp page in which i have 2 select boxes. The values to these select boxes should come from database. When i change the selection of select box, the corresponding values from database should be displayed in the other select box without su

  • Aligning rotated text away from spine

    I am creating a directory which rotated text towards the edge of the page. This is so that people can thumb through it and quickly get to their section of interest. When I insert a page, the edge becomes spine. I need the text box to automatically tu

  • Problem in Data extraction into BI

    Hi Guys, I am having a strange problem and unable to idenitfy the root cause. I am hoping that some one can help me with this issue. System Details: BI 7.0 SAP ECC 5.0 Current Design: We have created a DSO in the BI system and created a custom extrac

  • Can I create folders into iCloud?

    Can I create  folders into iCloud?