jakarta-bcel-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "BEEP_BEEP" <beep_b...@web.de>
Subject Problem with bcel example
Date Mon, 16 May 2005 19:49:22 GMT
Hi!
I'm very new in BCEL.

I'm trying to run examples from official manual in BCEL site,
Here you may find source code I run in my example:
http://jakarta.apache.org/bcel/manual.html

This is simplest example showing how to create HelloWorld class file with
functionality like this:

import java.io.*;

   public class HelloWorld {
      public static void main(String[] argv) {
          BufferedReader in = new BufferedReader(new
InputStreamReader(System.in));
          String name = null;

          try{
	         System.out.print("Please enter your name> ");
	         name = in.readLine();
          }catch(IOException e) { 
             return; 
          }

          System.out.println("Hello, " + name);
       }
    }


***** 
I did exactly what proposed by this Manual.
*****

Then I have generated HelloWorld.class and then executed it.
Everything was fine! The code was running excellent!!

But when I decompiled my HelloWorld.class by Jad I have source like this:


import java.io.*;

public class HelloWorld
{

    public static void main(String argv[])
    {
        BufferedReader in;
        in = new BufferedReader(new InputStreamReader(System.in));
        Object obj = null;
        String name;
        System.out.print("Please enter your name> ");
        name = in.readLine();
        break MISSING_BLOCK_LABEL_37;
        return;
        System.out.println("Hello, " + name);
        return;
    }

    public HelloWorld()
    {
    }
}

1)Note! Try/catch block is absent!!
2)And " break MISSING_BLOCK_LABEL_37;" line appears.

What does it mean? 

Please help me!
I need also information how to use JustIce.
I tried to use it coding like this:
Verifier.main(new String[]{"C:\\work\\bcel-5.1\\ex\\HelloWorld.class"});
And this is result output:

VERIFIED_REJECTED
Repository.lookup() failed. FILE NOT FOUND?

Pass 2:
VERIFIED_NOTYET
Not yet verified.

Warnings:
<none>

*****
Help me! Please!
Thanks! 
Peter.


---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-user-help@jakarta.apache.org


Mime
View raw message