Creating a .jar package file

From: Mike B (mrcics2000-news-nomail_at_nomail.yahoo.com)
Date: 09/29/04


Date: Wed, 29 Sep 2004 15:56:33 -0500

OK, now I'm really stuck and I can't get things clear in my mind.

I've created an application Prob3PaneApp in directory \fall2004\bcis\ this
application won't compile because it needs to find a class Prob3Customer.

I've created a class Prob3Customer in directory \fall2004\bcis\edu\mpb\Prob3
this compiles clean and creates a .class file.

I've run "jar cvf prob3.jar edu\mpb\prob3" this says it included the class
Prob3Customer in the .jar file.

Now I'm stuck.... where on earth do I have to put the .jar file and what
will the include statement look like to include this class in my
Prob3PaneApp application? The book wan't me to stick it in
c:\jdk1.4.2\jre\lib\ext directory, but I'd rather not stick my files in the
Java directories. Can't I just change a PATH statement or something?
Besides, if I were to do this on a lab machine, I'd never get access to the
Java directories and I must run it on a lab machine as final proof.

Thanks

-- 
Mike B 


Relevant Pages

  • Re: Creating a .jar package file
    ... > Java class names should be meaningful, ... I wrote Prob3Customer. ... that is why I'm trying to get the .jar file somewhere so I can ... compile my application Prob3PaneApp. ...
    (comp.lang.java.help)
  • Re: Jar file only works on my pc
    ... I use textPad 4 to compile and command line to make ... I open the jar file using 7zip and all of the class files are ... my other applets work fine. ... I think I have the $'s because of my actionListener inner classes. ...
    (comp.lang.java.programmer)
  • Re: Eclipse IDE Question
    ... and debug but can't figure out to compile a JAR file! ... Eclipse compiles Java files on ... What do you exactly mean by compiling a JAR file? ... Thanks Roland - I didn't know about the "Export" step. ...
    (comp.lang.java.programmer)
  • Re: Eclipse IDE Question
    ... When "Build Automatically" is selected, Eclipse compiles Java files on the fly, so your project is always in a "built"-state. ... You'll never have to compile or build a project yourself. ... What do you exactly mean by compiling a JAR file? ...
    (comp.lang.java.programmer)
  • Re: Running java programs from class files
    ... the command line when I run a java program. ... I can get it to work if I put the jar file in the Class-Path: line in the manifest and put the jar file in the same directory as the program jar file but not from the command line. ... I then compile Test.java from the /test directory and run the .class file with no problems. ... (i.e by explicitly specifying the main class to invoke, and specifying all the jar files in the classpath option) ...
    (comp.lang.java.programmer)