General Profiling-Questions
Hi! I introduced myself asking clumsy questions so I don't fear to carry on. My question adresses general understandig of java's profiling-mechanism. For I don't know if blackdown implements it I might end up bothering again. I read a few papers on profiling using sun's java-vm. It is said that this mechanisem uses traces that do measure method-calls and their time-consumption. I failed to find out wether these traces ars just (technical) freames or if they do say something about methods that are profiled within a trace. I understood a trace to be just some kind of frame, the headline for various methods beeing calles within this frame. If I am not interested in the question who did call a specific method I can regard a trace to be just an identifier. If I am right it sould not surprise that there are some methodes with the same name in different traces. Am I right or just that far off topic that I should stop mailing? Good evening, Christian -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
setting the class path -an easier way
I just installed java 1.41 on my linux box. By default, Mandrake installs kaffee, and I've had problems with kaffee in the past. As with the last time, installing java is almost too easy. No builds, no make installs--it's just there! However, I wondered if someone could help me with an easy way to set the CLASSPATH for various applications. Does one have to set the CLASSPATH for every single application? Is there not an easier way? For example, I have installed xalan. In my ./bashprofile, I have: export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xsltc.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/BCEL.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/bsf.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/java_cup.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/JLex.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/regexp.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/runtime.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/regexp.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xalansamples.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xalanservlet.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xercesImpl.jar export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xml-apis.jar This gets real tedious. And this is for just one application. I know with python, for example, you can just tell python to look in one folder for all the libraries. Is there a way to do this with java? Is there an easier way to create the CLASSPATH? thanks Paul -- *Paul Tremblay * [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: setting the class path -an easier way
On Sat, Jun 14, 2003 at 08:12:23PM -0400, Paul Tremblay <[EMAIL PROTECTED]> wrote: > For example, I have installed xalan. In my ./bashprofile, I have: > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xsltc.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/BCEL.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/bsf.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/java_cup.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/JLex.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/regexp.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/runtime.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/regexp.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xalansamples.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xalanservlet.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xercesImpl.jar > export CLASSPATH=$CLASSPATH:/home/paul/java/jars/xalan-j_2_3_1/bin/xml-apis.jar > > This gets real tedious. And this is for just one application. > I know with python, for example, you can just tell python to look in one > folder for all the libraries. > Is there a way to do this with java? Is there an easier way to create > the CLASSPATH? Depends. You can do a couple things: First, write a script to run the application, and have this script set the classpath appropriately. Second, write a .jar that can be run with java -jar example.jar containing all the classes you need. Third, some java libraries can be dropped into a specific location within the JDK (for a blackdown JDK under /usr/local/jdk, this is /usr/local/jdk/jre/lib/ext) and they will be automatically loaded. Fourth, the application itself can load .jar files from a specific location and otherwise manipulate the classpath. Tomcat (the example servlet engine) does this extensively. Typically, you write a script for individual applications, put system libraries and JDBC drivers into the JDK's auto-load location, and use -jar for installation packages. -- Matthew Hunter ([EMAIL PROTECTED]) Public Key: http://matthew.infodancer.org/public_key.txt Homepage: http://matthew.infodancer.org/index.jsp Politics: http://www.triggerfinger.org/index.jsp -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: setting the class path -an easier way
On Sat, 2003-06-14 at 17:12, Paul Tremblay wrote: > This gets real tedious. And this is for just one application. > > I know with python, for example, you can just tell python to look in one > folder for all the libraries. > > Is there a way to do this with java? Is there an easier way to create > the CLASSPATH? There are several ways. 1) You can invoke the application use -jar jarfile.jar, and the manifest for the jarfile can set the classpath. 2) You can use ant, which which will let you set a classpath with regexp's like "dir/*.jar". 3) You can write a short script using find and sed to do what ant does. 4) You can build jar files which aggregate various jars into a larger jar file. 5) You can copy commonly used libraries into your $JAVA_HOME/jre/lib/ext directory (this is the path for extensions), so that they'll get added automatically. --Chris -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]