Unfortunately i'm stuck supporting a Java 8 application on Mac. The issue is i keep getting:
Error: Could not find or load main class com.lionEdge.ranchManager.ui.main.RanchManagerApplication.java
When running the app. Here is the Config file:
[Application]
app.name=RanchManagerOSX
app.mainjar=$APPDIR/Java/ranchManager.jar
app.version=3.2.8
app.preferences.id=com/lionEdge/ranchManager/ui/main
app.mainclass=com/lionEdge/ranchManager/ui/main/RanchManagerApplication
app.classpath=$APPDIR/Java/jhall.jar: $APPDIR/Java/ranchManager.jar: $APPDIR/Java/rmHelp.jar
app.runtime=$APPDIR/PlugIns/Java.runtime
app.identifier=com.whitemountainslivestock.ranchmanager
[JVMOptions]
[JVMUserOptions]
-Xmx=2048m
[ArgOptions]
The application runs fine on windows and the path to the main method is correct. I've unpacked the jar and verified the path. Here is the directory structure
```
RanchManagerOSX.app
- Contents
-- Info.plist
-- PkgInfo
--PlugIns (Directory)
--- Java.runtime
-- Java (Directory)
--- jhall.jar
--- ranchManager.jar
---rmHelp.jar
--- RanchManagerOSX.cfg (contents listed above)
--- jh.jar
-- MacOS (Directory)
--- RanchManagerOSX (executable)
--- lib packager.dylib
```
Any assistance getting this application working would be greatly appreciated.
**Note: upgrading java versions isn't an option since the application is currently being rewritten in .NET MAUI with a release date (tentative) of Q3 2025.
I've changed the classpath multiple times as well as the order of items in the classpath, I can run the jar directly without issues but the launcher script (RanchManagerOSX) keeps throwing the error.
RESOLUTION: The spaces added to the classpath were causing the error. Once they were removed (i.e. $APPDIR/Java/jhall.jar:$APPDIR/Java/rmHelp.jar etc the issue was resolved.