[Jprogramming] Executable J Files
Björn Helgason
gosinn at gmail.com
Thu Nov 3 06:36:25 HKT 2011
a=. 0 ; 0
echo on
title Running J in bat
pushd
setlocal
rem test if J is available
if not exist c:\j701\bin\jconsole.exe goto Exception01
rem test if the script is there
if not exist c:/j701/bin/testscript.txt goto Exception02
set jexe=c:\j701\bin\jconsole -js
set jscr="0!:0<'c:/j701/bin/testscript.txt'"
rem run J process and exit
%jexe% %jscr% "testout 0" "exit 54)"
ECHO error level is %ERRORLEVEL%
if ERRORLEVEL 4 goto Exception04
if ERRORLEVEL 3 goto Exception03
title J complete!
goto TheEnd
:Exception01
echo ERROR: jconsole.exe not found
title J not there!
goto TheEnd
:Exception02
echo ERROR: script not found
title script not there
goto TheEnd
:Exception03
echo DONE result three
notepad out.txt
title result is three
goto TheEnd
:Exception04
echo DONE result four
notepad out2.txt
title reult is four
goto TheEnd
:TheEnd
endlocal
popd
)
a fwrite 'jtest.bat'
then you run jtest
Þann 2. nóvember 2011 22:14, skrifaði David Vaughan <
purpleblues13 at googlemail.com>:
> So how would I go about doing it? (Mac and Windows).
>
> ___________________________
>
> David Vaughan
>
> On 29 Oct 2011, at 11:53, Björn Helgason <gosinn at gmail.com> wrote:
>
> > It depends on the os
> >
> > In linux you can make a file executable
> >
> > In windows you can create a bat file
> >
> >
> >
> > 2011/10/29 David Vaughan <purpleblues13 at googlemail.com>
> >
> >> How can an executable be made from J, assuming it is possible?
> >>
> >> ___________________________
> >>
> >> David Vaughan
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >
> >
> >
> > --
> > Björn Helgason, Verkfræðingur
> > Fornustekkum II
> > 781 Hornafirði,
> > t-póst: gosinn at gmail.com
> > gsm: +3546985532
> > twitter: @flugfiskur
> > http://groups.google.com/group/J-Programming
> >
> >
> > Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
> >
> > góður kennari getur stigið á tær án þess að glansinn fari af skónum
> > /|_ .-----------------------------------.
> > ,' .\ / | Með léttri lund verður |
> > ,--' _,' | Dagurinn í dag |
> > / / | Enn betri en gærdagurinn |
> > ( -. | `-----------------------------------'
> > | ) | (\_ _/)
> > (`-. '--.) (='.'=) ♖♘♗♕♔♙
> > `. )----' (")_(") ☃☠
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
--
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði,
t-póst: gosinn at gmail.com
gsm: +3546985532
twitter: @flugfiskur
http://groups.google.com/group/J-Programming
Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans
góður kennari getur stigið á tær án þess að glansinn fari af skónum
/|_ .-----------------------------------.
,' .\ / | Með léttri lund verður |
,--' _,' | Dagurinn í dag |
/ / | Enn betri en gærdagurinn |
( -. | `-----------------------------------'
| ) | (\_ _/)
(`-. '--.) (='.'=) ♖♘♗♕♔♙
`. )----' (")_(") ☃☠
More information about the Programming
mailing list