OS: Windows XP
I am using yuicompressor-2.4.2
to compress some CSS before uploading to my server.
But when I run it, the following exception appears:
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/yahoo/platform/yui/compressor/Bootstrap (Unsupported major.minor version 48.0)
So I think it's because of the JRE.
I typed in the command:
cmd: java -version
And it says:
java version "1.3.1_01"
But it should say 1.6.0_16
, since I have installed the latest version.
What should I do to make Java use the latest version instead of the old one?
It just returns THE reference.
A return statement causes the program control to transfer back to the caller of a method. Every method in Java is declared with a return type and it is mandatory for all java methods. A return type may be a primitive type like int, float, double, a reference type or void type(returns nothing).
Your method has no return type, Provide a return type of int in your method. And return -1 means nothing in java, you are just returning a int value, thats it.
Object references are passed by value The reason is that Java object variables are simply references that point to real objects in the memory heap. Therefore, even though Java passes parameters to methods by value, if the variable points to an object reference, the real object will also be changed.
Set the environment variable JAVA_HOME pointing to the directory where you have jdk 1.6.0
set JAVA_HOME=your_path_to_jdk1.6
set PATH=%JAVA_HOME%/bin;.;..;%PATH%
That's from a command window. Also you can do it from "My PC > Properties > Advanced > Environment variables"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With