• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The correct location of Jar files

 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I'm using jSMSEngine.jar to send SMS messages from my java app.
Here is a primitive view of my code.

import import org.jsmsengine.*;

public class SMS extends JFrame implements ActionListener{

CService SMSServ = null;

SMS(Sting title){
super(title);
......................
SMSServ = new CService("COM7", 19200, "Nokia", "6230");
......................
}

.....................

public static void main(String[] aid){
new SMS("SMS Sender");
}

I created a shortcut for this class file and in the properties of the shortcut navigated the Target to
C:\WINDOWS\system32\javaw.exe SMS .
When I comment creating a CService instance in the constructor of the frame the app launches when I uncomment it does not.
I guess that means that it cannt find the jar file.
I put the jar file into the same directory where all my classes reside and into the jre\lib\ext.
But it doesnt help!
Where shall I put the jar file?
Waiting for reply.............
Thank you very much!
Fedai.
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should list the actual jar file name including absolute path in the CLASSPATH. It isn't enough to place the directory where the jar file is.
[ April 05, 2006: Message edited by: Keith Lynn ]
 
fedai gandjaliyev
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using IntelliJ IDE 4.5.
When I want to use a jar file in my project I just add it to it.
My project will consist of 5-7 class files and I want to make an
executable jar file out of them. But this jar file should somehow
access those additional jars.
So where shall I put them?
Waiting for reply.......
Thank you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic