Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Thursday, July 2, 2009

Java:Compile Errors

When I try to install a java program (JaxoDraw) by ant that draws Feynman diagram, I met some errors with my laptop settings. Here are 3 errors that printed on the screen:

Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-1.5.0-gcj-4.2-1.5.0.0/lib/tools.jar

BUILD FAILED: /work/JaxoDraw-2.0-0/build.xml:xxx:
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
/work/JaxoDraw-2.0-0/build.xml:191: Error starting modern compiler


My solution and checking are:
1. I do not have jdk installed. So I installed it first.
2. Set JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.07/" (which is one java location)
3. compile by ant -lib /usr/lib/jvm/java-6-sun-1.6.0.07/lib/tools.jar (maybe, -lib ... won't be needed any more, I don't know)

Friday, November 30, 2007

linux: how to merge/split pdf files

In linux, there is no professional acrobat avaible, which means that sometimes if you edit your pdf files, for example, merge, split pdf files, you may not have clue to do that. Lots of ppl in the net would recommend "pdftk" (pdf toolket) for you. I try to install, but some lib is needed. I have no time to install other dependent lib so I recalled I have a java tool: Multivalent. Just google it and find its page.

Usage:
java -classpath ~/Multivalent20060102.jar tool.pdf.Merge file1.pdf file2.pdf ...

That is it. You also can split your pdf file to separated ones. Of course, you need to download Multivalent20060102.jar from somewhere of the net. Yes, you can use "convert" to merge, but bad resolution and very slow, not recommended.

Locations of visitors to this page