Hi,
I'm going round in circles trying to load in a
java file on the Desktop for example.
I am able to do it when the file is inside the application simply with Class.forName(path).newInstance where the path is the package name and class name of file.
For the external file, I have a file at:
C://Users/colin/Desktop/categories/MY_HERO/$o$/MyHero.java
The MyHero.java file begins with the line ( package categories.MY_HERO.$o$; )
And the code I'm using:
But I always get a [java.lang.ClassNotFoundException: categories.MY_HERO.$o$.MyHero] exception
Can anyone diagnose the problem, I have googled several pages, but it hasn't helped.
Thanks for any advise.