Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about executable jar

 
mohamed abdo
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 174
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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")
 
Rob Spoor
Sheriff
Pie
Posts: 20492
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not necessarily. With Class.getResource you can also use resource paths relative to the class itself.
 
mohamed abdo
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20492
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
renjini abc wrote:

Please check your private messages for an important administrative matter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic