File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Vector class not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Vector class not found" Watch "Vector class not found" New topic
Author

Vector class not found

Ajit Deshpande
Greenhorn

Joined: Jun 15, 2000
Posts: 17
please consider this code:
class vector1 {
public static void main(String args[]) {
Vector a = new Vector();
int i = 10;
Integer Int = new Integer(i);
a.addElement(Int);

System.out.println(a.elementAt(0));
}
}
I think this should compile but my compiler is complaining that"Class Vector not found". I am using jdk1.2.1.
Could someone tell me if there is something wrong with the code or with the compiler.
Thanks
Angela Poynton
Ranch Hand

Joined: Mar 02, 2000
Posts: 3143
Are you importing java.util.Vector ?
If not you'll need to, and make sure your classpath is pointing to JDK.
Hope this helps.

Pounding at a thick stone wall won't move it, sometimes, you need to step back to see the way around.
Adrian Ferreira
Ranch Hand

Joined: May 29, 2000
Posts: 118
Try this with corrections:
The change is the include of first line and changing the class name.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Vector class not found