ccavanaugh / jgnash

jGnash Personal Finance
http://ccavanaugh.github.io/jgnash/
Other
139 stars 80 forks source link

MacOSX new install cannot load AbstractAuthenticator #39

Closed bsmithlea closed 6 years ago

bsmithlea commented 6 years ago

MacOSX 10.13.1 java -version

java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Steps to reproduce

  1. Downloaded a new archive jgnash-2.33.1-bin.zip from the download site.
  2. Copied extracted contents to /Applications
  3. Ran java -classpath /Applications/jGnash-2.33.1/lib -jar /Applications/jGnash-2.33.1/lib/jgnash-fx-2.33.1.jar (I tried the swing version too, but same error)

Exception in thread "JavaFX Application Thread" Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) Caused by: java.lang.NullPointerException at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:383) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328) ... 5 more java.lang.NoClassDefFoundError: jgnash/net/AbstractAuthenticator at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) at java.net.URLClassLoader$1.run(URLClassLoader.java:362) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:361) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at com.sun.javafx.application.LauncherImpl.lambda$launchApplicationWithArgs$157(LauncherImpl.java:352) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$176(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) Caused by: java.lang.ClassNotFoundException: jgnash.net.AbstractAuthenticator at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 20 more

ccavanaugh commented 6 years ago

-classpath /Applications/jGnash-2.33.1/lib

Will alter the classpath and prevent loading. Try removing it as it should not be necessary.

bsmithlea commented 6 years ago

So then should this part of the README be changed? It is the recommendation to create an AppleScript file.

try do shell script "/System/Library/Frameworks/JavaVM.framework/Versions/1.8.0/Home/bin/java -classpath /Applications/jGnash/lib -jar /Applications/jGnash/lib/jgnash-fx-x.jar" end try

Also, I am able to launch jGnash now. But only after upgrading to the latest JDK 8 (update 151). Update 60 is not recent enough.

ccavanaugh commented 6 years ago

Agreed... ancient instructions. Did removal of the class path solve the launch issue?

bsmithlea commented 6 years ago

Actually no. The only thing that works is this Terminal command (after installing Java SE 8u151).

/Applications/jGnash/jGnashFx

Double clicking the same script does not work.

ccavanaugh commented 6 years ago

I don't have access to OSX, so I apologize for the ignorance. The shell script is doing the job, but can you recommend a friendlier way of calling the shell script?