I hear that Java is platform and machine independent but when am uploading classes from my 64bit lab top to 32bit dedicated server then it stops working. Is there any solution?
Which Java versions are installed on the two machines? I think the problem is not in the operating system or machine architecture but in the code being compiled on one Java version and being run on an older Java version.
Only native libraries should cause problems when moving a program from a 64-bit system to a 32-bit system or vice versa.
You are right jdk 1.7 is installed on my 64bit machine and jdk 1.6 is working on online dedicated server but this is strange that I downgraded my 64bit to 1.6 and tried but failed. So far as the native libs are concerned I can not say anything.
Is there any quick solution to fix this problem because I have to work on 2 different computers that is really annoying me
The Java class file format is not dependent on the architecture of the machine they're compiled on. The problem must be elsewhere - you still haven't told us what exactly the problem is.
You can compile source files with a JDK 7 to be usable with a Java client if you follow two rules:
1) Do not use any class, interface, method or field that was added in Java 7 (like all of NIO2).
2) Use the -source 1.6 -target 1.6 compiler flags to make the generated class files compatible with Java 6.