Showing posts with label Java 7. Show all posts
Showing posts with label Java 7. Show all posts

Monday, April 29, 2013

"ceylon" command throwing "UnsupportedClassVersionError" exception

When i was trying to install and configure classpath for Ceylon programming language to begin coding i was getting this error which does not describe it self.


 Exception in thread "main" java.lang.UnsupportedClassVersionError: com/redhat/ce  
 ylon/launcher/CeylonClassLoader : Unsupported major.minor version 51.0  
     at java.lang.ClassLoader.defineClass1(Native Method)  
     at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)  
     at java.lang.ClassLoader.defineClass(ClassLoader.java:615)  
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14  
 1)  
     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 java.lang.ClassLoader.loadClass(ClassLoader.java:306)  
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)  
     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)  
 Could not find the main class: com.redhat.ceylon.launcher.Launcher. Program will  
  exit.  

The mistake i did at the beginning seems to be avoid reading the "README.md" file in ceylon package. In there it clearly stated that "Ceylon execute on any Java 7 compatible JVM ... "

So the above error gives because of the incompatible JVM version. (as it says in the line "Unsupported major.minor version 51.0" ).

So to fix this what you need to do is simply install the JDK 7 and add it to the classpath, JAVA_HOME and JRE_HOME. That will fix this.

HAPPY CEYLON CODING !!!


Thursday, December 20, 2012

Eclipse helios "install new software" feature lagging.

I have to use eclipse helios which is 2 versions behind the current version, thanks to our IT department few days back. When i try to download pluggins over network it start to lag after 24% completed.

After doing so many searches on google finally i found out the  problem is with the JRE version.

In my machine i have the latest Java 1.7 installed. Eclipse helios originally designed for JRE 1.6 and its "install new software" feature use a depricated sort method from java 1.7 which was originally in Java 6. So to solve the problem i have started eclipse using "Command prompt" to with passing parmeter to use JDK/JRE 1.6 as java runtime for eclipse.


D:\Eclipse\eclipse j2ee indigo>eclipse -vm C:\Java\jdk1.6.0_31\bin\javaw.exe

This solve the problem and now you can install any plugging without geting stuck and suddenly stopped the process.