hiteksoftware.com Forum Index hiteksoftware.com
User discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Won't load class from jar file

 
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions
View previous topic :: View next topic  
Author Message
VincentMagnotta



Joined: 28 Jul 2008
Posts: 46

PostPosted: Fri Dec 17, 2010 10:57 am    Post subject: Won't load class from jar file Reply with quote

I have added a jar file to the automize8 directory (OpenCSV, if you're familiar with it). When I load the engine, it shows up in the list of jars being loaded. However, when I try to instantiate a class from that jar, the script engine tells me the class is not found. It's almost like the import statement is being ignored. I've even tried fully qualifying the class name.

Code:

import com.hitek.engine.mods.script.Script;
import au.com.bytecode.opencsv;
// create a new file object
File file1 = new File("D:/automation/quickTest.csv");

FileReader fr = new FileReader(file1);
BufferedReader br = new BufferedReader(fr);
String line = "";
String[] fields;
CSVReader csvR = new CSVReader(br,';');


Quote:

Error Message: Sourced file: D:\Apps\Automize8\data\scripts\testing_script : Typed variable declaration : Class: CSVReader not found in namespace

Error stack trace: Sourced file: D:\Apps\Automize8\data\scripts\testing_script : Typed variable declaration : Class: CSVReader not found in namespace : at Line: 12 : in file: D:\Apps\Automize8\data\scripts\testing_script : CSVReader

at bsh.BSHAmbiguousName.toClass(Unknown Source)
at bsh.BSHType.getType(Unknown Source)
at bsh.BSHTypedVariableDeclaration.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)

Back to top
View user's profile Send private message
melvin
Site Admin


Joined: 25 May 2006
Posts: 631
Location: Santa Barbara, california

PostPosted: Sat Dec 18, 2010 11:04 am    Post subject: Reply with quote

Try placing another copy of the jar in the ....jre\lib\ext folder and see if that helps. Then restart the engine and try again.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    hiteksoftware.com Forum Index -> Frequently Asked Questions All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group