redho home | products | services
Web Design Forums

Web Design Forums  


Web Hosting, Web Design, Software and Web Development Forums  
 FAQFAQ   MemberlistArchive  Log inLog in   RegisterRegister 
         

the compiler can't find a jar package



 
Post new topic   Reply to topic    Web Design Forums -> JAVA programming forum
View previous topic :: View next topic  
Author Message
PMandy



Joined: 05 Jun 2006
Posts: 11
Hello, i have compiled a jar package, and now i wanna use it in another program.. the problem is, the compiler can't find it, even if i put the jar file in the same folder as the .java file of the program i'm trying to use it with
  Reply with quote


AmeliaR



Joined: 31 May 2006
Posts: 142
PMandy, you need to include it into your classpath, there are resources online you can use to learn how
  Reply with quote
BigDaddy



Joined: 26 May 2006
Posts: 147
PMandy, classpath is an environment variable, or command line option for Java that tells the Java compiler and runtime where certain libraries are. For more information, see http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/classpath.html
  Reply with quote
PMandy



Joined: 05 Jun 2006
Posts: 11
Alright... i'm using Xcode on a mac, so the descriptions i've found so far doesn't make sense
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
PMandy, use the commandline/shell to compile and run your application until you figure out your dev tools. most dev tools seem to have something like project settings where the class path is to be configured on a per project basis.
  Reply with quote
PMandy



Joined: 05 Jun 2006
Posts: 11
But in the Thinking in Java book, it says i dont need to do this if the jar is in the same path as the program itself
Or maybe i just misunderstood
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
PMandy, where exactly does it say that? i am pretty sure you misread that.
Because the class path mechanism does not work that way, obvious exceptions aside.
The standard cp mechanism provided by sun, one could say.
  Reply with quote
AmeliaR



Joined: 31 May 2006
Posts: 142
PMandy, the IDE you're using probably has settings somewhere you need to change to make this work... see if you have "Project Properties" or something similar
do note, however, that at some point you'll have to figure out how to make this stuff work in a terminal as well -- since your users won't have all have Xcode :)
  Reply with quote
PMandy



Joined: 05 Jun 2006
Posts: 11
AmeliaR, the user will probably be on a windows machine
So i suppose that's just a question of writing a simple BAT-file
Ikopar, thanks, ill check that out
Why can't you just launch the .class file in windows?
Works fine in macos
  Reply with quote
Ikopar



Joined: 26 May 2006
Posts: 168
PMandy, wrong approach.
  Reply with quote
Page 1 of 1
Post new topic   Reply to topic    Web Design Forums -> JAVA programming forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group