[TxMt] Re: Java Bundle - Problem with executor + question about args

Hans-Jörg Bibiko bibiko at eva.mpg.de
Tue Sep 2 07:26:05 UTC 2008


On 30.08.2008, at 05:25, Luke Daley wrote:
> On 29/08/2008, at 5:09 PM, Hans-Jörg Bibiko wrote:
>> If I compile and run it on a console, no problem.
>> If I use the Java bundle's "Compile & Run" I get this:
>
> Was a bug in executor, update support and it should work.
Thanks! Now it works like charm.


>> The new bundle has a nice feature. "Compile & Run (with args)"
>> I couldn't try out it yet but if I have a folder containing my Java
>> script and aFile, and I want to do something with that aFile. Is it
>> possible to enter only the filename aFile as argument without the
>> absolute path. In other words, does run the script in that folder?
>
> TM sets the working directory to that of the current file when
> executing commands, so this should work for you. I think this also
> means that you could create a .classpath file in the same dir as your
> script if you need to bring in extra jars.
Hmm, id doesn't work for me. I always have to enter the absolute path.
I looked at the source code and the tricky point is in
java_compile_and_run.sh line 13
This line changes the directory to /tmp/tm_javamate. executor will be  
invoked after this thus executor will set the working dir to /tmp/ 
tm_javamate.

I do not have an ad hoc solution, but maybe one could detect if the  
Java script doc is untitled go head with /tmp/tm_javamate; if not uses  
TM_FILEPATH as working directory.

Cheers,

--Hans




More information about the textmate mailing list