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 922277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:00:13+00:00 2026-05-15T19:00:13+00:00

I’ve wrote a java code and compiled it. (foo1.6.class) According to my search, my

  • 0

I’ve wrote a java code and compiled it. (foo1.6.class)
According to my search, my local machine has Java 1.6, and the tomcat server that I uploaded foo1.6.class only accepts version number 1.5 This means that I have to have Java 1.5 to compile?

I believe it is the cause that bad version number error is thrown like below.

My question is, is there any way I can compile my Java file using 1.5 version number?
Looked at javac cmd but seems like it is not part of the option. But I don’t think remove 1.6 and install Java 1.5 for this reason is not really good option neither. How do people deal with this kind of situation?

Thanks in advance!

exception

javax.servlet.ServletException: Bad version number in .class file (unable to load class resume_builder.ResumeBuilder)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:273)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class resume_builder.ResumeBuilder)
    org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1884)
    org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353)
    org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
    org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
    org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    java.lang.Class.getDeclaredConstructors0(Native Method)
    java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
    java.lang.Class.getConstructor0(Class.java:2671)
    java.lang.Class.newInstance0(Class.java:321)
    java.lang.Class.newInstance(Class.java:303)
    org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:142)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  • 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-05-15T19:00:13+00:00Added an answer on May 15, 2026 at 7:00 pm

    You can use javac -target 1.5 -source 1.5.

    The Java compiler allows you to use a lower than it’s current target version number only if you also use a source compatibility version that is not higher than the target (there are execptions for source versions below 1.4).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I've got a string that has curly quotes in it. I'd like to replace
I am doing a simple coin flipping experiment for class that involves flipping a
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into

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.