Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 69669 invoked from network); 2 Dec 2007 20:45:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Dec 2007 20:45:56 -0000 Received: (qmail 10912 invoked by uid 500); 2 Dec 2007 20:45:41 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 10836 invoked by uid 500); 2 Dec 2007 20:45:41 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 10827 invoked by uid 99); 2 Dec 2007 20:45:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Dec 2007 12:45:41 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [81.169.146.162] (HELO mo-p00-ob.rzone.de) (81.169.146.162) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Dec 2007 20:45:21 +0000 X-RZG-CLASS-ID: mo00 X-RZG-AUTH: gSfJPH9qIU5ich7vHxkc9V5gTaVXJh1QhJRC6aupfJFEwGL6TqV7iJCfuBQ= Received: from [192.168.2.101] (pD95565CF.dip.t-dialin.net [217.85.101.207]) by post.webmailer.de (mrclete mo24) (RZmta 14.5) with ESMTP id v039c0jB2KY1VU for ; Sun, 2 Dec 2007 21:45:21 +0100 (MET) (envelope-from: ) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: <93375AA4-9D01-440D-AC1F-CCF3528E2905@sciss.de> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <6762CE48-1A54-465A-B53B-EEE88C29A4BE@sciss.de> Content-Transfer-Encoding: 7bit From: Sciss Subject: [javaflow] Re: getting javaflow Date: Sun, 2 Dec 2007 21:45:20 +0100 To: "Jakarta Commons Users List" X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org thank you wendy, un-commenting the elements in pom.xml helped. now i get a runtime exception from running the tutorial example. i'm trying to use the dynamic method, having a regular class JavaflowTest and one MyRunnable that gets loaded with the special javaflow class loader: // continuation test from the javaflow tutorial import org.apache.commons.javaflow.*; public class MyRunnable { public MyRunnable() { Continuation d = Continuation.startWith(new Runnable() { public void run() { System.out.println("started!"); for( int i=0; i<10; i++ ) echo(i); } private void echo(int x) { System.out.println(x); Continuation.suspend(); } }); System.out.println("returned a continuation"); while(d!=null) { d = Continuation.continueWith(d); } } } // helper class to run the example import org.apache.commons.javaflow.*; import java.net.*; public class JavaflowTest { public static void main( String[] args ) { try { final ClassLoader cl = new ContinuationClassLoader( new URL[]{ new URL( "file://MyRunnable.jar" )}, JavaflowTest.class.getClassLoader()); // parent class loader final Class clz = cl.loadClass( "MyRunnable" ); clz.newInstance(); } catch( Exception e ) { e.printStackTrace(); } } } i'm preparing the URL class loader jar using $ jar cvf MyRunnable.jar MyRunnable.class and i run the test using $ java -cp ../fromSVN/javaflow/trunk/target/javaflow-1.0- SNAPSHOT.jar:../fromSVN/javaflow/trunk/lib/bcel-5.2.jar:../commons- logging-1.1.1/commons-logging-1.1.1.jar:. JavaflowTest but end up with started! 0 1 2 3 4 5 6 7 8 9 02.12.2007 21:41:47 org.apache.commons.javaflow.bytecode.StackRecorder execute SCHWERWIEGEND: stack corruption. Is class MyRunnable$1 instrumented for javaflow? java.lang.IllegalStateException: stack corruption. Is class MyRunnable $1 instrumented for javaflow? at org.apache.commons.javaflow.bytecode.StackRecorder.execute (StackRecorder.java:103) at org.apache.commons.javaflow.Continuation.continueWith (Continuation.java:171) at org.apache.commons.javaflow.Continuation.startWith (Continuation.java:130) at org.apache.commons.javaflow.Continuation.startWith (Continuation.java:103) at MyRunnable.(MyRunnable.java:7) at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance (Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at JavaflowTest.main(JavaflowTest.java:12) thanks again for help! ciao, -sciss- Am 02.12.2007 um 19:57 schrieb Wendy Smoak: > On Dec 2, 2007 11:39 AM, Sciss wrote: > >> i'm trying to do the javaflow tutorial from http:// >> commons.apache.org/ >> sandbox/javaflow/tutorial.html , but i don't know how to download and >> install javaflow. both >> >> http://vmgump.apache.org/gump/public-jars/commons-sandbox/jars/ >> http://people.apache.org/builds/jakarta-commons/nightly/ >> >> don't have a .jar at hand. i did > > The only snapshots I can find are here, but they're really old... > http://people.apache.org/repo/m1-snapshot-repository/commons- > javaflow/jars/ > > (Also, please tag future subject lines with [javaflow] to help people > sort messages.) > >> $ svn co http://svn.apache.org/repos/asf/commons/sandbox/javaflow >> >> , found that i need a build-tool called maven, downloaded maven, >> tried >> >> $ ~/Desktop/apache-maven-2.0.8/bin/mvn clean install >> >> but only get an error message > > Edit the javaflow/trunk/pom.xml file and un-comment the > elements that you see there. After that, it builds for me. > > Another option is to check out commons-sandbox-parent and build that > locally with: > svn co http://svn.apache.org/repos/asf/commons/proper/commons- > sandbox-parent/trunk/ > commons-sandbox-parent > cd commons-sandbox-parent > mvn install > > HTH, > -- > Wendy > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org