----------------------------------------------------------------------
--- Knud van Eeden --- 12 December 2009 - 07:20 pm -------------------
Java: Class: .Jar: How to search your .CLASS file in nested .jar Java class files, and directories using 'File Locator Pro'?
---
File Locator Pro supports searching in semi-colon separated file and
directory lists like
E.g.
c:\mydirectory1;c:\mydirectory2;c:\mydirectory3
and so on.
===
Your PATH environment variable is a typical example of such a list.
E.g.
c:\;c:\windows;c:\windows\system32
===
Similar is the Java CLASSPATH a typical example of such a list of
directories and files, separated by the semi-colon ';' separator.
E.g.
.;C:\PROGRA~1\IBM\SQLLIB\java\db2java.zip;C:\PROGRA~1\IBM\SQLLIB\java\db2jcc.jar;C:\PROGRA~1\IBM\SQLLIB\java\sqlj.zip;C:\PROGRA~1\IBM\SQLLIB\bin;C:\PROGRA~1\IBM\SQLLIB\java\common.jar;C:\Program Files\Java\j2sdkee1.3.1\;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip
Here the '.' stands for the current directory.
File Locator only does not like the '.', so you will have to manually replace it
by the verbatim path of your current directory there instead
(e.g. use then c:\temp\mydirectory123\ instead of '.')
===
Steps: Overview:
1. -You must first (once only) add the .jar file extension (and if
applicable the .war file extensions) to the .zip file extensions
in the File Locator configuration.
Otherwise it will not recognize the .jar and .war file extensions
as being .zip like compressed files,
and will not handle them accordingly.
2. -Get your CLASSPATH
1. -Open an MSDOS box and type the following command:
--- cut here: begin --------------------------------------------------
SET CLASSPATH
--- cut here: end ----------------------------------------------------
-- or --
1. -'Start' > Control panel > System > Tab 'Advanced' > button 'Environment variables' > CLASSPATH > button 'Edit' > Copy to clipboard
-- or --
1. -Use a Microsoft Windows API to get the CLASSPATH value programmatically and automatically
(use e.g. 'FindEnvironmentString' located in the 'shell32.dll' file)
3. -Run the program
File Locator Pro
Note:
Optionally to inform where your current directory is, File Locator Pro
should be started from that current directory from the command line.
But currently this information is not used.
4. -Select tab 'Main'
5. -In the field
File name:
fill in the class name you are searching in the CLASSPATH
E.g.
myclass.class
6. -In the field
Look in:
paste the CLASS path string
E.g.
c:\myjar1.jar;c:\myjar2.jar;c:\jar3.jar;c:\zip1.zip;c:\zip2.zip;c:\mydirectory1;c:\mydirectory2
7. -Optionally, if this CLASSPATH string contains the dot '.'
(=current directory), manually replace it using copy/paste
with the real current directory (check this on your system).
8. -Click button 'Start' to start the search
9. -If found, then the filename in the top of the list will be the first
found .class name with that given name.
That will similarly be used by the javac.exe or java.exe program.
Further all the other occurrences of that .class name below that.
This information can be used for trouble shooting class not found problems
1. -A .class file should be used, but is not found at all in the
CLASSPATH files or directories. So it should e.g. be made
found and or created and or added to the CLASSPATH
2. -Another class file with the same name should be used
Possibly a .class file with the *same* name exists deeper in
the CLASSPATH directories or files, and is then unintentionally
*not* used, which might lead to unexpected results. So this way
you can check if this occurs, and as a workaround possibly
change the order of the files in the CLASSPATH.
===
Book: see also:
===
Diagram: see also:
===
File: see also:
===
Help: see also:
===
Image: see also:
===
Internet: see also:
---
Computer: File: Name: Operation: Search: File: Compress: Java: Class: .Jar: .Zip: Nested: How to: How to search in nested .jar Java class files using 'File Locator'?
http://goo.gl/5vUGf
===
Podcast: see also:
===
Record: see also:
===
Screencast: see also:
===
Table: see also:
===
Video: see also:
===
<version>1.0.0.0.1</version>
----------------------------------------------------------------------