# Executing Class File in Ubuntu!



## nitish_mythology (May 18, 2008)

I am coding in JCreator(Windows) and now I want to execute the class file in Linux..
Dont know exactly if I have jdk or jre insatlled..

Here is the output of _ java -version _



> nitish@Nitish:~$ java -version
> java version "1.4.2"
> gij (GNU libgcj) version 4.1.2 (Ubuntu 4.1.2-0ubuntu5)
> 
> ...




This is what i did to execute the java ByteCode



> nitish@Nitish:~/Development$ java linear
> Exception in thread "main" java.lang.ClassFormatError: linear (unrecognized class file version)
> at java.lang.VMClassLoader.defineClass(libgcj.so.70)
> at java.lang.ClassLoader.defineClass(libgcj.so.70)
> ...



Do i need to secify path?? I am already working in the directory that contains the class file.


* PS:I hope the section is correct! Mayb it shd have been in Open Source! *


----------



## QwertyManiac (May 18, 2008)

I do not know about the problem, but its better if you use Sun Java JDK 6 than GCJ (GNU tools).


----------



## nitish_mythology (May 18, 2008)

I have exceeded my monthly Bandwidth usage so I dont want to download anything right now..will have to wait till June!


----------



## Quiz_Master (May 18, 2008)

Or work in Netbeans (with JDK installed).... If you don't get enough bandwidth to download you can order a free DVD too from Netbeans.org


----------



## nitish_mythology (May 18, 2008)

Ya i have ordered it.. Seems I wll have to wait for a few days if I cant work on GCj.


----------



## Faun (May 18, 2008)

Quiz_Master said:


> Or work in Netbeans (with JDK installed).... If you don't get enough bandwidth to download you can order a free DVD too from Netbeans.org



+1


----------

