Class file has wrong version 51.0,should be 49.0

Dear All,
I have 2 jdk in my computer, one is 1.7 and another is 1.5. I got a eclipse from my co-worker, checkout project from svn, complied it successful. However, there is error : class file has wrong version 51.0,should be 49.0 when I run it in eclipse( this is google gwt project).
One of my colleague said I should modify one cache file under the eclipse direcotry, but he forgot the loaction of this file.
Anyone knows?

After modified this file : org.eclipse.jdt.launching.prefs under : <project folder>\.metadata\.plugins\org.eclipse.core.runtime\.settings,
this problem has been fixed.
The modification is :
add
<libraryLocations>\r\n<libraryLocation
jreJar\="D\:/Java/jdk7/jre/lib/resources.jar"
jreJavadoc\="http\://docs.oracle.com/javase/7/docs/api/"
jreSrc\="D\:/Java/jdk7/src.zip" pkgRoot\=""/>\r\n
to it.
eclipse is :
Eclipse Java EE IDE for Web Developers.
Version: Luna Release (4.4.0)
Build id: 20140612-0600
my questions are :
1. what is this file used for?
2. when use this file?
3. why I have to add these information to it by hand rather than generate these automatically when I set jdk in eclipse preference?
4. why this error occur if this file doesn't has <libraryLocations> when running project(the project compile success before running)?

Similar Messages

  • Initialization error : class file has wrong version 49.0, should be 45.3 or

    I have Jdeveloper Base installation and JDK 1.5..the classpath and JAVA_HOME environment variables are set to the respective JDK1.5\bin folders. Even then when i try to make a web application, with a simple JSP page i get the following error :
    Initialization error: class file has wrong version 49.0, should be 45.3 or 46.0 or 47.0 or 48.0 on CLASSPATH ..(followed by a long list of paths)
    pls help,
    thanks

    i have windows XP. i have tried to unset the class path...i get the same error.
    i have JDeveloper 10g 10.1.2.
    i have changed the jdev.conf file to set the Java Home to the path that contains the JDK 1.5..

  • Need help with "class file contains wrong class"

    I have a dbUtil package as
    package dbUtil;
    public class dbConfig {
    public String getHost(String db) {
    This file called dbConfig.java has been compiled with -d option and rthe class files resides in dir <install_dir>/webapps/test/WEB-INF/classes/eb/dbUtil/
    I have a jsp file in <install_dir>/webapps/test/test.jsp which imports the dbUtil package
    <%@ page import="eb.dbUtil.dbConfig" %>
    and I am getting this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    /opt/hpws/tomcat/work/Standalone/localhost/test/test_jsp.java:12: cannot access eb.dbUtil.dbConfig
    bad class file: /opt/hpws/tomcat/webapps/test/WEB-INF/classes/eb/dbUtil/dbConfig.class
    class file contains wrong class: dbUtil.dbConfig
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    import eb.dbUtil.dbConfig;
    ^
    1 error
    Can anyone tell me what am I doing wrong? I am using tomcat 4.1
    Thanks!
    L.

    Given your java file, the fully qualified name of the class is dbUtil.dbConfig.
    What you are importing is eb.dbUtil.dbConfig
    These things are not the same.
    The root of the classpath for the webapp is the classes directory.
    So either
    1 - specify dbConfig.java to be in package eb.dbUtil
    2 - move the class file into web-inf/classes/dbUtil/dbConfig.class, and import dbUtil.dbConfig.
    Also, by convention, classnames should start with a capital letter ie dbUtil.DbConfig.
    Cheers,
    evnafets

  • Unsupported class file format of version 48.0.

    Hi,
    I am new to Java Card. I have a problem to convert a class file to cap file. When I try to convert it, I got this message " unsupported class file format of version 48.0." Do you guys know any idea about it?

    The class file version is determined by the used java compiler (javac).
    The old Java Card development kit 2.1.2 was designed to work only with javac of the jsdk1.3 the current development kit 2.2.1 needs jsdk 1.4.
    In both cases you can not use jdk1.5 for compiling you java files.
    Jan

  • How do I find out if a class file has deprecated functions

    Currently I'm having problems with a old Visual Cafe class.
    It is definately using deprecated awt funcions.
    My question is..
    1) Without the source code how do I find out what deprecated functions the CLASS file is using.
    2) Has any deprecated class been truly scrapped ? If so, I cannot find
    it in the JDK API documentation or the java.sun.com search engine..

    Here is what I did, to answer your question. I unzipped the symantec jar and used a decompiler (JAD works fine, or cavaj) to create an entire src tree (you can do this with 1 command). Then, compile using your target version of Java. There are well over 100 warnings (with -deprecation on) ranging from Cafe's use of awt.Component methods (mostly), Thread.suspend in their Timer class, to the use of java.util.Date in their Calendar component.
    Cheers!

  • JavaCompiler outputs .class files in wrong folder

    I'm trying to compile some code using the Compiler API. The code belongs to package "compile", however, upon compiling the code, the class file ends up in the root directory rather than in the "compile" folder as I was expecting. The compiler seems to be ignoring the package info. What am I doing wrong here?
    package compile;
    import java.io.IOException;
    import java.net.URI;
    import java.util.Arrays;
    import javax.tools.*;
    import javax.tools.JavaCompiler.CompilationTask;
    public class CompilerTest {
         private static final String code =
              "package compile;\n" +
              "class TestClass {\n" +
              "     public static void main(String[] args) {\n" +
              "          System.out.println(\"Hello World!\");\n" +
              "     }\n" +
              "}\n";
         public static void main(String[] args) {
              JavaStringObject source = new JavaStringObject("compile.TestClass", code);
              Iterable<? extends JavaFileObject> sources = Arrays.asList( source );
              JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
              CompilationTask task = compiler.getTask(null, null, null, null, null, sources);
              System.out.println( task.call() );
         /** Java source from a String */
         private static class JavaStringObject extends SimpleJavaFileObject {
              private final String code;
              public JavaStringObject(String className, String content) {
                   super( URI.create("string:///"+className.replace('.','/')+Kind.SOURCE.extension), Kind.SOURCE );
                   code = content;
              public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
                   return code;
    }Thanks

    How do we know it is wrong?
    You are not showing where you compile and run this from.
    Also you are making it more confusing than it needs to be because your test class and the data for the compilation have the same package - I'd put CompilerTest and TestClass into different packages just to remove the potential for confusion.
    You are not specifying a -d option to the compiler.
    You are not specifying what the working directory is and the classpath when you run your test.
    You are not telling us where the generated class file is placed.
    When you say root directory do you mean the file system root, or the working directory or what?
    With some more information we might be able to either reproduce your fault or alternatively explain to you why what you are observing is the expected behaviour.
    Bruce

  • Different format of .class file in different versions

    I found that the format of .class files(extracted from rt.jar) in jdk1.3.1 are different from those in jdk1.3.0._02.
    Can anyone tell me what's the exact difference between them?
    and Is there any format difference between jdk1.3.1, jdk1.2, and jdk1.02?
    any answers are appreciated

    The format or the content? Those two are significantly different.
    As far as I know there can't be any difference in format, not in 1.3.x versions. If there were then the class files wouldn't run in the different jvms, and a new spec would have to be issued.
    I am rather certain that the isn't any format change between 1.1.x and 1.2.x/1.3.x. The spec is rather specific about what did change and the format was not one of those.

  • Determine the Java Class File Major & Minor Version

    Did anyone tried to look at the Major & Minor version of a specific java class file.
    Our server is running in version 1.3. We are including a third party class file, I like to check before our production move, whether the file is compiled is <= Jdk1.3.
    Thanks in Advance.

    // 1) Download Jakarta BCEL
    // 2) compile this class
    import org.apache.bcel.classfile.*;
    public class Main
         public static void main(String[] args) throws Exception
              printClassVersion("c:\\foo.jar", "com/foo/Bar.class");
         public static void printClassVersion(String jarfile, String classfile) throws Exception
              ClassParser cp = new ClassParser(jarfile, classfile);
              JavaClass clazz1 = cp.parse();
              System.out.println(jarfile);
              System.out.println("Major: " + clazz1.getMajor());
              System.out.println("Minor: " + clazz1.getMinor());
    }

  • OIM 11g install error INST-07286 mw_home has wrong version weblogic

    Hi gurus,
    I have been trying to install OIM 11g from past few days
    1. I have installed Oracle 10.2.0.5
    2.I installed weblogic 10.3.3 by downloading from Oracle website , wls1033_dev.zip
    3.I ran Rcu utlity 11.1.1.3.3
    4. I installed SOA 11.1.1.2.0.
    I am trying to upgrade soa to 11.1.1.3.0 using ofm_soa_generic_11.1.1.3.0_disk1_1of1.zip
    It gives me error
    INST-07286 Specified Oracle Middle ware home does not contain weblogic version 10.3.3 , upgrade to crrect version and then retry
    It does not let me further.
    Can some one please help /advise ?
    Thanks,
    Pandu

    Hi Gurus,
    I think I found the answer.
    I downloaded wrong version of weblogic
    I had linux 32 , and wanted weblogic 10.3.3, So I went here ( row 3 , column 2)
    http://www.oracle.com/technetwork/middleware/ias/downloads/wls-main-097127.html
    file name = wls1033_dev.zip
    well I was wrong it was not 10.3.3 or something was wrong. SOA installer did not recognise it as 10.3.3.
    Who is to blame. I wasted 3 days I hope Oracle keeps right versions in its website for download.
    I got the right one from edelievry
    http://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=11493750
    and download =
    Download      Oracle WebLogic Server 11gR1 (10.3.3) for Linux x86      V21014-01      703M
    Hope this helps some one.
    Thanks!

  • Cannot acces (a class), bad class file, class file contains wrong class

    Hi,
    I am trying to implement a Java package and I've never done this before. The package is called 'randomX' and I downloaded it from here: http://www.fourmilab.ch/hotbits/source/randomX/randomX.html
    I downloaded the .tar file on my Windows Vista system, unzipped it, and dragged and dropped into(in my case): C:\Program Files\Java\jdk1.6.0_05\src\java\util
    This is also the directory where Random.java is, so I figured it went there, plus the Java Documentation says that, I think.
    The Java Docs are here: http://www.fourmilab.ch/hotbits/source/randomX/doc/
    Thanks in advance,
    Rommel.

    dcminter wrote:
    No. That's not right - you need to put the JAR file into your classpath.
    [http://en.wikipedia.org/wiki/Classpath_(Java)|http://en.wikipedia.org/wiki/Classpath_(Java)]
    If it doesn't come with a JAR file then you'll need to build it first. Sounds like that might be outside your comfort zone.Thanks for the link and the tip. I have no idea what a JAR file is, much less how to build one.
    However, the thing has a "Makefile" file. Can I build the JAR from this?
    #   Makefile for randomX package
    JAVA = /usr/java/jdk1.5.0_06
    CLASSPATH = $(JAVA)/classes:..:.
    SRC = randomX.java randomJava.java randomHotBits.java randomLCG.java \
          randomMCG.java randomLEcuyer.java randomXdemo.java
    CLASS = $(SRC:.java=.class)
    all:     
         javac -classpath ..  *java ; cp -p *class randomX
    test:
         java randomXdemo
    clean:
         rm -f *.bak *.class
         rm -rf doc
         mkdir doc
         rm -rf randomX
         mkdir randomX
    RELEASE = $(SRC) Makefile
    release:
         tar cfvz randomX.tar.gz $(RELEASE)
    html:
         javadoc -classpath $(CLASSPATH) -d doc *.java
    images:
         ( cd $(JAVA)/images ; tar cfv /tmp/ZZimages.tar . )
         rm -rf doc
         mkdir doc
         mkdir doc/images
         (cd doc/images ; tar xfv /tmp/ZZimages.tar )
         rm -f /tmp/ZZimages.tar
         touch randomX.java
    .SUFFIXES:  .java .class

  • Double Clicking on .indd file opens wrong version of InDesign - Windows 7

    Every time I try to just double click on the file to open it opens with InDesign CS5.5. I have CC installed and just went through a whole process online with Adobe Support about removing previous versions using the Cloud tool. I removed all but CC 2014. CS 5.5 does not show up in the Cloud tool. I've also tried to go into my system preferences and set it to open with CC2014 by default. First, it doesn't even show up as an option. Secondly, it doesn't let me select it when I browse for it and select it that way.

    Uninstalling older versions after installing a new one is pretty much guaranteed to remove common files you need and mess up program behavior.
    In general, unless you hack the registry, Windows will always use the last version of a program that you've installed to open files associated with that program, so reinstalling CC2014 is probably the quickest way to get it associated with .indd files (and to reinstall the icon handler, so you see the correct icons, if you don't now).

  • Esbsvc file has wrong end point uri

    Dear All,
    I am working on ESB.
    The SOAP Endpoint URI is http://localhost:8888/event/DefaultSystem/<>
    The concrete WSDL points to correct WSDL.
    I am trying to change the SOAP Endpoint URI but I do not which file should I change for it.
    there is no option to change the SOAP Endpoint URI as it seems it is picked from other place
    Please share any way I can correct the SOAP Endpoint URI
    Best Regards
    Arc
    Edited by: ArchitectView on Jan 28, 2010 10:59 PM

    i'm not sure if this is what you need :
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28211/esb_console.htm
    Viewing or Modifying an Existing ESB System Definition
    but there you can change the hostname/url of the system

  • UDF error: bad class file

    Hi to all!
    i faced with following problem:
    i'm trying to use in message mapping exported Java function and get following error:
    <i>Source code has syntax error:  E:/usr/sap/DXI/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapb97a3fc699d611dcaf9d001b78d07a70/source/com/sap/xi/tf/_UserToRoleId_.java:3: cannot access kolpix.echo bad class file: E:\usr\sap\DXI\DVEBMGS00\j2ee\cluster\server0\.\temp\classpath_resolver\Mapb97a3fc699d611dcaf9d001b78d07a70\classpath\Echo_1(kolpix/echo.class) class file has wrong version 50.0, should be 48.0 Please remove or make sure it appears in the correct subdirectory of the classpath. import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.*;import kolpix.echo; ^ 1 error</i>
    There is my Java function:
    package kolpix;
    public class echo {
        public echo() {
        public static String hello(String str) {
            return "Hello "+str+"!";
    in UDF into the <b>Imports</b> textField i just put <b>kolpix.echo;</b>
    and in body function i just put <b>return echo.hello("World");</b>
    Could any one explain what does it mean and what i must do to solve the problem?
    Thx in advance.

    <a href="http://j-integra.intrinsyc.com/support/kb/article.aspx?id=183240">That info explain all</a>

  • Bad class file error

    Hi
    I set my java home to JDK 1.4 and execute my build.It is ok.
    Then i try the same by setting JDK 1.5 as java home. build is ok.
    But now i need to use only JDK 1.4.So i set my java home as jdk 1.4 and try to execute the build.xml
    Now i got the error of class file has wrong version 49.0, should be 48.0
    I understand that the class files(49.0) which are created by JDK 1.5 and i try to execute those by JDK 1.4.
    But i donot knwo how to solve this.
    Will anybody please help me to solve?
    Thank you

    Hi
    I didnot compile java files with JDK 1.4 and 1.5 both.
    First time i use JDk 1.4. for all java files
    Second time i use JDk 1.5 for all java files.
    Finally i should use JDK 1.4. So i come to jdk 1.4 and set java home jdk 1.4 and exucute my build.xml. Then i got the bad class file error.
    Can u help me at this point?
    Thank you

  • Compiling servet.error wrong version of servet-api.jar

    hi,
    I try to compile the following servlet
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ServletTemplate extends HttpServlet
         public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException
              PrintWriter out=response.getWriter();
    But I got the follwing error.
    D:\apache-tomcat-6.0.14\webapps\Raju\WEB-INF\classes>javac SevletTemplate.java
    SevletTemplate.java:5: class ServletTemplate is public, should be declared in a
    file named ServletTemplate.java
    public class ServletTemplate extends HttpServlet
    ^
    SevletTemplate.java:5: cannot access javax.servlet.http.HttpServlet
    bad class file: D:\apache-tomcat-6.0.14\lib\servlet-api.jar(javax/servlet/http/H
    ttpServlet.class)
    class file has wrong version 49.0, should be 48.0
    Please remove or make sure it appears in the correct subdirectory of the classpa
    th.
    public class ServletTemplate extends HttpServlet
    ^
    2 errors
    I have set CLASSPATH with servelt-api.jar.
    Please help me

    rajuchinu wrote:
    class file has wrong version 49.0, should be 48.0You have compiled it with a newer javac version than the JRE version with which you're running it.
    Check java -version and javac -version and align them both out to the same version.

Maybe you are looking for

  • Payment question issue.....

    Hi I am a new customer and I set up a payment by phone with my checking account to be taken out today.  I moved funds from one checking account to the other to assure coverage but I made the mistake and moved it to the wrong account.  I called immedi

  • White screen upon opening, tries to save index fil...

    So I'm having a problem where I try to open Skype, every time it opens it shows a white screen and the background (index file) tries to resave itself like it doesn't exist and none of the text shows up. It all tries to save as html and open in chrome

  • Can't log in to macbook pro

    Whenever I want to log in my 6 months macbook pro. It will log out. I've tried pram etc and it doesn't works. I also entered safe mode and it won't enter. Help me please, this is the video of my mac problem.

  • Under/over payments

    Hi I have an issue with under and over payments and writing off dased on a reason code and gl account.,  I have configured a reason code and defined the relevant gl's,  however when I try and post a payment,  it will only allow me to put the differan

  • Download Photoshop Elements 10

    I have licens to Photoshop Elements 10. How to download this version. I can only find download bottom for version 11. Ole