Animation.jar in java runtime environment - java

I am using netbeans IDE.I have imported a animation.jar in my project for better gui experience,if i execute it in netbeans,it works fine.But, after i compiled and build the project.I copied the dist folder to desktop and run my project the animation is no longer running please help me,thanks in advance,sorry for bad english.

this are the errors sir after i convert it to .exe app using launch4j. I bundled it in jre6..in jre1.8 ir latest jre the problem is the my switching icons are not working..
Executing: C:\Users\syracuse\Desktop\dist\Alumni.exe
Exception in thread "main" java.lang.UnsupportedClassVersionError: AppPackage/AnimationClass : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.misc.Launcher$ExtClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at alumni.login.<init>(login.java:28)
at alumni.Alumni.main(Alumni.java:18)

Related

JNI Error even though Java is the latest version

I've been trying to run a jar file with a class version 59.0, however it always gives me a JNI error saying I can only run class file versions up to 52.0
This is weird because I am on the latest version of Java and have restarted my computer.
This is the error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: MapConverter has been compiled by a more recent version of the Java Runtime (class file version 59.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Please help!
Nevermind, I was downloading the "latest" version of java from the wrong page. I'm running Java 8.

Apache James Installation Issue - java.lang.UnsupportedClassVersionError:

I am trying to install apache james 3.3.0 in windows 7 service pack 1, in which both jd 1.7, and 1.8 already installed. But while running the james i am getting the below error.
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/ja
mes/app/spring/JamesAppSpringMain : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
jdk installation directory
This error comes from lower version of jvm. It means you are trying to run java 8 compiled jar with java 7 jvm.
Therefore java 7 says that class version is not recognized. You need to configure JAVA_HOME points 8 then re-run.
You can find what class version is supported by which jvm https://en.wikipedia.org/wiki/Java_class_file#General_layout
This worked for me: I added
wrapper.java.command=/toolbox/jdk1.8.0_192/bin/java
near the top of conf/wrapper.conf .

Is it possible to auto-update install4j bundled JRE

I've got an install4j question.
I was wondering if it is possible to update the bundled JRE of an application that is already installed.
For example, in our application we had a bundled java 6. Now, we upped the minimum version to java 7 and we bundle JRE 8.
For new installations this works fine. But with existing installs, but JRE 8 is not downloaded in the update process, and after updating the application gives an error at startup:
java.lang.UnsupportedClassVersionError: camMan/shared/E/p : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at camMan.c.b.s.<clinit>(Unknown Source)
at camMan.unsecure.LoginLauncher.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
I'm using install4j version 5.1.15.
- We use a dynamic bundle (download on demand)
- "install as a shared JRE" is disabled
- "install only if no other suitable JRE is found" is enabled.
Thanks in advance!

Caused by: java.lang.ClassNotFoundException: net.sourceforge.cobertura.coveragedata.HasBeenInstrumented

We had installed version of our applications (without any instrumentation or cobertura jar included before generating application bundles).
After installation we instrumented all the jar with cobertura, and included cobertura jar file in java classpath. but while starting application it give below error.
any input will really help, thanks.
Java version "1.7.0_25"
cobertura ver 1.9.4.1
Exception in thread "main" java.lang.NoClassDefFoundError: net/sourceforge/cobertura/coveragedata/HasBeenInstrumented
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: net.sourceforge.cobertura.coveragedata.HasBeenInstrumented
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
You should add cobetura.jar to Bootstrap Classes with -Xbootclasspath. More info: https://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html
This needs to be done in order to load the cobetura classes, which are needed in order to load your app classes.
I have been able to get rid of this problem by running a late package goal, as it re-compiles and re-packages de code without Cobertura.
The goals I use are:
clean site package

Can not deploy JavaFX 2 application

I have the project based on JavFX 2, it`s done and works perfect in Eclipse. Now i am trying to deploy it on computer(self-service,terminal,..). I have created jar file, but when i am trying to "java -jar myproject.jar" i take the following
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
UDT:
I think there is some problem with jfxrt.jar where javafx.application.Application class stored, in eclipse i added this jar in build path manually..
In Java 7, JavaFX is included with the JDK download but is not on the classpath (JavaFX is not part of the core libraries in Java 7). Have a look at the tutorial on deployment, which shows mechanisms for deploying a jar file that will work.
(In Java 8, JavaFX becomes part of the core libraries and will be included on the classpath, so your regular jar file may well work. There are still some cool things you can do with the proper deployment process, though.)

Categories

Resources