leaningtech / cheerpj-meta

Run Java 8 applications, libraries, applets, Java Web Start, and Oracle Forms on the web without legacy plugins.
https://labs.leaningtech.com/cheerpj
434 stars 21 forks source link

some java classes not parsed correctly #147

Closed ddyer0 closed 1 year ago

ddyer0 commented 2 years ago

This came up while producing a trivial test program, the jar file I produced from command line, embedded in a simple cheerpj shell, mysteriously resulted in a "main class not found" at startup. Debugging that, I found that using a slightly different path to create the .class files, the resulting jar file worked fine. My first thought was that the .class major version was different, but that's not the case.

Error: Could not find or load main class echo.EchoClient

The "bad" version was produced by this compiler G:\share\projects\echo\java>java -version java version "16.0.1" 2021-04-20 java.zip

Java(TM) SE Runtime Environment (build 16.0.1+9-24) Java HotSpot(TM) 64-Bit Server VM (build 16.0.1+9-24, mixed mode, sharing)

marsicplusplus commented 1 year ago

Hi @ddyer0

You need to compile the code using JDK8. CheerpJ does not yet support other versions of Java.

ddyer0 commented 1 year ago

Thanks. As it happens my apps customary build process uses a suitable version of java, and works almost perfectly, so this complaint was strictly "for the record". Good to have it explained.