[SOLVED] Compiling projections after creating
[SOLVED]
added
to redirect the output to the stdout. Somehow the javac has wierd behavior with the output on errors and verbose information.
Hi,
i want the JAVA-Projections and wrappers to compile after Caché created the files. The creation of the files works 100%.
My addition to createProjection in our Projectionclass is following:
w !,"...compile:"
w !,"DEVICE : "_$g(%qdev)
w !,"$IO : "_$IO
#dim cPathTranslated = $tr(classname,".","/")
#dim cClassnamePath = $p(cPathTranslated,"/",1,$l(cPathTranslated,"/")-1)_"/"
#dim cClassname = $p(cPathTranslated,"/",$l(cPathTranslated,"/"))
//w !,"Classname=" _ cClassname
//w !,"Path= "_cClassnamePath
w !,"-----JAVA Kompiler Aufruf-----"
w !,"javac /pum/pmssys/system7/java/cache/wrappers/"_cClassnamePath_"Execute"_cClassname_"* -d /pum/online/system7/JSP/WEB-INF/classes/.",!
w !,"javac /pum/pmssys/system7/java/cache/projections/"_cClassnamePath_cClassname_".java -d /pum/online/system7/JSP/WEB-INF/classes/.",!
w "--------------------------------"
w !,"Ergebnis:"
#dim wrappercomp = "sudo -u root ssh 10.8.8.99 /usr/bin/javac /pum/pmssys/system7/java/cache/wrappers/"_cClassnamePath_"Execute"_cClassname_"* -d /pum/online/system7/JSP/WEB-INF/classes/."
#dim projcomp = "sudu -u root ssh 10.8.8.99 /usr/bin/javac /pum/pmssys/system7/java/cache/projections/"_cClassnamePath_cClassname_".java -d /pum/online/system7/JSP/WEB-INF/classes/."
#dim tSatz, tSatz2
#dim olddev = $IO
o wrappercomp:("QR")
u wrappercomp r tSatz u olddev w !,tSatz
c wrappercomp
o projcomp:("QR")
c projcomp
Problem is as soon as I want to read the output of javac using "u wrappercomp" Studio getting a network error.
I don't know why I can write the "-----JAVA " stuff out to console and can't read the output of the javac and writing it out to the Studio.
Here is the output in Studio if I quit right after the $IO debugging outputs:
Compiling class Online.Queries.PerQueries3
Compiling table Online_Queries.PerQueries3
Compiling routine Online.Queries.PerQueries3.1
Generating Java Binding: /pum/pmssys/system7/java/cache/projections/Online/Queries/PerQueries3.java
Generating S7 Wrappers for Online.Queries.PerQueries3...
...access class: PerQueries3
...executes:
...selects: Angebotssuche KalenderSubmissionAktuell KalenderTermineJeZeitraum VersandadressenJeAuftragsmappe
...dyn.queries:
...finished.
...compile:
DEVICE : |TCP|1972|28274
$IO : |TCP|1972|28274
Compilation finished successfully in 1.064s.
Any ideas?