what is minimum version of jre to use java2word api - java

I am using API java2word-3.1.jar to create doc file.
it is working good in JRE 1.5+ version.
but I want to use it in JRE1.4.
could you please tell me any solution.
currently getting below error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: **word/api/interfaces/IDocument (Unsupported major.minor version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)**
thanks and regards
Shankar

Either recompile the package yourself, if it will compile under 1.4, or else upgrade your Java to something that hasn't been unsupported since October 30th, 2008.
what is minimum version of jre to use java2word api
I don't know why you're asking that, when you've already established conclusively that it's 1.5.

Related

Unsupported ClassVersion Error when deploying jira

I am trying to run jira application on my local machine with atlas-run and atlas-debug command. But i have a build failure here.
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.2.1:run (default-cli) on project ccd_jirautils: Execution de
fault-cli of goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.2.1:run failed: Unable to load the mojo 'run' in the plugin 'com.atlassia
n.maven.plugins:maven-amps-dispatcher-plugin:6.2.1' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupE
xception: com/atlassian/maven/plugins/ampsdispatcher/AmpsDispatcherRunMojo : Unsupported major.minor version 52.0
I tried to run the same on Linux machine i am able to get the success build with the jre 1.7 and atlassian_sdk version 5.0.3. when i am trying to run the same on Windows platform i get the above error. I also tried with jre 1.8 which is a bigtime failure jira refuse to start. so please I need your help here. can you please suggest me what might be the solution for this?
Caused by: java.lang.UnsupportedClassVersionError: com/atlassian/maven/plugins/ampsdispatcher/AmpsDispatcherRunMojo : Unsupported major.minor version
52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
at org.eclipse.sisu.space.URLClassSpace.loadClass(URLClassSpace.java:107)
... 41 more
Following are the major versions of JRE the class file is compatible with
Java SE 9 = 53
Java SE 8 = 52
Java SE 7 = 51
Check what version of JAVA does your MAVEN is using mvn -version. You should be using jre 1.7
You didn't mention the Jira version you're running, but the error, as mentioned by ravthiru comes from a Java version mismatch. That is you have to use Java 8 for this to work, at least if you stick to the atlas-run and atlas-debug scripts, which use the mentioned com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.2.1
which is a bit odd, as that one is included in the plugin-sdk 6.2.2, maybe you updated the sdk? Would you mind having a look inside atlas-run and double check it's 5.0.3?
That plugin was compiled using Java 8, so you either have to do so too or use an older version of the atlassian-plugin-sdk, which was compiled using Java 7. The 5.x versions should work.
Regarding the failure of running Jira with Java 8: Which version are you running, and what errors does it log?

What Version of Maven is Compatible with Java 6?

I have to work in an older project that requires java 6 to run, as there are references to depreciated sun classes that have been removed in future versions. As part of the process, I changed my jdk from 8 in my system path to point to java 6 jdk. After doing so I get:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:401)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:254)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
at org.codehaus.plexus.classworlds.launcher.Launcher.getMainClass(Launcher.java:144)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:266)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
This is is similar to Maven Installation OSX Error Unsupported major.minor version 51.0 and Exception in thread "main" java.lang.UnsupportedClassVersionError: a (Unsupported major.minor version 51.0) however I'm not looking to upgrade, I'm looking to find a version of maven that is compatible with java 6. Any ideas on which version is compatible and where I can download/install it from for mac?
According to the Maven release history page, the last Maven version that works with JDK1.6 is 3.2.5.
Note that it's better to keep using the newer Maven version (and keep Java 8 as the default in the system path), and tell Maven that the project it's building should compile with source set to 1.6 - see source and target documentation for more info. Reverting to an old Maven will remove the bug fixes / enhancements of the newer versions.
If you have the problem you need to build with JDK 6 but you would like run Maven with JDK 7 (cause you like to use Maven 3.3+) you should consider using toolchain which makes this independent from each other.

jboss-eap-6.3 - Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jboss/modules/Main (Unsupported major.minor version 50.0)

i have installed jboss-eap-6.3 on UNIX server, when i run the add-user.sh script i am getting following error..
jboss-eap-6.3/bin $ ./add-user.sh
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jboss/modules/Main (Unsupported major.minor version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
The message about version 50.0 means that the class files were
compiled for JDK 1.6 (or greater, when others are released). The JVM
that's reading that file must not be 1.6.
Compile in JDK 1.6 and running on lower version than Java 6
Please refer here for similar kind of issue.
Can you check the version of Java you are using?
You have to know that JBoss EAP 6.x must be run on JDK 6 or JDK 7.

Jar File is running in my computer but not Running in another computer [duplicate]

This question already has answers here:
How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
(51 answers)
Closed 8 years ago.
I created a jar file in my laptop and it runs fine in my computer without trouble but when i use the same in my friend's laptop it shows and exception and the file does not run. But it's still good with my laptop. What's the reason?
name of jar =BlueServer.jar
it has only one class.
classname=Server.java
one external library is used name=Bluecove.jar which is used for accessing bluetooth from java.
Ide used=Eclipse
used Eclipse for creating jar,already checked the option "Pacakage required libraries into generated jar"
This Error came while i try to run that same jar in another computer....
java -jar BlueServer.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: Server : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
It is a problem with the version of the used JRE. See this post for details.
Try
java --version
on both machines.
This error indicates, that your file is not executable with the installed JRE version.
See How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version for more info about that.
java.lang.UnsupportedClassVersionError happens because of a higher JDK during compile time and lower JDK during runtime. Make sure the jdk version installed in your laptop is equal or higher than your friend's.

How to fix major minor version exception [duplicate]

This question already has answers here:
How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
(51 answers)
Closed 9 years ago.
I did a project using jdk 1.7. And then I changed it to the 1.6, I got the following error:
java.lang.UnsupportedClassVersionError: com/simulator/server/Start : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: com.simulator.server.Start. Program will exit.
Exception in thread "main" Java Result: 1
I'm using NetBeans platform and that changes are did using the NetBeans.
Recompile your project on JDK 1.6.
Unsupported major.minor version error happens when your code is compiled on a different java version(jdk) and you are trying to run it a different java version(jre).
You should ether switch back to java 7, or recompile your code with language level 6 (assuming you aren't using any new Java 7 features).
yes you get this exception when you compile your code with a higher version and try to run it with a lower one.
Either recompile with java 6(and run with java 6 as you are) or run with java 7(as it is already compiled with java 7).

Categories

Resources