how to debug why the jar main class is not loading

I am trying to convert old jnlp client to html format. I followed the documentation and used cheerpjRunMain. But still i am getting could not find or load main class. I am sure i have added the jar under app/.
15 Replies
apignotti
apignotti8mo ago
Can you please share how cheerpjRunMain is being called? Also please check the network tab to make sure the JAR is actually requested via HTTP
Mukesh Nair
Mukesh Nair8mo ago
No jar is not being requested
apignotti
apignotti8mo ago
Then most likely the classpath used in cheerpjRunMain is not correct. Can you share that line?
Mukesh Nair
Mukesh Nair8mo ago
No description
Mukesh Nair
Mukesh Nair8mo ago
I have more than 20 dependency jars but not sure how to add it. Does the method aupport wild cards
apignotti
apignotti8mo ago
/app, not app I think a similar issue happened to another user before, but I've just checked the docs and they look correct to me. Could you help us understand how we could have made the docs more clear?
Mukesh Nair
Mukesh Nair8mo ago
Thats my mistake. I think i created app and thought it would be redirected there. Is there a way to add wildcards for the libraries
apignotti
apignotti8mo ago
No, you need to list the jars explicitly. We are currently working on a Chrome extension to run JNLPs automatically. Consider getting in touch at sales@leaningtech.com for a preview if this is for a commercial project. Also, by mindful that /app/ represents the root of the HTTP server. If the main class still cannot be loaded use the network tab to debug what URL is being loaded.
Mukesh Nair
Mukesh Nair8mo ago
Great thank you One more question is to how to inject jnlp property and extensions I am interested in knowing more about chrome extension i will try contacting sales
apignotti
apignotti8mo ago
About properties, you simple add them to the cheerpjInit call as documented here: https://labs.leaningtech.com/cheerpj2/reference/Runtime-API#javaproperties I am not sure what you mean by jnlp extensions, can you clarify?
Mukesh Nair
Mukesh Nair8mo ago
No description
Mukesh Nair
Mukesh Nair8mo ago
Its part of jnlp syntax
apignotti
apignotti8mo ago
Please understand that I am not a JNLP expert myself, but it seems to me that it just another JNLP file that needs to be expanded and included in the cheerpjInit / cheerpjRunMain command.
Mukesh Nair
Mukesh Nair8mo ago
Sure will try out. Thanks a lot @ap87no
apignotti
apignotti8mo ago
Marking the issue as closed 👍