tags:

views:

384

answers:

2
+6  A: 

denemeJasper.class.getResource("reportDeneme.jasper").getPath()

If you need the path for reading the file's contents, it would be simpler (and safer) to use getResourceAsStream() and avoid having to deal with paths entirely.

BTW, your class denemeJasper violates ubiquitous Java naming standards; as a class, its name should start with an uppercase letter.

Michael Borgwardt
A: 

The might be better off with a relative path, but the absolute path would be:

String fullpath = "/jasper/deneme/reportDeneme.jasper";

'/' replaces '.' in the package name whether the resource is located in a file, a jar or by any other means.

Tom Hawtin - tackline