projects
/
debian
/
openrocket
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JOGL Based support for a 3D view of the rocket.
[debian/openrocket]
/
core
/
src
/
net
/
sf
/
openrocket
/
util
/
JarUtil.java
diff --git
a/core/src/net/sf/openrocket/util/JarUtil.java
b/core/src/net/sf/openrocket/util/JarUtil.java
index b73438ed10bf8714dc80808de2206338ad4ba9c2..545cfa581d9e4f8e09c53b11d937a6f2de41c15a 100644
(file)
--- a/
core/src/net/sf/openrocket/util/JarUtil.java
+++ b/
core/src/net/sf/openrocket/util/JarUtil.java
@@
-18,8
+18,15
@@
public class JarUtil {
*/
public static File getCurrentJarFile() {
// Find the jar file this class is contained in
*/
public static File getCurrentJarFile() {
// Find the jar file this class is contained in
+
URL jarUrl = null;
URL jarUrl = null;
- CodeSource codeSource = Database.class.getProtectionDomain().getCodeSource();
+ CodeSource codeSource;
+ try {
+ codeSource = new URL("rsrc:.").openConnection().getClass().getProtectionDomain().getCodeSource();
+ } catch (Throwable e) {
+ codeSource = Database.class.getProtectionDomain().getCodeSource();
+ }
+
if (codeSource != null)
jarUrl = codeSource.getLocation();
if (codeSource != null)
jarUrl = codeSource.getLocation();