This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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 "" package in the jar file

Then you should refer it as...


- Chinna
Rob Spoor

Joined: Oct 27, 2005
Posts: 20279

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: 20279

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: 10836

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!]
I agree. Here's the link:
subject: about executable jar
It's not a secret anymore!