odd dependencies between tag handlers and POJOs February 29, 2008
Posted by lemonpress in 1 cat, java web dev.add a comment
There are odd dependencies between tag handlers and POJOs (or Java Beans) that are used by tag handlers:
if the POJO/JavaBean already exists as a compiles .class file and we created a new tag handler that uses it
The tag handler won’t compile!
Solution:
- delete dependent .class files in the file browser
- deselect “build a”
- recompile the project (in Eclipse choose Project -> Build Project)
And in the future make sure that
you turned off “Build Automatically”
Reference to command line java utilities February 29, 2008
Posted by lemonpress in 1 cat, dev environment installation.add a comment
see http://neptune.netcomp.monash.edu.au/JavaHelp/howto/jar.htm
create compressed library archive (JAR)
jar cf archive_name.jar list-of-files
jar cf example.jar One.java Two.java Three.java
jar cf example.jar *.java
jar cf example.jar *
create java executable
javac * java compile all Java source files in the current dir
javac One.java Two.java Three.java
create an executable JAR
- create a text file that lists the “main” class e.g. mainClass.txt Main-Class: Three
- jar cmf mainClass.txt example.jar *.class
c - with modifications to the manifest file
m- name jar after main class as specified within mainClass.txt
f - including everything that matches the pattern *class
run executable JAR from command line
java -jar example.jar
Options
using libraries in your project February 29, 2008
Posted by lemonpress in 1 cat, java web dev.add a comment
xxx.jar - a library of useful classes packaged in a single archive file.
using libraries in your project is dead-easy.
- create classes, e.g. a collection of custom tag handlers
- zip them up using jar cf mytags.jar *
or jar cf mytags.jar list-of-files.class - copy mytags.jar into lib/ dir of another project (see More)
- use them