I’m getting Java code generated for me from an application.
I took the JRE and extracted all the files into a new directory.
There is a META-INF folder that has a MANIFEST.MF without any main method.
Witin this JRE is the class of the code I’m interested in however when I CMD the following…
java Steve.class
I get this error…
Could not load for find Main Class Steve.class.
I’m assuming that somewhere in all these class files there is a Main class but how do I search all these documents to find it? Is there an application?
Thanks!
First: every class that exposes this method signature:
could be a main class launchable from the JVM and eligible to be put in the manifest to enable shell execution.
Second: when you launch a class in a JRE you must specify the fully qualified name of the class; for example if Steve.class file is in a tree structure such as com/mycompany/app, starting from the root of your application where the MANIFEST directory is, you should launch it, from the root directory, typing:
So if Steve exposes a main method and if you can correctly point to it from the root, you can launch it.