This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 38045
    
  22
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: 38045
    
  22
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: 38045
    
  22
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.
 
jQuery in Action, 2nd edition
 
subject: JTwain not working
 
Similar Threads
Problem in Integrating Jtwain Japplet in JSP/HTML
Help! (Basic Stuff) Headfirst EJB, Chapter 1
Question on loading applicationContext
jtwain scanning library: make applet support autofeeder
other than Jtwain