I'm trying to run an application with java 1.7.2 and its complaining it needs java 1.6 and up.
Is there a way to bypass that check(without recompiling, I don't have the source code)? both for casual use and so I can say that it seems to work in the bug report?
-
We've no idea how the check is being performed, which makes it pretty tricky to suggest anything...Jon Skeet– Jon Skeet2012年01月23日 09:14:16 +00:00Commented Jan 23, 2012 at 9:14
-
1Is an application you are trying to run complaining? There might be different ways it could be checking so it might be hard to do something without knowing what it's actually checking for.Vadim– Vadim2012年01月23日 09:14:27 +00:00Commented Jan 23, 2012 at 9:14
1 Answer 1
You need to decompile the bytecode to see how the code checks the java version. Maybe the bytecode tries to check a system attribute? In that case, you can reset the attribute to '1.6' before starting the proprietary code.
I can recommend DJ as a decompiling tool.
It is better to decompile the version checking code, to correct it and to recompile it. This will be hard if the code was obfuscated however.