mvn clean test on example1
java version "1.7.0_17"
Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:22+0200)
Maven home: D:\Outils\Maven\apache-maven-3.1.1\bin..
Java version: 1.7.0_17, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_17\jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Thanks for reporting this Antoine. This is a known problem caused by the JDK on Windows 7. It does not occur on Windows XP. I am closing this issue because i) it is a duplicate and ii) Byteman issues are managed using the JBoss JIRA instance rather than the GIT issue manager. The JBoss JIRA for this issue includes a suggested workaround which you might want to try. A full solution will require the JDK being fixed. I don't think there is a proper fix which can be applied to Byteman. See BYTEMAN-255 (https://issues.jboss.org/browse/BYTEMAN-255) for details of the workaround.
By the way, I solved it : bytemanproject/byteman#24
Hope this pull request will be merge soon to allow everyone to work with byteman on windows 7
Here is a working sample with my byteman fork containing the fix : https://github.com/avianey/UnitTesting/blob/master/src/test/java/fr/astek/service/ServiceTest.java
Note that I must Thread.sleep() in my test method in order for the BMRule to apply. If not, the IOException is not thrown each time ;-) depends on my CPU load I think !