I have a file myClass.java that contains a class like this:
Expand|Select|Wrap|Line Numbers
- import mylibrary;
- public class myClass {
- .............................
- }
Expand|Select|Wrap|Line Numbers
- //main:
- try {
- Class c = Class.forName( "\\src\\mylibrary\myClass.java" ) ;
- Object o = c.newInstance() ;
- } catch ( ClassNotFoundException e ) {
- e.printStackTrace() ;
- }
I'm not used to loadClass but it's strange to me. Any hints?
thanks