wood burning stoves
The moose likes Swing / AWT / SWT and the fly likes about executable jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "about executable jar " Watch "about executable jar " New topic

about executable jar

mohamed abdo

Joined: Aug 13, 2009
Posts: 8
i made aproject and i made executable jar file
and i used

to display images
i add crystal reports in the project and when i try to open it from the application it open succesfully
when i deploy the application to executable jar it didnt open
how can i get the path of these reports form the jar
i use this to open reports

Chinna Eranna
Ranch Hand

Joined: Dec 08, 2009
Posts: 174

for ex.. if the resource "xyz.jpg" is in "com.abc.module" package in the jar file

Then you should refer it as...


- Chinna
Rob Spoor

Joined: Oct 27, 2005
Posts: 19908

Not necessarily. With Class.getResource you can also use resource paths relative to the class itself.

How To Ask Questions How To Answer Questions
mohamed abdo

Joined: Aug 13, 2009
Posts: 8
can any one please show me ex to call report files when you run the application from executable jar
when i run the jar file in

i found this exception

renjini john

Joined: Aug 09, 2010
Posts: 1
i cannot call crystal reports from my jar file.i am using eclipse.within the eclipse everything is working fine.but from the jar file crystal report is not displayed.

i was searching for a solution and saw your post. i have the same problem.if you got a solution please
tell me also.
Rob Spoor

Joined: Oct 27, 2005
Posts: 19908

Add a Class-Path property in you manifest file. Note that the Crystal Reports JAR file cannot be placed inside your JAR file; it must be placed in a folder relative to your JAR file (like the current folder), and the manifest should use this relative path.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10651

renjini abc wrote:

Please check your private messages for an important administrative matter.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: about executable jar