08-08-2008
You have to name all the JARs on the classpath. Just putting the directory containing the JARs on the classpath will NOT work.
However, if you use JDK 6, you can use a '*' wildcard with the '-classpath' argument to select all jars in a given directory. This feature is not available in earlier JDK versions (5.0 or 1.x).
Setting the class path
Look at the "Understanding class path wildcards" section.
Apache Ant - Welcome makes Java application building and managing classpath sort of an easy task.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I recieve the following error when trying to run the following command in a ksh. The operating system is AIX5.1.
/usr/bin/jar -xvf {filename}.zip
Can't find class java.lang.System
But when I run it on the command line it unzips the file fine.
Does anybody know why this... (2 Replies)
Discussion started by: ctcuser
2 Replies
2. UNIX for Dummies Questions & Answers
Hi Folks,
I'm a serious UNIX newbie... I'm using a bash shell on Mac OS X.
Basically I took up unix in order to use a specific image processing software package... I've learned enough to write a script to batch process all of my images, but I have so many that I would like to use an... (1 Reply)
Discussion started by: Slanter
1 Replies
3. UNIX for Dummies Questions & Answers
Hi...
I have build a program for the Velleman K8000 interface card, in java, which works just fine in windows, but now I want to use the program on a Unix-System.
Is it possible to somehow convert the dll file to a format that Unix supports, or do I have to find another way?
Dll-file:... (3 Replies)
Discussion started by: Scorp-D
3 Replies
4. Shell Programming and Scripting
Hi all,
I have a Unix script that will compile all Java files in a sub folder as follows:
find . -name "*.java" -print -exec $JAVA_HOME/bin/javac -cp .:$CLASSPATH '{}' \;
I would like to enhance it to only compile those Java files who:
1.) Have no class file
2.) Have a class file... (1 Reply)
Discussion started by: Annorax
1 Replies
5. Ubuntu
Hi,
how to add external jar file in jsp application on eclipse.
Thanks
SN:confused: (0 Replies)
Discussion started by: snallusami
0 Replies
6. Shell Programming and Scripting
Hi,
I have created a Shell Script and invoke through java using Process Builder
It's working fine, if (Shell script file ) in the same directory as java file.
By Problem:
How to run the Shell Script file( resides in external directory) using java. What configuration i have... (1 Reply)
Discussion started by: nanthagopal
1 Replies
7. Programming
Hello!
This is my first post, and I just learned what UNIX was this week. For a JAVA programming class I am taking, I must be able to create a directory in UNIX, use the nano command to create a JAVA program, compile it, and then run it on the command prompt using the java command.
For some... (5 Replies)
Discussion started by: UNdvoItX
5 Replies
8. Shell Programming and Scripting
I have a .jar placed in my Unix directory. The .jar creates a .csv file .I want to execute the .jar and place the output file in a target Unix directory.
The Unix Script is as follows. The issue that i am facing is that the file is not being placed in the REPORTDIR=/cdunix/IQNavigator/wrk instead... (4 Replies)
Discussion started by: pankajkargeti12
4 Replies
9. Shell Programming and Scripting
unzip -v gives CRC info of each file in a zip(in my case .EAR) file.
# unzip -v my-application.ear
Archive: my-application.ear
Length Method Size Cmpr Date Time CRC-32 Name
-------- ------ ------- ---- ---------- ----- -------- ----
197981 Defl:N 183708 7%... (1 Reply)
Discussion started by: kchinnam
1 Replies
apt(1) General Commands Manual apt(1)
NAME
apt - annotation processing tool
SYNOPSIS
apt [ -classpath classpath ] [ -sourcepath sourcepath ] [ -d directory ] [ -s directory ] [ -factorypath path ] [ -factory class ] [ -print
] [ -nocompile ] [ -A [ key [ =val ] ] ] [ javac option ] sourcefiles [ @files ]
DESCRIPTION
The tool apt, annotation processing tool, includes a set of new reflective APIs and supporting infrastructure to process program annota-
tions. The apt reflective APIs provide a build-time, source-based, read-only view of program structure. These reflective APIs are designed
to cleanly model the JavaTM programming language's type system after the addition of generics. First, apt runs annotation processors that
can produce new source code and other files. Next, apt can cause compilation of both original and generated source files, easing develop-
ment. The reflective APIs and other APIs used to interact with the tool are subpackages of com.sun.mirror.
A fuller discussion of how the tool operates as well as instructions for developing with apt are in Getting Started with apt at
http://java.sun.com/j2se/1.5.0/docs/guide/apt/GettingStarted.html.
PARAMETERS
Options may be in any order. For a discussion of parameters which apply to a specific option, see OPTIONS below.
sourcefiles Zero or more source files to be processed.
@files One or more files that list source files or other options.
OPTIONS
apt specific options
-s dir Specify the directory root under which processor-generated source files will be placed; files are placed in subdirectories
based on package namespace.
-nocompile Do not compile sources files to class files.
-print Print out textual representation of specified types; perform no annotation processing or compilation.
-A[key[=val]] Options to pass to annotation processors -- these are not interpreted by apt directly, but are made available for use by
individual processors
-factorypath path
Specify where to find annotation processor factories; if this option is used, the classpath is not searched for factories.
-factory classname
Name of annotation processor factory to use; bypasses default discovery process
Options shared with javac
-d dir Specify where to place processor and javac generated class files
-cp path or
-classpath path
Specify where to find user class files and annotation processor factories. If -factorypath is given, the classpath is not
searched for factories.
Consult the javac(1) man page for information on javac options.
NOTES
The apt tool and its associated APIs may be changed or superseded in future j2se releases.
SEE ALSO
javac(1) java(1)
13 June 2004 apt(1)