{"action":"created","issue":{"url":"https://api.github.com/repos/jmockit/jmockit1/issues/306","repository_url":"https://api.github.com/repos/jmockit/jmockit1","labels_url":"https://api.github.com/repos/jmockit/jmockit1/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/jmockit/jmockit1/issues/306/comments","events_url":"https://api.github.com/repos/jmockit/jmockit1/issues/306/events","html_url":"https://github.com/jmockit/jmockit1/pull/306","id":161728550,"number":306,"title":"If the JMockit JAR cannot be found in the classpath, recreate in on disk for initialization without -javaagent option","user":{"login":"Vampire","id":325196,"avatar_url":"https://avatars.githubusercontent.com/u/325196?v=3","gravatar_id":"","url":"https://api.github.com/users/Vampire","html_url":"https://github.com/Vampire","followers_url":"https://api.github.com/users/Vampire/followers","following_url":"https://api.github.com/users/Vampire/following{/other_user}","gists_url":"https://api.github.com/users/Vampire/gists{/gist_id}","starred_url":"https://api.github.com/users/Vampire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vampire/subscriptions","organizations_url":"https://api.github.com/users/Vampire/orgs","repos_url":"https://api.github.com/users/Vampire/repos","events_url":"https://api.github.com/users/Vampire/events{/privacy}","received_events_url":"https://api.github.com/users/Vampire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-22T16:30:09Z","updated_at":"2016-06-23T08:25:16Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jmockit/jmockit1/pulls/306","html_url":"https://github.com/jmockit/jmockit1/pull/306","diff_url":"https://github.com/jmockit/jmockit1/pull/306.diff","patch_url":"https://github.com/jmockit/jmockit1/pull/306.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/jmockit/jmockit1/issues/comments/227982665","html_url":"https://github.com/jmockit/jmockit1/pull/306#issuecomment-227982665","issue_url":"https://api.github.com/repos/jmockit/jmockit1/issues/306","id":227982665,"user":{"login":"Vampire","id":325196,"avatar_url":"https://avatars.githubusercontent.com/u/325196?v=3","gravatar_id":"","url":"https://api.github.com/users/Vampire","html_url":"https://github.com/Vampire","followers_url":"https://api.github.com/users/Vampire/followers","following_url":"https://api.github.com/users/Vampire/following{/other_user}","gists_url":"https://api.github.com/users/Vampire/gists{/gist_id}","starred_url":"https://api.github.com/users/Vampire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vampire/subscriptions","organizations_url":"https://api.github.com/users/Vampire/orgs","repos_url":"https://api.github.com/users/Vampire/repos","events_url":"https://api.github.com/users/Vampire/events{/privacy}","received_events_url":"https://api.github.com/users/Vampire/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T08:25:16Z","updated_at":"2016-06-23T08:25:16Z","body":"The point is, that you do not know where the JAR is on disk or whether it is there at all. The JEE spec explicitly allows diskless systems. This also means, that an appserver can simply store the deployment, that he probably gets over a Socket as stream in the RAM without putting it to disk somewhere.\r\n\r\nOther runtime environments can do similar things. \r\n\r\nIn the case of WildFly, the deployment actually is stored on disk, but you have no obvious chance to query that. You can know where it stores the deployments and then iterate to try to find the right one, but this would be highly instable and tied to one version of one software.\r\n\r\nIn the case of  current WildFly version, what you get as code source is a URL like `vfs:path/to/wildfly/content/yourApplication.ear/lib/jmockit.jar` or very similar,  where `content` is already non-existing but only virtual. The URL you extract from this will never be valid and you also have no reliable chance to extract the whole JAR, as the JAR is not as a whole part of the classpath. \r\n\r\nBefore I wrote this PR, I actually did this, packing the jmockit JAR additionally as resource in my own JAR and then extracting it and adding it to the classpath property that Jmockit is investigating. But doing it this way of course doubles the size of jmockit.jar, thus I thought the way with the filelist is better. \r\n\r\nAlso this way will always work, as long as there is a writable temp directory, as it uses standard classpath searching, that should always work, no matter dirty stuff what someone does with custom classloaders. "}}
{"actor":{"display_login":"Vampire"}}