This information is not available in a standard javac compiled class file. I'm not sure if it's even available via JSR-45, which would be the only other possible place you could look: http://www.jcp.org/en/jsr/detail?id=45
But, I have seem some custom JSP vendors (I forget who, it was one of the niche players), back before the days of JSR-45, with a debugger that used information like this - I'm sure they were compiling it in themselves though, not to a standard. Bad news, sorry. - Paul -----Original Message----- From: Raghu L [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 09, 2004 2:11 AM To: BCEL Users List Subject: Re: Source code for a particular instruction Hi, U guys miss understood my question. I want with out using any decompiler(they use reverse enginnering I guess). I have source code and bytecode I want to know for a specific instruction in the instruction list the corresponding source code. For example we can know the line number of a instruction in the source code by using LinenumberTable. Can we get exact position in the line which has produced the instruction. For example if( (a!=0 && b> 40) || (b!=a && c==d) && (c>=78 || d<40)) //* 8 14:iload_1 //* 9 15:ifeq 24 //* 10 18:iload_2 //* 11 19:bipush 40 //* 12 21:icmpgt 48 //* 13 24:iload_2 //* 14 25:iload_1 //* 15 26:icmpeq 59 //* 16 29:iload_3 //* 17 30:iload 4 //* 18 32:icmpne 59 //* 19 35:iload_3 //* 20 36:bipush 78 //* 21 38:icmpge 48 //* 22 41:iload 4 //* 23 43:bipush 40 //* 24 45:icmpge 59 instructions //* 10 18:iload_2 //* 11 19:bipush 40 //* 12 21:icmpgt 48 are being generated for b > 40. How can I say this from bytecode is there any facility in BCEL to tell the offset in the line for specific instruction. thanks inadvance Bye On Tue, 9 Nov 2004 14:52:05 +1300, Nick Hynes <[EMAIL PROTECTED]> wrote: > Try using DJ java decompiler. It's free, and works well. > > _____ > > Peace Software > Nick Hynes > Software Architect > Strategy Research & Architecture > Peace House > 100 Symonds St > Auckland, NZ > Tel. 9-373-0400 ext. 5001 > Fax. 9-373-0401 > _____ > > This message contains CONFIDENTIAL INFORMATION intended solely for the > use of the addressee(s) named above. Any review, disclosure, > distribution, copying or use of the information by others is strictly > prohibited. If you have received this message in error, please advise > the sender by immediate reply and delete the original message. > > |||-----Original Message----- > |||From: Rags [mailto:[EMAIL PROTECTED] > |||Sent: Tuesday, 9 November 2004 12:24 p.m. > |||To: [EMAIL PROTECTED] > |||Subject: Source code for a particular instruction > ||| > ||| > |||Hi, > > > ||| > ||| How to get source code from bytecode?. I tried > |||Utility.codeToString(...) but > |||it only gives in JVM instructions. I want source code for specific > |||instruction(s) in the byte code. Is there any facility to do that > |||without > |||reverse engineering whole bytecode?. > ||| > |||Thanx in advance. > ||| > |||Bye > ||| > ||| > |||--------------------------------------------------------------------- > |||To unsubscribe, e-mail: [EMAIL PROTECTED] > |||For additional commands, e-mail: [EMAIL PROTECTED] > > ------------------------------------ --------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- =========================== Raghu Lingampally M.tech(cse), II year IIT Kanpur India Ph: 0512-2597653 (After 9pm) http://www.cse.iitk.ac.in/users/raghul =========================== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
