[Soot-list] Exception while running

Zeinab Lashkaripour lashkaripour at yahoo.com
Sun Feb 3 06:49:12 EST 2013


Hi Quentin,

I'm really grateful that you answered in detail. I tried as you said (detail explanation of situation) and hope that I have done it right.
OS: Win7
Java: 7
Soot: soot-2.5.0
>(java 6 is perfect for soot 2.5)
Maybe this is the problem(I'll switch to java6) but if it was this don't you think that the command line shouldn't work either?

About the docs I have read them partially as needed and I should say that [2] that you mentioned was a great one. 
I have done the steps you mentioned before and they worked fine.

> A few days ago we helped you with your classpath problem (topic "problem in command line"), what happened next? Did it worked? Why isn't it 
working anymore?
yes it worked and I sent a mail regarding this. I should say that at first I didn't have such an exception I don't know why I have it right now?!

I have program that is supposed to do ReachingDef analysis and compute UD chains. I have written some code with the help from the tutorials in Soot's site (as you mentioned) and wanted to run the code to see what is right and what is wrong that at first I had the problem with my class path (forgot the ".jar") that you and Eric helped me and now I have this new exception that is related to jasmin.Main (given bellow).

Soot started on Mon Feb 04 15:07:44 IRST 2013
Transforming Test... 
Writing to sootOutput\Test.class
Exception in thread "main" java.lang.NoClassDefFoundError: jasmin/Main
    at soot.util.JasminOutputStream.flush(JasminOutputStream.java:35)
    at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)
    at sun.nio.cs.StreamEncoder.flush(Unknown Source)
    at java.io.OutputStreamWriter.flush(Unknown Source)
    at java.io.PrintWriter.flush(Unknown Source)
    at soot.PackManager.writeClass(PackManager.java:915)
    at soot.PackManager.writeOutput(PackManager.java:475)
    at soot.PackManager.writeOutput(PackManager.java:400)
    at soot.Main.run(Main.java:199)
    at soot.Main.main(Main.java:141)
    at MyMain.main(MyMain.java:281)
Caused by: java.lang.ClassNotFoundException: jasmin.Main
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 11 more

I was wondering that because I'm able to run jasmin from cmd maybe there is something else wrong. I run it with the command:
"java jasmin.Main" which gives the usage of jasmin and then with "java jasmin.Main -version" it gives me the version  
    


Regards,
Zeinab



________________________________
 From: Quentin Sabah <quentin.sabah at inria.fr>
To: Soot List <soot-list at sable.mcgill.ca> 
Sent: Sunday, February 3, 2013 2:05 PM
Subject: Re: [Soot-list] Exception while running
 
Hi Zeinab,

We can only help you if you provide the maximum information about your environment, the commands you type, the complete errors you get and what you are trying to achieve.

A few days ago we helped you with your classpath problem (topic "problem in command line"), what happened next? Did it worked? Why isn't it working anymore?

Have you take a look at the massive amount of documentation existing [1]? I also strongly suggest that you read [2], it will give you some insights about Soot.

So far, have you been able to run Soot at least once? If not, follow the next instructions (if you are on Windows, you might have to adapt some commands). If you have an error at any point, reply with the maximum details about that point and all the previous points. Also tell us what operating system you are using, what version of java (java 6 is perfect for soot 2.5).

1) create a new directory "abc" (or whatever name you
 want)
2) put soot-2.5.0.jar in that directory
3) write the following example java program in abc/Hello.java:

  public class Hello { public static void main(String[] args) { System.out.println("Hello"); } }

4) from the command line, make abc the current directory and compile the Hello program, this should create Hello.class in the directory:
  javac Hello.java

5) execute the Hello program, it must print "Hello":
  java Hello

6) make sure the environment variable JAVA_HOME is set, otherwise set JAVA_HOME properly. On Windows you must type something like:
  set JAVA_HOME="C:\Program Files\Java\jdk1.6.0_39\"
Adapt with the path of your java directory.

7) execute soot on our very simple example program. From the command line, make sure you are in the directory you created in the beginning and type:
  java -jar soot-2.5.0.jar -pp -cp . --app Hello

8) You should read "Soot
 finished …" if everything gone right. Check the file abc/sootOutput/Hello.class has been created by Soot. It's all done, you are ready to work.

[1] http://www.sable.mcgill.ca/soot/tutorial/
[2] http://www.brics.dk/SootGuide/

-- 
Quentin Sabah, CIFRE Ph.D. student
Grenoble University
INRIA-SARDES                   | STMicroelectronics/AST
Montbonnot, France             | Grenoble, France
mailto:quentin.sabah at inria.fr  | mailto:quentin.sabah at st.com
phone: +33 476 61 52 42        | phone: +33 476 58 44 14

_______________________________________________
Soot-list mailing list
Soot-list at sable.mcgill.ca
http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130203/b141f06f/attachment-0001.html 


More information about the Soot-list mailing list