File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "about executable jar " Watch "about executable jar " New topic
Author

about executable jar

mohamed abdo
Greenhorn

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...

getClass().getResource("/com/abc/module/xyz.jpg")


- Chinna
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
mohamed abdo
Greenhorn

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
cmd

i found this exception



thanks,
renjini john
Greenhorn

Joined: Aug 09, 2010
Posts: 1
sir,
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
Sheriff

Joined: Oct 27, 2005
Posts: 19670
    
  18

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: 10255
    
    8

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!]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: about executable jar