home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
ShowClasspath.java
< prev
next >
Wrap
Text File
|
1998-09-27
|
2KB
|
81 lines
package com.symantec.itools.tools.utilities;
import java.applet.Applet;
import java.io.File;
import java.util.Enumeration;
import java.util.Vector;
import com.symantec.itools.io.FileSystem;
import com.symantec.itools.lang.Classpath;
/**
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public class ShowClasspath
extends Applet
{
public ShowClasspath()
{
}
public void init()
{
try
{
String[] classpath;
Vector valid;
Vector invalid;
classpath = new Classpath().getActualClasspath();
valid = new Vector();
invalid = new Vector();
for(int i = 0; i < classpath.length; i++)
{
File file;
file = new File(classpath[i]);
if(file.exists())
{
valid.addElement(file);
}
else
{
invalid.addElement(file);
}
}
System.out.println("Valid CLASSPATH entries (with duplicates):\n");
for(Enumeration e = valid.elements(); e.hasMoreElements();)
{
System.out.println(" " + e.nextElement());
}
System.out.println("\n\nInvalid CLASSPATH entries:\n");
for(Enumeration e = invalid.elements(); e.hasMoreElements();)
{
System.out.println(" " + e.nextElement());
}
}
catch(SecurityException ex)
{
System.out.println("Security Excpetion");
}
}
/**
* @param argv TODO
* @since VCafe 3.0
*/
public static void main(String[] argv)
{
new ShowClasspath().init();
}
}