Calling the main static method of a class
hi, I've got a traditional java class invoked from the command line: public class Aclass public static void main(String[] a) throws Exception { } java -Doneoption=onevalue Aclass and I want to invoke THAT main class from the command line and to simulate the options from the command line ( -Doneption...) , how can I achieve this in clojure ? greetings -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Calling the main static method of a class
You can set system properties with System/setProperty. See more here: http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html /Linus Den 26 sep 2014 15:58 skrev paracomunicacionesinforma...@gmail.com: hi, I've got a traditional java class invoked from the command line: public class Aclass public static void main(String[] a) throws Exception { } java -Doneoption=onevalue Aclass and I want to invoke THAT main class from the command line and to simulate the options from the command line ( -Doneption...) , how can I achieve this in clojure ? greetings -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Calling the main static method of a class
=(AClass/main ( into-array String [23] )) and if the AClass is in the same dir of the invocation then include it in the class path : java -cp clojure-1.6.0.jar:. clojure.main El viernes, 26 de septiembre de 2014 11:12:41 UTC+2, paracomunicaci...@gmail.com escribió: hi, I've got a traditional java class invoked from the command line: public class Aclass public static void main(String[] a) throws Exception { } java -Doneoption=onevalue Aclass and I want to invoke THAT main class from the command line and to simulate the options from the command line ( -Doneption...) , how can I achieve this in clojure ? greetings -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.