quangnv2005
asked on
Error compile in java
I have a file jar use build chart .I extract and then decompile from .class to .java.
Then i compile file java to file class but error .
private static String z(char ac[])
{
ac;
ac.length;
JVM INSTR swap ;
int l = 0;
goto _L1
_L3:
JVM INSTR dup ;
l;
JVM INSTR dup2 ;
JVM INSTR caload ;
byte byte0;
switch(l % 5)
{
case 0: // '\0'
byte0 = 0x53;
break;
case 1: // '\001'
byte0 = 66;
break;
case 2: // '\002'
byte0 = 12;
break;
case 3: // '\003'
byte0 = 86;
break;
default:
byte0 = 7;
break;
}
byte0;
JVM INSTR ixor ;
(char);
JVM INSTR castore ;
l++;
_L1:
JVM INSTR swap ;
JVM INSTR dup_x1 ;
l;
JVM INSTR icmpgt 9;
goto _L2 _L3
_L2:
JVM INSTR new #340 <Class String>;
JVM INSTR dup_x1 ;
JVM INSTR swap ;
String();
intern();
return;
}
Statement error:
ac;
ac.length;
JVM INSTR swap ;
goto _L1
_L3:
JVM INSTR dup ;
l;
JVM INSTR dup2 ;
JVM INSTR caload ;
byte0;
JVM INSTR ixor ;
(char);
JVM INSTR castore ;
_L1:
JVM INSTR swap ;
JVM INSTR dup_x1 ;
l;
JVM INSTR icmpgt 9;
goto _L2 _L3
_L2:
JVM INSTR new #340 <Class String>;
JVM INSTR dup_x1 ;
JVM INSTR swap ;
String();
intern();
I don't know solution to compile .Can you help me ?
Thank you very much.
Then i compile file java to file class but error .
private static String z(char ac[])
{
ac;
ac.length;
JVM INSTR swap ;
int l = 0;
goto _L1
_L3:
JVM INSTR dup ;
l;
JVM INSTR dup2 ;
JVM INSTR caload ;
byte byte0;
switch(l % 5)
{
case 0: // '\0'
byte0 = 0x53;
break;
case 1: // '\001'
byte0 = 66;
break;
case 2: // '\002'
byte0 = 12;
break;
case 3: // '\003'
byte0 = 86;
break;
default:
byte0 = 7;
break;
}
byte0;
JVM INSTR ixor ;
(char);
JVM INSTR castore ;
l++;
_L1:
JVM INSTR swap ;
JVM INSTR dup_x1 ;
l;
JVM INSTR icmpgt 9;
goto _L2 _L3
_L2:
JVM INSTR new #340 <Class String>;
JVM INSTR dup_x1 ;
JVM INSTR swap ;
String();
intern();
return;
}
Statement error:
ac;
ac.length;
JVM INSTR swap ;
goto _L1
_L3:
JVM INSTR dup ;
l;
JVM INSTR dup2 ;
JVM INSTR caload ;
byte0;
JVM INSTR ixor ;
(char);
JVM INSTR castore ;
_L1:
JVM INSTR swap ;
JVM INSTR dup_x1 ;
l;
JVM INSTR icmpgt 9;
goto _L2 _L3
_L2:
JVM INSTR new #340 <Class String>;
JVM INSTR dup_x1 ;
JVM INSTR swap ;
String();
intern();
I don't know solution to compile .Can you help me ?
Thank you very much.
> I have a file jar use build chart .I extract and then decompile from
> .class to .java.
That's a weird format in there. I see isntructions that I do not understand. What decompiler did you use?
> .class to .java.
That's a weird format in there. I see isntructions that I do not understand. What decompiler did you use?
private static String z(char ac[])
{
ac; // <<< variable "ac" doesn't have a type (int, String, char,...)
ac.length;
JVM INSTR swap ; // <<<<< that's no java code
int l = 0;
goto _L1
_L3:
JVM INSTR dup ; // <<<<< that's no java code
l;
I think you should get a better decompiler or maybe better read the instructions how to decompile...
{
ac; // <<< variable "ac" doesn't have a type (int, String, char,...)
ac.length;
JVM INSTR swap ; // <<<<< that's no java code
int l = 0;
goto _L1
_L3:
JVM INSTR dup ; // <<<<< that's no java code
l;
I think you should get a better decompiler or maybe better read the instructions how to decompile...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>ac;
>>ac.length;
those lines r uncomplete expressions comment them or complete the expression
also what is INSTR?
I think u need to provide the whole class
>>ac.length;
those lines r uncomplete expressions comment them or complete the expression
also what is INSTR?
I think u need to provide the whole class
There is probably bytecode embeded into the source java file.
>> I don't know solution to compile .Can you help me ?
I'm afraid we can't
I'm afraid we can't
The example given in that link looks exactly like your output, so...
zelix klassmaster produces classes which decompile to this too...
The only way that I know of to decompile this sort of class, is by hand, as automated decompilers don't do a very good job...
I *think* knowledge of the bytecode specification, and javap should help here... With maybe a printout of the code as well...
I do have to ask though... Why don't you have the source code?
Are you trying to hack something? If so, we cannot help you...
The only way that I know of to decompile this sort of class, is by hand, as automated decompilers don't do a very good job...
I *think* knowledge of the bytecode specification, and javap should help here... With maybe a printout of the code as well...
I do have to ask though... Why don't you have the source code?
Are you trying to hack something? If so, we cannot help you...
ASKER
Thank all .
Very much zzynx , I think you say right .
Very much zzynx , I think you say right .
Then please close this Q by accepting my (and maybe other) comment(s)
What error? Please post the errors