Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Saxon & Java Jars installation details System
Can anyone explain, please, how to install a java.jar on Mac OS X? I'd like to run the Saxon XML processor.
    •    
  • Currently 2.33 / 5
  You rated: 3 / 5 (3 votes cast)
 
[7,152 views]  

Saxon & Java Jars installation details | 4 comments | Create New Account
Click here to return to the 'Saxon & Java Jars installation details' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
installing jar files
Authored by: zgrose on May 16, '01 05:35:30PM

java jar files dont get installed. when you run java program that needs to use another jar file to run, you simply include that jar file in the classpath of the program you are executing. for instance, if foo.class imports classes from the bar.jar file, you would start foo from the command line like this:

java -classpath "bar.jar" foo

this assumes that you have the bar.jar file in the same folder as the foo class. since this is OS X, you can also use MRJAppBuilder to create double-clickable .app icons that include all of your jar files. it can even bundle all of your java bits inside the .app so that you can move everything around as one icon.



[ Reply to This | # ]
installing jar files
Authored by: mac_guy on May 17, '01 11:21:41PM

Thank you. Your comments encouraged me to take a fresh look at things, and I realize now I was confusing the jar file and the command to start the app. Saxon works. I'm working throught the classpath complexities, too, as there seem to be several places to store classpath information. I'm not sure I wish to modify the .plist file yet.



[ Reply to This | # ]
installing jar files
Authored by: zgrose on May 19, '01 04:04:05PM

the classpath is actually fairly easy to understand albeit very verbose. :) some people like to maintain a global CLASSPATH variable in their environment, but i don't like that approach since you tend to lose sight of the dependencies between your programs and their libraries.

the approach i like (and i think most java apps take), is to use the -classpath parameter to the java application. the classpaths can get *very* long, but you have precise control over what is going on. for instance, one application can use one XML library and another use a separate XML library without clashes.

my recommendation is to make heavy use of -classpath (or let MRJAppBuilder do it for you) rather than using other means.



[ Reply to This | # ]
Saxon & Java Jars installation details
Authored by: mandijan on Jan 25, '10 10:02:37AM

I am a complete novice and want to install Saxon 9.2 (HE) on my Mac OS X leopard 10.5.4. I've got instructions to ensure that I have "saxon.jar in my CLASSPATH by opening a command prompt in the directory in which I've saved my document - helloworld.xml." I have then been instructed to use the following command line:

java net.sf.saxon.Transform -o HelloWorld.saxon.html HelloWorld.xml HelloWorld.xsl

The instruction explains that this tells Saxon to transform HelloWorld.xml using HelloWorld.xsl and directs the output of the transformation to HelloWorld.saxon.html. However, I am at a loss to know where to begin with this, without any experience of command-line programming I might do something else...irreversible.
If someone can tell me how to open a command prompt in the directory in which I've saved my document, and then precisely what I have to do next, and whether I have to repeat this process each time I want to create xml / XSLT documents.
Alternatively, does anyone know of an XML editor which validates against both DTD and XML schemas, does XSLT transformations, supports the Unicode character set and has a straight forward installation on the Mac leopard v10.5? Preferably open source and free.



[ Reply to This | # ]