From leopold.frey at free.fr Thu May 1 13:53:12 2008 From: leopold.frey at free.fr (Léopold Frey) Date: Thu May 1 13:53:14 2008 Subject: [java-dev] Re: [max5] mxj and attributes list In-Reply-To: Message-ID: <2236a.481a1fa7@www.cycling74.com> When testing this issue I didn't see that not only mxj attributes are now invisible but also functions ! So that the "quickref" menu hasn't got any sense on mxj. And now there's no way of knowing what to do with a mxj class without opening it's source code (which is impossible if the source is in a jar). This is also true for js and jsui. I really hope this will be fixed. L?o From electrobass at gmx.net Fri May 2 09:53:55 2008 From: electrobass at gmx.net (micha) Date: Fri May 2 09:54:01 2008 Subject: [java-dev] Re: [max5] mxj and attributes list In-Reply-To: <2236a.481a1fa7@www.cycling74.com> Message-ID: <22404.481b3912@www.cycling74.com> thanks joshua and topher for the insights, i forgot that there is of course a bridging layer involved between the java and the max world. nevertheless it is a great pity that this hasn't been updated, esp. under the aspect what leopold just wrote, that you have to open the source code to see what functions etc. are valid. ok, so i keep waiting ;-)... ps: please (while talking about todos), add a "anti-alias 0" option to the interface - i can't find a proper font and size setting that makes economical use of the screensize and won't give me a headache after a couple of minutes of working with max... cheers micha From r.polfreman at soton.ac.uk Fri May 2 14:46:43 2008 From: r.polfreman at soton.ac.uk (Richard Polfreman) Date: Fri May 2 14:46:47 2008 Subject: [java-dev] new MaxPatcher() not working in Max 5 Message-ID: <22435.481b7db2@www.cycling74.com> Hello, I'm having some problems with an mxj object in Max 5, which is working fine in 4.6.3. Under Max 5, new patcher windows do not appear to be made correctly: public void bang() { MaxPatcher p = new MaxPatcher(50,50,200,200); p.getWindow().setVisible(true); p.getWindow().setTitle("TEST PATCH"); } Will give a window as expected under Max 4.6.3, but nothing under Max 5 - p.getWindow().isVisible() remains false, even after calling p.getWindow().setVisible(true); This is on a Powerbook G4, Mac OS X 10.4.11, Max 5.0.1. As a follow up, I tried similar code in a js object, which I believe should be: function bang() { p = new Patcher(50, 50, 200, 200); p.wind.visible = 1; p.wind.title="TEST PATCH"; post(p.wind.visible); } but this gives no window in Max 5, or Max 4.6.3 or Max 4.5.6 (and the visible setting remains false) - am I missing something in the JavaScript version? From koalaboy at gmail.com Sat May 3 11:52:14 2008 From: koalaboy at gmail.com (Michael Kearns) Date: Sat May 3 11:52:17 2008 Subject: [java-dev] Javadocs for Max 5 ? Message-ID: <224a0.481ca64d@www.cycling74.com> Hi, I've just downloaded the 5 demo, having thought about trying it for a while, and I've just discovered the mxj bit, which to me as a Java developer is great news !! However, when I look in the Max 5.0\java-doc directory (windows) there don't seem to be any javadocs for the Max API. Is this just missing from the demo, or available elsewhere ? I'd really like to experiment with this a bit. Many thanks. Michael. From mdk at relivethefuture.com Mon May 5 02:35:14 2008 From: mdk at relivethefuture.com (mdk) Date: Mon May 5 02:35:18 2008 Subject: [java-dev] Re: Javadocs for Max 5 ? In-Reply-To: <224a0.481ca64d@www.cycling74.com> Message-ID: <22565.481ec6c1@www.cycling74.com> yeah, they seem to be missing from 5. the apidocs are available in v4. http://www.cycling74.com/downloads/max4 dont know if you have to get the whole thing or if you can just grab the documentation package. From rob at cycling74.com Mon May 5 06:00:15 2008 From: rob at cycling74.com (Rob Sussman) Date: Mon May 5 06:00:19 2008 Subject: [java-dev] Re: Javadocs for Max 5 ? In-Reply-To: <22565.481ec6c1@www.cycling74.com> Message-ID: <2256f.481ef6ce@www.cycling74.com> Yes, this is just an oversight. The javadocs will be included in an upcoming release. Thanks, Rob From andrew at moceanic.com Tue May 6 08:28:49 2008 From: andrew at moceanic.com (Andrew Robertson) Date: Tue May 6 08:28:52 2008 Subject: [java-dev] Jitter in mxj Message-ID: <22611.48206b20@www.cycling74.com> Hi, I'm familiar with Max and mxj development. I'm starting to work with Jitter and have a particular problem: I've done a background removal and I want to try summing up different areas of the matrix but want that area to be user specified. What's the best/most efficient way to work with the matrices from jitter in Java? Do people access them by making a JitterMatrix object - is it a good idea to turn this into an int array[] in Java? Any code for basically taking a jitter input and making it into an array would be great. Also, advice on this - I realise that computationally it could be expensive. Thanks, Andrew From r.polfreman at soton.ac.uk Tue May 6 09:12:42 2008 From: r.polfreman at soton.ac.uk (Richard Polfreman) Date: Tue May 6 09:12:49 2008 Subject: [java-dev] Re: new MaxPatcher() not working in Max 5 In-Reply-To: <22435.481b7db2@www.cycling74.com> Message-ID: <22617.4820756a@www.cycling74.com> Further to this, I get the same behaviour with Max 5.0.1 under Windows XP Pro, SP2, Java 6 (1.6.0_03) - can anyone else confirm this? Any workarounds? It is a show-stopper for a project I am currently working on. (and the same problem with JavaScript in both Max 5 and Max 4.6) TIA, rp. From andrew at moceanic.com Tue May 6 12:12:01 2008 From: andrew at moceanic.com (Andrew Robertson) Date: Tue May 6 12:12:05 2008 Subject: [java-dev] Re: Jitter in mxj In-Reply-To: <22611.48206b20@www.cycling74.com> Message-ID: <2262a.48209f70@www.cycling74.com> Hi, As an update - here's the code. I get the dimensions 307200 (=240*320*4) for the return of copyMatrixToArray, but it doesn't seem to work right. If I try printing out a value of my new array, I always get -1. I've tried both int and float[] arrays. Any ideas? Andrew. ////////////// import com.cycling74.max.*; import com.cycling74.jitter.*; public class jitter_sub extends MaxObject { JitterMatrix output1 = new JitterMatrix(); JitterMatrix output2 = new JitterMatrix(); JitterMatrix start_output = new JitterMatrix(); private int planecount = 4; public float[] store_array = new float[307200]; private int index = 1; public jitter_sub(float gain) { declareIO(1,2); setInletAssist(0, "input (matrix)"); setOutletAssist(0, "output (matrix)"); } public void jit_matrix(String mname) { if (index == 1){ output1.frommatrix(mname); //insert processing here int[] my_dim = output2.getDim(); post("Jitter matrix dim : rows "+my_dim[0]+" cols "+my_dim[1]); //int[] copy_array = new int[my_dim[0] * my_dim[1] * planecount]; int copied_elts = output2.copyMatrixToArray(store_array); post("elements "+copied_elts+" Array copied "+store_array[100]); Atom[] my_cell = output2.getcell2d(0,0); post("My cell "+my_cell[0]+"My cell1 "+my_cell[1]+"My cell2 "+my_cell[2]+"My cell3 "+my_cell[3]); index = 2; outlet(0, "jit_matrix", output2.getName()); } else{ output2.frommatrix(mname); //insert processing here outlet(0, "jit_matrix", output1.getName()); index = 1; } } public void bang(){ start_output = output1; post("Stored matrix"); outlet(1, "jit_matrix", start_output.getName()); } } From leopold.frey at free.fr Wed May 7 02:54:03 2008 From: leopold.frey at free.fr (Léopold Frey) Date: Wed May 7 02:54:11 2008 Subject: [java-dev] Re: new MaxPatcher() not working in Max 5 In-Reply-To: <22617.4820756a@www.cycling74.com> Message-ID: <22674.48216e2b@www.cycling74.com> Quote: rp wrote on Tue, 06 May 2008 17:12 ---------------------------------------------------- > Further to this, I get the same behaviour with Max 5.0.1 under Windows XP Pro, SP2, Java 6 (1.6.0_03) - can anyone else confirm this? Any workarounds? It is a show-stopper for a project I am currently working on. Hi, confirmed on Max 5.0.1 Mac Os 10.4.11 PPC java 1.5.0_13. l?o From r.polfreman at soton.ac.uk Wed May 7 02:54:39 2008 From: r.polfreman at soton.ac.uk (Richard Polfreman) Date: Wed May 7 02:54:42 2008 Subject: [java-dev] Re: Help - Max 5 - mxj won't open! In-Reply-To: <220b8.4815e431@www.cycling74.com> Message-ID: <22675.48216e4e@www.cycling74.com> I had the same problem. Recompiling as Davide suggested fixed it on my machine (thanks for that Davide!). First you can add javac to your path on XP by: Right-clicking on My Computer and selecting properties. Then click the Advanced tab and click the Environment Variables button (bottom centre). Scroll down the second list in that screen until you see "path". Click edit and add the path to the jdk bin directory to end of the list (doesn't need to point to javac itself) - something like C:\Program Files\Java\jdk1.6.0_03\bin, depending on which version of the jdk you have, and make sure a ; separates this from the end of the previous path. You can then use Command Prompt (in Accessories) to run the command as Davide listed it: first cd into C:\Program Files\Cycling '74\Max 5.0\Cycling '74\java\lib and then enter: javac ../classes/quickie.java -cp max.jar which recompiles the quickie.java file. After this quickie started working again on my machine. HTH rp From puuukeey at comcast.net Thu May 8 09:05:59 2008 From: puuukeey at comcast.net (Matthew Aidekman) Date: Thu May 8 09:06:04 2008 Subject: [java-dev] Re: new MaxPatcher() not working in Max 5 In-Reply-To: <22435.481b7db2@www.cycling74.com> Message-ID: <2271c.482316d6@www.cycling74.com> just ran into this this morning on my maching sad sad sad sad sad. any workarounds? 10.4.11 2.4GHz Intel Core 2 Duo some ram max 5.0.1 compiled in eclipes? macbook pro From puuukeey at comcast.net Thu May 8 09:24:53 2008 From: puuukeey at comcast.net (Matthew Aidekman) Date: Thu May 8 09:24:56 2008 Subject: [java-dev] Re: new MaxPatcher() not working in Max 5 In-Reply-To: <22435.481b7db2@www.cycling74.com> Message-ID: <2271e.48231b45@www.cycling74.com> HEY DUDES MaxPatcher p = new MaxPatcher(50,50,200,200); MaxBox b11 = p.newDefault(20,20,"toggle",null); MaxBox b21 = p.newDefault(50,20,"toggle",null); MaxBox b31 = p.newDefault(80,20,"toggle",null); p.send("front", new Atom[]{}); p.getWindow().setTitle("TEST PATCH"); From r.polfreman at soton.ac.uk Thu May 8 10:07:56 2008 From: r.polfreman at soton.ac.uk (Richard Polfreman) Date: Thu May 8 10:08:01 2008 Subject: [java-dev] Re: new MaxPatcher() not working in Max 5 In-Reply-To: <22435.481b7db2@www.cycling74.com> Message-ID: <22721.4823255c@www.cycling74.com> Aha! That's great Matthew - the missing ingredient is bringing it to the front. This is also true for the javascript version, adding p.front() to the js bang function in my previous example will now make the patcher window appear in 4.6.3 and in 5.0.1. Thanks for that. rp From nat-list at studioimaginaire.com Thu May 8 13:18:25 2008 From: nat-list at studioimaginaire.com (Nathanaël Lécaudé) Date: Thu May 8 13:18:29 2008 Subject: [java-dev] Re: Announce: Python for MaxMSP (beta) In-Reply-To: Message-ID: <22737.48235201@www.cycling74.com> I have done this by mail but why not repeat myself :) Thanks a lot for this package, I have been using it a lot and it saved me a lot of time. I'm a bit surprised however when you say Python is "Basic" ? We coded full-fledged audio apps for the One Laptop Per Child project using Python and it works quite well. The one sad thing about jython is that it's currently based on an old release of python and it lacks some pretty useful things like generators. I believe the jython team is working on adapting python 2.5 though. Thanks again for this great package ! From r.polfreman at soton.ac.uk Fri May 9 05:31:41 2008 From: r.polfreman at soton.ac.uk (Richard Polfreman) Date: Fri May 9 05:31:45 2008 Subject: [java-dev] [MAX 5]newDefault args broken? Message-ID: <22776.4824361c@www.cycling74.com> Hi, newDefault() appears to fail to pass on arguments to objects in 5. Thus: MaxBox buf = p.newDefault(80,20,"buffer~", Atom.parse("fred")); works fine in Max 4, but in 5 will give an object with as the argument (i.e. buffer~ ). Workaround is to rewrite everything using newObject, e.g. MaxBox buf = p.newObject("newex",Atom.parse("80 20 100 196617 buffer~ fred")); tested on Max 5.0.1, PowerBook G4 1.3GHz, Mac OS X 10.4.11 and MacBook Pro 2.16GHz, Windows XP SP2, jdk 1.6.0_03 rp ps is the font spec (magic number 196617) documented anywhere? From r.polfreman at soton.ac.uk Fri May 9 05:42:00 2008 From: r.polfreman at soton.ac.uk (Richard Polfreman) Date: Fri May 9 05:42:04 2008 Subject: [java-dev] Re: [MAX 5]newDefault args broken? In-Reply-To: <22776.4824361c@www.cycling74.com> Message-ID: <22777.48243888@www.cycling74.com> RE the font spec - found Peter Castine's explanation in message #30323 (should have looked harder earlier...). From nick at cassiel.com Fri May 9 15:48:50 2008 From: nick at cassiel.com (Nick Rothwell) Date: Fri May 9 15:48:55 2008 Subject: [java-dev] Re: Announce: Python for MaxMSP (beta) In-Reply-To: <22737.48235201@www.cycling74.com> References: <22737.48235201@www.cycling74.com> Message-ID: <92412AD2-D297-477B-A130-59EC787E506B@cassiel.com> On 8 May 2008, at 20:18, Nathana?l L?caud? wrote: > I'm a bit surprised however when you say Python is "Basic" ? We > coded full-fledged audio apps for the One Laptop Per Child project > using Python and it works quite well. I like Python a lot, but by "basic" I meant that it's a simple language, with dynamic typechecking. (Take a look at Scala, then tell me that Python isn't simple...! Although I like Scala a lot, too, but for completely different application areas.) > The one sad thing about jython is that it's currently based on an > old release of python and it lacks some pretty useful things like > generators. I believe the jython team is working on adapting python > 2.5 though. I'm pretty sure Jython has generators; I've not really been following how closely it's tracking CPython, since both the media software systems I'm working with at the moment have embedded Jython. The fun will start with Python 3... -- N. Nick Rothwell / Cassiel.com Limited www.cassiel.com www.myspace.com/cassieldotcom www.last.fm/music/cassiel www.reverbnation.com/cassiel www.linkedin.com/in/cassiel www.loadbang.net From nat-list at studioimaginaire.com Fri May 9 16:34:14 2008 From: nat-list at studioimaginaire.com (Nathanaël Lécaudé) Date: Fri May 9 16:34:17 2008 Subject: [java-dev] Re: Re: Announce: Python for MaxMSP (beta) In-Reply-To: <92412AD2-D297-477B-A130-59EC787E506B@cassiel.com> Message-ID: <227d0.4824d166@www.cycling74.com> It supports list comprehensions in the form [x for x in range(30) if x > 10] which will return a list, but it doesn't support generators in the form (x for x in range(30) if x > 10) which return a generator object and is much faster to iterate through. The other small thing it doesn't support that I use a lot is the sorted function : mylist = [2,3,1,4,5,7,90] mysortedlist = sorted(2 * x for x in mylist) but then, that's not a big turn off, I still code much faster using python within max than using JavaScript... Nat From puuukeey at comcast.net Mon May 12 08:59:15 2008 From: puuukeey at comcast.net (Matthew Aidekman) Date: Mon May 12 08:59:19 2008 Subject: [java-dev] Re: [MAX 5]newDefault args broken? In-Reply-To: <22777.48243888@www.cycling74.com> Message-ID: <22884.48285b42@www.cycling74.com> hey rp, can you link to the right thread, I'm having the same problem but you cant search by post number on this forum From r.polfreman at soton.ac.uk Mon May 12 12:44:45 2008 From: r.polfreman at soton.ac.uk (Richard Polfreman) Date: Mon May 12 12:44:48 2008 Subject: [java-dev] Re: [MAX 5]newDefault args broken? In-Reply-To: <22884.48285b42@www.cycling74.com> Message-ID: <2289e.4828901c@www.cycling74.com> Sure, it is: http://www.cycling74.com/forums/index.php?t=msg&goto=30323&rid=6945&S=2e198e638b3995b4c4d64b16faab7b11&srch=castine+fontlist#msg_30323 rp From kawkhins at bzhtec.com Fri May 16 23:52:55 2008 From: kawkhins at bzhtec.com (Chris) Date: Fri May 16 23:53:00 2008 Subject: [java-dev] Re: [Max5] MaxPatcher.getAllBoxes() not supported anymoAny In-Reply-To: <22105.48162770@www.cycling74.com> Message-ID: <22ad9.482e72b6@www.cycling74.com> Yes, I'm also using this method, and now, it is unsupported. But, in the javadoc, nothing indicates that it is deprecated. Is it a temporarily removed feature, or it will never come back again? Best regards Chris From martinrobinson_mail at yahoo.co.uk Sun May 18 04:39:02 2008 From: martinrobinson_mail at yahoo.co.uk (Martin Robinson) Date: Sun May 18 04:39:06 2008 Subject: [java-dev] [Max5] MaxSystem.locateFile Message-ID: <22b26.48300745@www.cycling74.com> Is anyone else experiencing MaxSystem.locateFile() no longer working in Max 5? Execution seems to get no further than the call to MaxSystem.locateFile() such that a call to locateFile in a constructor causes a instantiation of the mxj instance to fail. Below is a simple example I was using to test what was happening. We don't get as far as 'post("after locatefile: "+filename);' public class testlocatefile extends MaxObject { public void read(String filename) { post("before locatefile: "+filename); String path = MaxSystem.locateFile(filename); post("after locatefile: "+filename); if(path == null) post("void string"); else if(path.length() == 0) post("empty string"); else post(path); } } -- martin robinson max/msp java c installations/performance and systems From nick at cassiel.com Sun May 18 10:19:40 2008 From: nick at cassiel.com (Nick Rothwell) Date: Sun May 18 10:19:45 2008 Subject: [java-dev] [Max5] MaxSystem.locateFile In-Reply-To: <22b26.48300745@www.cycling74.com> References: <22b26.48300745@www.cycling74.com> Message-ID: Hi Martin, > Is anyone else experiencing MaxSystem.locateFile() no longer working > in Max 5? All seems fine here ... the Groovy and Python libraries use it, as does the Hypersonic SQL package. No sign of any problems so far. -- N. Nick Rothwell / Cassiel.com Limited www.cassiel.com www.myspace.com/cassieldotcom www.last.fm/music/cassiel www.reverbnation.com/cassiel www.linkedin.com/in/cassiel www.loadbang.net From martinrobinson_mail at yahoo.co.uk Sun May 18 11:55:35 2008 From: martinrobinson_mail at yahoo.co.uk (Martin Robinson) Date: Sun May 18 11:55:38 2008 Subject: [java-dev] Re: [Max5] MaxSystem.locateFile In-Reply-To: Message-ID: <22b47.48306d96@www.cycling74.com> Thanks Nick, ... shall investigate further. I thought it might have been using the wrong max.jar in the build path in Eclipse but I have changed it over to the max.jar in the Max5 C74 directory. Can't think what else it would be. -- martin robinson max/msp java c installations/performance and systems From nick at cassiel.com Sun May 18 12:33:39 2008 From: nick at cassiel.com (Nick Rothwell) Date: Sun May 18 12:33:45 2008 Subject: [java-dev] Re: [Max5] MaxSystem.locateFile In-Reply-To: <22b47.48306d96@www.cycling74.com> References: <22b47.48306d96@www.cycling74.com> Message-ID: On 18 May 2008, at 18:55, Martin Robinson wrote: > I thought it might have been using the wrong max.jar in the build > path in Eclipse but I have changed it over to the max.jar in the > Max5 C74 directory. I think I'm compiling against max.jar from 4.6.3 (I have it in CVS) but run against max.jar in 5.0.2. In any case, I'm not aware of any significant changes to the MXJ machinery in Max5. -- N. Nick Rothwell / Cassiel.com Limited www.cassiel.com www.myspace.com/cassieldotcom www.last.fm/music/cassiel www.reverbnation.com/cassiel www.linkedin.com/in/cassiel www.loadbang.net From martinrobinson_mail at yahoo.co.uk Sun May 18 13:03:01 2008 From: martinrobinson_mail at yahoo.co.uk (Martin Robinson) Date: Sun May 18 13:03:06 2008 Subject: [java-dev] Re: Re: [Max5] MaxSystem.locateFile In-Reply-To: Message-ID: <22b50.48307d65@www.cycling74.com> Hmm, I removed my file prefence paths so I'm running a 'clean' install. I can't even use mxj quickie since (as I suspect) its constructor calls MaxSystem.locateFile. I get the error: (mxj) unable to construct instance of quickie Which is the same error I get when using locateFile in the constructor of another class. Not sure if this is related to: http://www.cycling74.com/forums/index.php?t=msg&goto=138547&rid=3645&S=2dbe44130cd6e1a3ed9f6ccd220b9006&srch=quickie#msg_138547 But it's more tricky to get jdk versions confused on the Mac, no? -- martin robinson max/msp java c installations/performance and systems From nick at cassiel.com Sun May 18 15:03:47 2008 From: nick at cassiel.com (Nick Rothwell) Date: Sun May 18 15:03:54 2008 Subject: [java-dev] Re: Re: [Max5] MaxSystem.locateFile In-Reply-To: <22b50.48307d65@www.cycling74.com> References: <22b50.48307d65@www.cycling74.com> Message-ID: <2DE63D20-0B4C-4879-92C5-4B3D5E8FAD4D@cassiel.com> On 18 May 2008, at 20:03, Martin Robinson wrote: > I removed my file prefence paths so I'm running a 'clean' install. I'm not sure what you mean by "file preference paths" - you know, of course, that the Java classpath is assembled from the max.java.config.txt config file, not from the Max app's file preferences. And it is, of course, a Java classpath, so there is scope for JAR files containing broken stuff. > But it's more tricky to get jdk versions confused on the Mac, no? The Mac can host multiple JDKs (I appear to have four of them here) but I've never come across any situation where things have got confused. -- N. Nick Rothwell / Cassiel.com Limited www.cassiel.com www.myspace.com/cassieldotcom www.last.fm/music/cassiel www.reverbnation.com/cassiel www.linkedin.com/in/cassiel www.loadbang.net From martinrobinson_mail at yahoo.co.uk Sun May 18 16:02:02 2008 From: martinrobinson_mail at yahoo.co.uk (Martin Robinson) Date: Sun May 18 16:02:04 2008 Subject: [java-dev] Re: Re: Re: [Max5] MaxSystem.locateFile In-Reply-To: <2DE63D20-0B4C-4879-92C5-4B3D5E8FAD4D@cassiel.com> Message-ID: <22b67.4830a75a@www.cycling74.com> > I'm not sure what you mean by "file preference paths" - you know, of > course, that the Java classpath is assembled from the > max.java.config.txt config file, not from the Max app's file > preferences. And it is, of course, a Java classpath, so there is scope > for JAR files containing broken stuff. Yes, what I mean is I usually keep a max.java.config.txt file somewhere in my home directory which is in the Max search path. The max.java.config.txt then contains the reference to a project in my Eclipse workspace for MXJ dev. > The Mac can host multiple JDKs (I appear to have four of them here) > but I've never come across any situation where things have got confused. I was referring to the Mac being more closely tied to jdk versions than Windows. I'm still on 10.4 using jdk 1.5.0. Not sure when we're moving to Leopard here. -- martin robinson max/msp java c installations/performance and systems From nick at cassiel.com Mon May 19 02:22:15 2008 From: nick at cassiel.com (Nick Rothwell) Date: Mon May 19 02:22:16 2008 Subject: [java-dev] Re: Re: Re: [Max5] MaxSystem.locateFile In-Reply-To: <22b67.4830a75a@www.cycling74.com> References: <22b67.4830a75a@www.cycling74.com> Message-ID: <0D205349-500D-4753-9707-75EA0096DBAD@cassiel.com> > Yes, what I mean is I usually keep a max.java.config.txt file > somewhere in my home directory which is in the Max search path. The > max.java.config.txt then contains the reference to a project in my > Eclipse workspace for MXJ dev. As an aside... I'm trying to remember whether there's a "locatefile" message one can send to Max without resorting to an API. If so, it's probably worth checking whether this works properly. There may also be a call from JavaScript - it's a while since I looked. Or you could install my Python or Groovy stuff and try the call from there - this is still a call into Java via MXJ but it takes any local Eclipse machinery out of the picture. But that's possibly just making the debugging process more complicated. > I was referring to the Mac being more closely tied to jdk versions > than Windows. I'm still on 10.4 using jdk 1.5.0. Not sure when > we're moving to Leopard here. One thought would be that the JNI machinery is broken somehow, but if you have any MXJ stuff running at all then it must be reasonably sound... -- N. nick rothwell -- composition, systems, performance -- http:// www.cassiel.com From martinrobinson_mail at yahoo.co.uk Mon May 19 10:54:51 2008 From: martinrobinson_mail at yahoo.co.uk (Martin Robinson) Date: Mon May 19 10:54:58 2008 Subject: [java-dev] Re: Re: Re: Re: [Max5] MaxSystem.locateFile In-Reply-To: <0D205349-500D-4753-9707-75EA0096DBAD@cassiel.com> Message-ID: <22bcb.4831b0da@www.cycling74.com> > As an aside... I'm trying to remember whether there's a "locatefile" > message one can send to Max without resorting to an API. If so, it's > probably worth checking whether this works properly. There may also > be a call from JavaScript - it's a while since I looked. The File object in js gets the path OK with something like this: function test(v) { f = new File(v); post(f.foldername+" "); } And the absolutepath object also works fine. I assume both of these must use the same underlying API that the mxj object via JNI is using? > Or you could install my Python or Groovy stuff and try the call from > there - this is still a call into Java via MXJ but it takes any local > Eclipse machinery out of the picture. But that's possibly just making > the debugging process more complicated. I installed your jython stuff and I get a whole bunch of "unable to construct instance" errors I mentioned earlier in the thread. Presumably this is one for each of the instances in the example. I didn't try to find ScriptingEngineBase to see if there's a locateFile() call in there but at least this shows as you say it is not (apprently) my Eclipse environment but the JVM perhaps. I have a couple more things to try... -- martin robinson max/msp java c installations/performance and systems From martinrobinson_mail at yahoo.co.uk Mon May 19 11:42:02 2008 From: martinrobinson_mail at yahoo.co.uk (Martin Robinson) Date: Mon May 19 11:42:08 2008 Subject: [java-dev] Re: Re: Re: Re: [Max5] MaxSystem.locateFile In-Reply-To: <22bcb.4831b0da@www.cycling74.com> Message-ID: <22bd7.4831bbea@www.cycling74.com> OK it was really dumb. Thanks for helping me think this through aloud... At some point (can't think why now) I'd put a copy of max.jar in /Library/Java/Extensions along with a whole load of other jars and I failed to spot it when checking for duplicate max.jars Oops -- martin robinson max/msp java c installations/performance and systems From nick at cassiel.com Mon May 19 15:40:42 2008 From: nick at cassiel.com (Nick Rothwell) Date: Mon May 19 15:40:47 2008 Subject: [java-dev] Re: Re: Re: Re: [Max5] MaxSystem.locateFile In-Reply-To: <22bd7.4831bbea@www.cycling74.com> References: <22bd7.4831bbea@www.cycling74.com> Message-ID: On 19 May 2008, at 18:42, Martin Robinson wrote: > At some point (can't think why now) I'd put a copy of max.jar in / > Library/Java/Extensions along with a whole load of other jars As Danny repeatedly says in CSI:NY : "Boom!" -- N. Nick Rothwell / Cassiel.com Limited www.cassiel.com www.myspace.com/cassieldotcom www.last.fm/music/cassiel www.reverbnation.com/cassiel www.linkedin.com/in/cassiel www.loadbang.net From wittlist at googlemail.com Wed May 21 09:31:09 2008 From: wittlist at googlemail.com (wittlist) Date: Wed May 21 09:31:16 2008 Subject: [java-dev] Re: net.udp.recv and OSC In-Reply-To: Message-ID: <22cd5.4834403d@www.cycling74.com> hi, Is there anymore information around the compatibility problems between net.udp.send and OSC. There seams to be problems using any of the mxj networking objects with OSC. From membranplastik at hotmail.com Fri May 23 03:40:03 2008 From: membranplastik at hotmail.com (tony) Date: Fri May 23 03:40:07 2008 Subject: [java-dev] Iam newbe use Netbean 6.0.1-ml-javase? Message-ID: <22daa.483690f2@www.cycling74.com> Dear All friends Ia, newbe and interest to use mxj object. please give Me Advice About all information about using java compiler. Iam try to using Netbean 6.0.1-ml-javase builder thanks alots -- Tony maryana From jmail at nospaces.net Wed May 28 05:39:36 2008 From: jmail at nospaces.net (Jonny) Date: Wed May 28 05:39:43 2008 Subject: [java-dev] Max5 mxj crash (possible to do with say_deferred() / error()?) Message-ID: <22fd7.483d4477@www.cycling74.com> Hi all I have an intermittent crash happening on a huge involved patch with several mxj objects doing all sorts of stuff (and deadline racing towards me - hence the plea for help) A typical crash-log is attached - the key bit i think, is the say_deferred call which then calls error, so i suspect it's where my Java calls error() to "post" an error to the Max window. I have tried to split out smaller parts of the thing and test to destruction but without joy. Initially i suspected it might be the size of the message but i can post() and error() messages up to about 12MB (then the Java heap gets full and i get a polite exception message). It handles null strings happily and seems ok with foreign chars (much of this project is in Norwegian). So, just posting here on the off chance someone might know something about this say_deferred, error, object_error, vsnprintf_zero route inside Max5? TIA jonny P.S. I'm pretty sure this didn't ever happen in Max 4.6, but now it would be almost impossible to go back and check. From the_fox66 at hotmail.com Wed May 28 14:46:46 2008 From: the_fox66 at hotmail.com (Eric Foxall) Date: Wed May 28 14:46:51 2008 Subject: [java-dev] setting environment variables in MAX Message-ID: <23026.483dc4b6@www.cycling74.com> Hello, I have a jar file, which runs fine in a shell, that I want to use in MAX. Running the jar from an MXJ object, certain environment variables are not properly set. Is there a way for MAX to set these? I was thinking maybe there is a max.jvm.option you could put in the max.java.config.text that will set the desired values. Other possibilities are welcome. thanks, -eric From thomas.pachoud at gmail.com Thu May 29 09:20:47 2008 From: thomas.pachoud at gmail.com (@pach) Date: Thu May 29 09:20:54 2008 Subject: [java-dev] FileNotFoundException Message-ID: <23066.483ec9ce@www.cycling74.com> Hi, I'm new to max. I'm trying to make a mxj object to read a txt file, but I didn't arrive to open the file. got this error : java.io.FileNotFoundException: ./enregitrements/benoit_25-05_perf.txt (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:106) at java.io.FileInputStream.(FileInputStream.java:66) at Replayer.read(Replayer.java:27) com.cycling74.max.MaxRuntimeException at Replayer.read(Replayer.java:30) here is my source code (yes, I know, it's not really clean code ^^) : import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import com.cycling74.max.*; public class Replayer extends MaxObject { private int currentTime = 0 ; private FileInputStream f = null ; private int timestamp = 0 ; private Atom[] currentWords = null ; public Replayer (){ super(); declareIO(1,2); String rien = "" ; int[] rienNonPlus = {0, 0} ; currentWords = Atom.newAtom(rien, Atom.newAtom(rienNonPlus)); } public void read (String filename){ System.out.println (filename); try { f = new FileInputStream (filename); } catch (FileNotFoundException e) { e.printStackTrace(); throw new MaxRuntimeException () ; } } private void readLine (){ String word = ""; char caract ; Atom[] ret = null ; // recupere timestamp try{ caract = (char) f.read(); while (caract != ' '){ word += caract ; caract = (char) f.read(); } timestamp = Integer.parseInt(word); word = ""; // recupere adresse et arguments caract = (char) f.read(); while (caract != ' '){ word += caract ; caract = (char) f.read(); } currentWords = Atom.parse(word); } catch (IOException e){ e.printStackTrace(); outlet(1, "bang"); throw new MaxRuntimeException(); } } // lit et renvoi l'ensemble des lignes pour un temps donn?e private void readLineB4Time(int time){ while (time>timestamp){ outlet (0, currentWords); readLine(); } } public void inlet (int time){ readLineB4Time (time); } } and I tried to load the file like this : (message : read filename) ----------begin_max5_patcher---------- 488.3ocsU0zbaBCD8L7qPildzwAIK7G4V9Kzqoc7HCqsUFPhQRdJtYx+8hj. GJlT65VeQL7zxtqd58VdKNBuQUCFL5IzKnnn2hih7PNfn12ivk75rBtwGFNS UVBRKdRXOKTa834ZUE5n5fFM0VaQeStUT.n8fF5BsPHgL0AoOdZKXkFLMoia EJ45KFgCmzhuUIsFwOAOFcZRKr7PoPV.VS+Xa.UGrcnIiUaMjYC7v7jljgVN yul5Vmwllf9d6WIx8mW0lWefwv8ZFIuz2L3m0BdQ2NUba1dgbWuBvV3ZWDIk LrDtO483X2xjq79nDLF9N3r6CMvyQegf+KXK5nrE47ycJ4xm6PFrGqfvgFiO wfiRIycr.c1R2i.wPVdiThSJ5Te3KnftBoB8OKUXLWixBRE+k5hkehTg94Dy j9jiaiVC4UPXD1pg09FHLI7ild7LITY8qnuBUE7ifF+O65lcNoPRtEczjgT1 Xzy7UAW0BO830Szj6gEa5ifTC6DVM3lKZdbCHUB6ZZ5CIoqq.8V27v6hMb0+ aWXZv3QYIgGiaC8YvOMevON7Yzg+6boo4mBYc0ua7A5CWRNXrB4I24KenM5E zdQdNH6O8tTjWoDR6Iyxn2rWaO47mWrmFz326dZ08llZd483eU6NhyK -----------end_max5_patcher----------- any Idea? thanks, Thomas. From topher at topher.com Thu May 29 09:40:21 2008 From: topher at topher.com (topher lafata) Date: Thu May 29 09:40:24 2008 Subject: [java-dev] FileNotFoundException In-Reply-To: <23066.483ec9ce@www.cycling74.com> References: <23066.483ec9ce@www.cycling74.com> Message-ID: if you give an absolute path it should get you to the next step. otherwise look into MaxSystem.locateFile() t On May 29, 2008, at 08:20 AM, @pach wrote: > > Hi, I'm new to max. I'm trying to make a mxj object to read a txt > file, but I didn't arrive to open the file. > got this error : > java.io.FileNotFoundException: ./enregitrements/ > benoit_25-05_perf.txt (No such file or directory) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:106) > at java.io.FileInputStream.(FileInputStream.java:66) > at Replayer.read(Replayer.java:27) > com.cycling74.max.MaxRuntimeException > at Replayer.read(Replayer.java:30) > > here is my source code (yes, I know, it's not really clean code ^^) : > > import java.io.FileInputStream; > import java.io.FileNotFoundException; > import java.io.FileReader; > import java.io.IOException; > > import com.cycling74.max.*; > > > public class Replayer extends MaxObject { > > private int currentTime = 0 ; > private FileInputStream f = null ; > private int timestamp = 0 ; > private Atom[] currentWords = null ; > > public Replayer (){ > super(); > declareIO(1,2); > String rien = "" ; > int[] rienNonPlus = {0, 0} ; > currentWords = Atom.newAtom(rien, Atom.newAtom(rienNonPlus)); > } > > public void read (String filename){ > System.out.println (filename); > try { > f = new FileInputStream (filename); > } catch (FileNotFoundException e) { > e.printStackTrace(); > throw new MaxRuntimeException () ; > } > } > > > private void readLine (){ > String word = ""; > char caract ; > Atom[] ret = null ; > // recupere timestamp > try{ > caract = (char) f.read(); > while (caract != ' '){ > word += caract ; > caract = (char) f.read(); > } > timestamp = Integer.parseInt(word); > word = ""; > > // recupere adresse et arguments > caract = (char) f.read(); > while (caract != ' > '){ > word += caract ; > caract = (char) f.read(); > } > currentWords = Atom.parse(word); > } > catch (IOException e){ > e.printStackTrace(); > outlet(1, "bang"); > throw new MaxRuntimeException(); > } > } > > // lit et renvoi l'ensemble des lignes pour un temps donn?e > private void readLineB4Time(int time){ > while (time>timestamp){ > outlet (0, currentWords); > readLine(); > } > } > > public void inlet (int time){ > readLineB4Time (time); > } > } > > and I tried to load the file like this : > (message : read filename) > > ----------begin_max5_patcher---------- > 488.3ocsU0zbaBCD8L7qPildzwAIK7G4V9Kzqoc7HCqsUFPhQRdJtYx+8hj. > GJlT65VeQL7zxtqd58VdKNBuQUCFL5IzKnnn2hih7PNfn12ivk75rBtwGFNS > UVBRKdRXOKTa834ZUE5n5fFM0VaQeStUT.n8fF5BsPHgL0AoOdZKXkFLMoia > EJ45KFgCmzhuUIsFwOAOFcZRKr7PoPV.VS+Xa.UGrcnIiUaMjYC7v7jljgVN > yul5Vmwllf9d6WIx8mW0lWefwv8ZFIuz2L3m0BdQ2NUba1dgbWuBvV3ZWDIk > LrDtO483X2xjq79nDLF9N3r6CMvyQegf+KXK5nrE47ycJ4xm6PFrGqfvgFiO > wfiRIycr.c1R2i.wPVdiThSJ5Te3KnftBoB8OKUXLWixBRE+k5hkehTg94Dy > j9jiaiVC4UPXD1pg09FHLI7ild7LITY8qnuBUE7ifF+O65lcNoPRtEczjgT1 > Xzy7UAW0BO830Szj6gEa5ifTC6DVM3lKZdbCHUB6ZZ5CIoqq.8V27v6hMb0+ > aWXZv3QYIgGiaC8YvOMevON7Yzg+6boo4mBYc0ua7A5CWRNXrB4I24KenM5E > zdQdNH6O8tTjWoDR6Iyxn2rWaO47mWrmFz326dZ08llZd483eU6NhyK > -----------end_max5_patcher----------- > > any Idea? > thanks, > Thomas. > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev From ollie at icarus.nu Thu May 29 09:40:15 2008 From: ollie at icarus.nu (Oliver Bown) Date: Thu May 29 09:40:29 2008 Subject: [java-dev] FileNotFoundException In-Reply-To: <23066.483ec9ce@www.cycling74.com> References: <23066.483ec9ce@www.cycling74.com> Message-ID: <535B7628-5C35-4353-95B8-A8C9535E1D11@icarus.nu> I can't view your patcher, but first thing would be to confirm that the file does indeed exist. Another test would be to try sending FileInputStream an absolute path rather than a relative one (i.e., starting with "/" rather than with "./"). You might be able to use the max object [absolutepath] to sort that out, almost, and you might find [conformpath] useful too, but to start with, just type the full path of the file and see if it works. Also, in the Max Java API you can do some extra work using static methods from MaxSystem, such as locateFile(), maxPathToNativePath() and nameConform(), which is probably preferable in general. I can't remember what the current directory is for mxj, but it's probably the max folder. O On 29 May 2008, at 16:20, @pach wrote: > > Hi, I'm new to max. I'm trying to make a mxj object to read a txt > file, but I didn't arrive to open the file. > got this error : > java.io.FileNotFoundException: ./enregitrements/ > benoit_25-05_perf.txt (No such file or directory) > at java.io.FileInputStream.open(Native Method) > at java.io.FileInputStream.(FileInputStream.java:106) > at java.io.FileInputStream.(FileInputStream.java:66) > at Replayer.read(Replayer.java:27) > com.cycling74.max.MaxRuntimeException > at Replayer.read(Replayer.java:30) > > here is my source code (yes, I know, it's not really clean code ^^) : > > import java.io.FileInputStream; > import java.io.FileNotFoundException; > import java.io.FileReader; > import java.io.IOException; > > import com.cycling74.max.*; > > > public class Replayer extends MaxObject { > > private int currentTime = 0 ; > private FileInputStream f = null ; > private int timestamp = 0 ; > private Atom[] currentWords = null ; > > public Replayer (){ > super(); > declareIO(1,2); > String rien = "" ; > int[] rienNonPlus = {0, 0} ; > currentWords = Atom.newAtom(rien, Atom.newAtom(rienNonPlus)); > } > > public void read (String filename){ > System.out.println (filename); > try { > f = new FileInputStream (filename); > } catch (FileNotFoundException e) { > e.printStackTrace(); > throw new MaxRuntimeException () ; > } > } > > > private void readLine (){ > String word = ""; > char caract ; > Atom[] ret = null ; > // recupere timestamp > try{ > caract = (char) f.read(); > while (caract != ' '){ > word += caract ; > caract = (char) f.read(); > } > timestamp = Integer.parseInt(word); > word = ""; > > // recupere adresse et arguments > caract = (char) f.read(); > while (caract != ' > '){ > word += caract ; > caract = (char) f.read(); > } > currentWords = Atom.parse(word); > } > catch (IOException e){ > e.printStackTrace(); > outlet(1, "bang"); > throw new MaxRuntimeException(); > } > } > > // lit et renvoi l'ensemble des lignes pour un temps donn?e > private void readLineB4Time(int time){ > while (time>timestamp){ > outlet (0, currentWords); > readLine(); > } > } > > public void inlet (int time){ > readLineB4Time (time); > } > } > > and I tried to load the file like this : > (message : read filename) > > ----------begin_max5_patcher---------- > 488.3ocsU0zbaBCD8L7qPildzwAIK7G4V9Kzqoc7HCqsUFPhQRdJtYx+8hj. > GJlT65VeQL7zxtqd58VdKNBuQUCFL5IzKnnn2hih7PNfn12ivk75rBtwGFNS > UVBRKdRXOKTa834ZUE5n5fFM0VaQeStUT.n8fF5BsPHgL0AoOdZKXkFLMoia > EJ45KFgCmzhuUIsFwOAOFcZRKr7PoPV.VS+Xa.UGrcnIiUaMjYC7v7jljgVN > yul5Vmwllf9d6WIx8mW0lWefwv8ZFIuz2L3m0BdQ2NUba1dgbWuBvV3ZWDIk > LrDtO483X2xjq79nDLF9N3r6CMvyQegf+KXK5nrE47ycJ4xm6PFrGqfvgFiO > wfiRIycr.c1R2i.wPVdiThSJ5Te3KnftBoB8OKUXLWixBRE+k5hkehTg94Dy > j9jiaiVC4UPXD1pg09FHLI7ild7LITY8qnuBUE7ifF+O65lcNoPRtEczjgT1 > Xzy7UAW0BO830Szj6gEa5ifTC6DVM3lKZdbCHUB6ZZ5CIoqq.8V27v6hMb0+ > aWXZv3QYIgGiaC8YvOMevON7Yzg+6boo4mBYc0ua7A5CWRNXrB4I24KenM5E > zdQdNH6O8tTjWoDR6Iyxn2rWaO47mWrmFz326dZ08llZd483eU6NhyK > -----------end_max5_patcher----------- > > any Idea? > thanks, > Thomas. > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev From adamjmurray at gmail.com Thu May 29 10:11:11 2008 From: adamjmurray at gmail.com (Adam Murray) Date: Thu May 29 10:11:17 2008 Subject: [java-dev] Re: FileNotFoundException In-Reply-To: <23066.483ec9ce@www.cycling74.com> Message-ID: <23071.483ed59f@www.cycling74.com> I normally need to use MaxSystem.locateFile() to find a file from inside an mxj object. The absolute path to the file should work too. Your error indicates it's trying to use a relative path: FileNotFoundException: ./enregitrements/benoit_25-05_perf.txt I think you'll need to figure out how to get an absolute path and/or use MaxSystem.locateFile() -- Adam Murray compusition.com From thomas.pachoud at gmail.com Thu May 29 10:23:09 2008 From: thomas.pachoud at gmail.com (@pach) Date: Thu May 29 10:23:14 2008 Subject: [java-dev] Re: FileNotFoundException In-Reply-To: Message-ID: <23073.483ed86d@www.cycling74.com> I had also tried with an absolute path (OsX:/Documents.../xx.txt and file://OsX:/Documents...) but I always had the same error. But it works correctly with MaxSystem.locateFile() function. Thanks a lot, Thomas. From adamjmurray at gmail.com Thu May 29 10:37:15 2008 From: adamjmurray at gmail.com (Adam Murray) Date: Thu May 29 10:37:21 2008 Subject: [java-dev] Re: FileNotFoundException In-Reply-To: <23073.483ed86d@www.cycling74.com> Message-ID: <23076.483edbba@www.cycling74.com> Quote: thomas.pachoud@gmail.com wrote on Thu, 29 May 2008 09:23 ---------------------------------------------------- > I had also tried with an absolute path (OsX:/Documents.../xx.txt and file://OsX:/Documents...) but I always had the same error. I remember having some issues like this. I think the Max objects that output paths (like dropfile) don't output in a format understood by Java. Like the OsX: prefix might be confusing Java. So that's what the MaxSystem methods are for. -- Adam Murray compusition.com From topher at topher.com Thu May 29 17:47:09 2008 From: topher at topher.com (topher lafata) Date: Thu May 29 17:47:28 2008 Subject: [java-dev] Re: FileNotFoundException In-Reply-To: <23076.483edbba@www.cycling74.com> References: <23076.483edbba@www.cycling74.com> Message-ID: <483F407D.9010508@topher.com> that is indeed the case. Java expects java paths OsX:etc.. is not a java path. t Adam Murray wrote: > Quote: thomas.pachoud@gmail.com wrote on Thu, 29 May 2008 09:23 > ---------------------------------------------------- > >> I had also tried with an absolute path (OsX:/Documents.../xx.txt and file://OsX:/Documents...) but I always had the same error. >> > > I remember having some issues like this. I think the Max objects that output paths (like dropfile) don't output in a format understood by Java. Like the OsX: prefix might be confusing Java. > > So that's what the MaxSystem methods are for. > > > -- > Adam Murray > compusition.com > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev > > From adamjmurray at gmail.com Fri May 30 11:30:53 2008 From: adamjmurray at gmail.com (Adam Murray) Date: Fri May 30 11:30:59 2008 Subject: [java-dev] Re: setting environment variables in MAX In-Reply-To: <23026.483dc4b6@www.cycling74.com> Message-ID: <230ed.484039c9@www.cycling74.com> I believe environment variables are read-only in Java. They have to be set in the environment before you run a Java process. I'm not aware of a way to do this in Max. If your Java program is running another process, then I think you can change them for that process. But not for the current process. More info at http://java.sun.com/docs/books/tutorial/essential/environment/env.html Usually the standard way to pass environment variable-like settings to Java is to use system properties. These are changeable inside Java, and could also be set with the -Dname=value option in the max.java.config file. So are you sure you really need environment variables, or would system properties work? If it has to be environment variables, and you are on OS X, I maybe you could use the environment.plist file? http://developer.apple.com/documentation/MacOSX/Conceptual/OSX_Technology_Overview/CommandLine/chapter_950_section_4.html -- Adam Murray compusition.com From roald.baudoux at brutele.be Fri May 30 14:22:29 2008 From: roald.baudoux at brutele.be (Roald Baudoux) Date: Fri May 30 14:22:36 2008 Subject: [java-dev] OS X javac question Message-ID: <230fe.48406202@www.cycling74.com> Hello, This is my first attempt to compile a java file (NeuralNet from Daniel Iglesia). However I am not sure about the javac syntax, especially for paths: I use this command: javac -classpath "/Applications/Max5/Cycling\ \'74/java/lib:/Library/Java/Extensions" -g -sourcepath "/Users/roaldbaudoux/Desktop/iglesia-net" -verbose NeuralNet.java Terminal returns this message: error: cannot read: NeuralNet.java [total 89ms] 1 error What's wrong? Roald Baudoux From ollie at icarus.nu Fri May 30 17:49:16 2008 From: ollie at icarus.nu (Oliver Bown) Date: Fri May 30 17:49:22 2008 Subject: [java-dev] OS X javac question In-Reply-To: <230fe.48406202@www.cycling74.com> References: <230fe.48406202@www.cycling74.com> Message-ID: <10202D4C-14F6-4CF1-8308-0751D7CAB31D@icarus.nu> I think you're assuming that by using the -sourcepath variable, javac will look in your sourcepath for NN.java. If you specify where NN.java is by giving its absolute or relative path then you should be OK. The sourcepath argument is to specify additional sourcefiles, but you still have to specify a main one. If you only have one sourcefile then the sourcepath variable is redundant. It takes a little while to get used to the idea of how packages are organised in Java. The examples at the very end of the javac man page are quite useful. O On 30 May 2008, at 21:22, Roald Baudoux wrote: > > Hello, > > This is my first attempt to compile a java file (NeuralNet from > Daniel Iglesia). > > However I am not sure about the javac syntax, especially for paths: > > I use this command: > javac -classpath "/Applications/Max5/Cycling\ \'74/java/lib:/ > Library/Java/Extensions" -g -sourcepath "/Users/roaldbaudoux/ > Desktop/iglesia-net" -verbose NeuralNet.java > > Terminal returns this message: > error: cannot read: NeuralNet.java > [total 89ms] > 1 error > > What's wrong? > > Roald Baudoux > > _______________________________________________ > java-dev mailing list > java-dev@cycling74.com > http://www.cycling74.com/mailman/listinfo/java-dev