I must admit I have only a very limited knowledge of Java. But excluding "-cp ." makes Java give the error message "Could not find the main class: TestErikBildebehandling. Program will exit.".
This was an error that popped up when I started running my Java programs under JDK 1.6 (in stead of 1.5.0 Beta which I used earlier). A search on Internet told me that to execute my Java file under JDK 1.6 I needed to include the "-cp ." option. That's why its there in my Java call. As said, I have a very limited knowledge of Java. Thus there may be some other, very elementary, way to solve my problem with the main class error message and the ClassNotFoundException on BadElementException. Erik At 09:04 12.08.2010, you wrote: >Erik, > >Erik Tronstad wrote: > > > > SET > > > CLASSPATH=C:\Programfiler\Java\jdk1.6.0_21\lib\tools.jar;S:\PROG_NT\Java\iText\iText-5.0.3.jar > > > > C:\Programfiler\Java\jdk1.6.0_21\bin\java -cp . > > TestErikBildebehandling > > N:\Brukere\Tronstad\JAVA\PAR_filer\TestErikBildebehandling.PAR > > > >Setting the classpath with "-cp ." on the command line, you override the >CLASSPATH environment variable, don't you? Therefore, the iText jar is not >on your runtime classpath. > >Regards, michael. >-- >View this message in context: >http://itext-general.2136553.n4.nabble.com/Why-ClassNotFoundException-on-BadElementException-tp2321105p2322292.html >Sent from the iText - General mailing list archive at Nabble.com. > >------------------------------------------------------------------------------ >This SF.net email is sponsored by > >Make an app they can't live without >Enter the BlackBerry Developer Challenge >http://p.sf.net/sfu/RIM-dev2dev >_______________________________________________ >iText-questions mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/itext-questions > >Buy the iText book: http://www.itextpdf.com/book/ >Check the site with examples before you ask questions: >http://www.1t3xt.info/examples/ >You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
