Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8434467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:39:52+00:00 2026-06-10T06:39:52+00:00

I have a situation where I need to use javax.xml library and majority of

  • 0

I have a situation where I need to use javax.xml library and majority of this comes from Java 6.
However my deployment server runs on Java 5, where I don’t have control.

So is it possible to add these specific libraries to project and can run in Java 5 environment?

I am mainly using

import javax.xml.bind.*;
import javax.xml.stream.*;
import javax.xml.transform.stream.StreamSource;

code which I am using

    XMLInputFactory xif = XMLInputFactory.newFactory();
    StreamSource xml = new StreamSource("input.xml");
    XMLStreamReader xsr = xif.createXMLStreamReader(xml);
    while(xsr.hasNext()) {
        if(xsr.isStartElement() && xsr.getLocalName().equals("StandardError")) {
            break;
        }
        xsr.next();
    }

So can any one tell how can I avoid this so that My application can run in Java 5 environment without issues.

Between we use maven for building, so any libraries has to go into pom.xml

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T06:39:53+00:00Added an answer on June 10, 2026 at 6:39 am

    JAXB (JSR-222) and StAX (JSR-173) were introduced in Java EE 5 and are completely compatible with Java SE 5 (The version of the JDK when those specs were released). Of course implementations of these standards were included as part of Java SE 6.

    java.net Repository

    You can obtain the public APIs for the standards from the java.net repository

        <repository>
            <id>java.net</id>
            <name>java.net Maven Repository</name>
            <url>https://maven-repository.dev.java.net/nonav/repository</url>
        </repository>
    

    Below is the dependency for the latest version of the JAXB public APIs

        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.2</version>
        </dependency>
    

    Implementations

    In addition to the public APIs you will need to implementations. Each spec has multiple implementations. Below is a link to a POM file that pulls in EclipseLink MOXy as the JAXB implementation (Note: I’m the MOXy lead).

    • https://github.com/bdoughan/blog20120418/blob/master/pom.xml

    About Java SE 5

    Java SE 5 hasn’t received any public updates since October 2009, even Java SE 6 is rapidly approaching the end of life. If possible I would recommend using Java SE 7 (and Java SE 8 is currently in development).

    • http://www.oracle.com/technetwork/java/eol-135779.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a situation where i need to use GPS technique. i need to
In my view, if I have a situation where I need to use a
I have a situation where i need to send commands to a running java
This is the situation: I use the Java API of Selenium 2 to open
I need to wrap a C++ library with SWIG to use it with Java.
I have situation where I need to change the order of the columns/adding new
I have a situation where I need to dynamically build up a list of
I have a situation where I need to pass two parameters to an action.
I have a situation where I need to update a control referenced in a
I have a situation where I need to notify some users when something in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.