Project

Profile

Help

saxon8.jar from a vb.net shell

Added by Anonymous almost 19 years ago

Legacy ID: #3204571 Legacy Poster: Jim Neff (neffland_2000)

Greetings, I need to run saxon8 from a vb.net shell. The following command works when I execute the following command from a command prompt: h:\edi-process\bin\j2sdk1.4.2_06\bin\java.exe -jar h:\edi-process\bin\saxon\8.4\saxon8.jar however when I launch this from a shell within my VB.Net application this does not work. I get nothing returned (as if it cannot find the saxon8.jar file). I can execute just the java.exe from the shell and I get the help output; so I know the shell is working and can execute java.exe just fine. I realize this is probably a VB.Net problem but I could really use some help with this. Am I not executing java.exe correctly? Is there a switch (like a classpath setting) that I'm not using correctly? Any and all help is much appreciated. Thanks, Jim Neff


Replies (6)

Please register to reply

RE: saxon8.jar from a vb.net shell - Added by Anonymous almost 19 years ago

Legacy ID: #3204621 Legacy Poster: Michael Kay (mhkay)

This isn't an environment I know much about, unfortunately. Getting no output at all (not even an error message) seems a bit strange. There shouldn't be any need to set the classpath if you're using the -jar option on the command line. There is a need, of course, for additional arguments on the command line (e.g. -t style.xsl source.xml). Do you know which Java VM (version) is being invoked? Michael Kay

RE: saxon8.jar from a vb.net shell - Added by Anonymous almost 19 years ago

Legacy ID: #3204627 Legacy Poster: Michael Kay (mhkay)

By the way, I don't think many Saxon users monitor this forum. For questions where other users might be able to help better than I can, the saxon-help mailing list sometimes works better than the forum. MK

RE: saxon8.jar from a vb.net shell - Added by Anonymous almost 19 years ago

Legacy ID: #3204650 Legacy Poster: Jim Neff (neffland_2000)

Thanks for the quick reply Michael. I will check out the other list you mentioned. I usually invoke Saxon like this: java -jar saxon8.jar source-doc-.xml stylesheet.xsl > output.txt but if i just run java -jar saxon8.jar from the command line i get the saxon help message. I can't even get that. By Java VM version, do you mean this: h:\edi-process\bin\j2sdk1.4.2_06\bin\java.exe -version java version "1.4.2_06" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03) Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode) I'm pretty sure this is an enviornment issue as I can execute java.exe just fine (meaning no security restrictions) and put saxon8.jar in the same folder but still no output. Thanks again, and i'll try that other forum. --Jim

RE: saxon8.jar from a vb.net shell - Added by Anonymous almost 19 years ago

Legacy ID: #3204663 Legacy Poster: Michael Kay (mhkay)

It may be worth trying to track down the lost messages. They must be going somewhere, and might well help you discover what's going on. At some stage you're going to have to capture System.out and System.err, so it's worth tackling this part of the problem first,

RE: saxon8.jar from a vb.net shell - Added by Anonymous almost 19 years ago

Legacy ID: #3204982 Legacy Poster: Jim Neff (neffland_2000)

This is actually a symptom of another problem. The VB.Net port of Saxon, Saxon.net works great, accept the format-date function does not process dates correctly. I am using the following line in my XSLT stylesheet: format-date($date_value, '[M01][D01][Y0001]') Run from the command line, this produces the correct result, but run from Saxon.Net and I always get one digit month and days (however year always comes out correctly). I just accepted this as a bug in Saxon.Net and tried to execute from a shell to do the transformation. Maybe there is another way to format dates? This would ultimately solve my problem as well and then I wouldn't have to worry about nasty 'ole shells.

RE: saxon8.jar from a vb.net shell - Added by Anonymous almost 19 years ago

Legacy ID: #3205057 Legacy Poster: Jim Neff (neffland_2000)

I found a work-around for my problem. Instead of using the format-date function I treat it as a string and use substring() to pull the parts of the date that I need. Thanks again.

    (1-6/6)

    Please register to reply