File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes JTwain not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "JTwain not working" Watch "JTwain not working" New topic
Author

JTwain not working

Devasia Manuel
Ranch Hand

Joined: May 13, 2008
Posts: 57
Hi,

I am having trouble making JTwain work for my pc, i downloaded the JTwain trial version from he proper website, then in Netbeans, it wont compile if I try to import anything from the jtwain packages. I have added all Jtwain jars to the src folder and to the jre/lib/ext folder, however it is not added to my classpath...

should it work or should i need to add them to my classpath??

Thanks
----Dev
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38765
    
  23
Go through the documentation for JTwain. Find the Java Documentation home page and click "java" and "javac" and look for the classpath options. It sounds as though using the compiler's classpath options is worth trying, yes.
If it doesn't work, come back here.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
You probably need to look at the Netbeans documentation to see how a jar file is added to the classpath of a project. Moving to our IDE forum...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Devasia Manuel
Ranch Hand

Joined: May 13, 2008
Posts: 57
Im pretty sure that its not NetBean's problem because I tried the same thing with JCreator and a Notepad and it still didn't allow me...
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38765
    
  23
So, what is your classpath, and is the JTwain jar in it?
Devasia Manuel
Ranch Hand

Joined: May 13, 2008
Posts: 57
my classpath is "." and the JTwain.jar file is in my main directory
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38765
    
  23
The "." classpath means the current directory only; you will have to go through NetBeans and add JTwain to your classpath. Can't remember how to do it, I am afraid.

Also make sure to addJTwain to the .jar file when you distribute your product.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTwain not working