html package issue (from Stack Overflow)

42 views
Skip to first unread message

Angelo Maci

unread,
Jul 24, 2020, 2:46:40 AM7/24/20
to CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA
IntelliJ IDEA 2020.1.3 (Community Edition)
Build #IC-201.8538.31, built on July 7, 2020
Runtime version: 11.0.7+10-b765.64 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-42-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 949M
Cores: 4
Non-Bundled Plugins: com.codename1.plugin.intellij, org.jetbrains.kotlin
Current Desktop: ubuntu:GNOME

In regard to this SO question and the comments

I continue here, as the chat there is off-topic. The zipped project is 

Thanks in advance

Shai Almog

unread,
Jul 25, 2020, 1:38:13 AM7/25/20
to CodenameOne Discussions
Are you using IntelliJ or NetBeans?

Angelo Maci

unread,
Jul 25, 2020, 5:22:48 AM7/25/20
to CodenameOne Discussions
As you also can see in my original post:

IntelliJ IDEA 2020.1.3 (Community Edition)
Build #IC-201.8538.31, built on July 7, 2020
Runtime version: 11.0.7+10-b765.64 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-42-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 949M
Cores: 4
Non-Bundled Plugins: com.codename1.plugin.intellij, org.jetbrains.kotlin
Current Desktop: ubuntu:GNOME


Shai Almog

unread,
Jul 25, 2020, 10:07:11 PM7/25/20
to CodenameOne Discussions
OK, I think that might be the crux of it. There might be an IntelliJ specific bug for this specific feature. Please file an issue here: https://github.com/codenameone/CodenameOne/issues/
and highlight that this is happening with an Intellij project. We'll look into it.

Angelo Maci

unread,
Jul 27, 2020, 2:38:34 AM7/27/20
to CodenameOne Discussions
Issue filed:
https://github.com/codenameone/CodenameOne/issues/3187
I would like to know if there is a workaround for testing the app in the meantime. Thanks

Shai Almog

unread,
Jul 27, 2020, 10:40:10 PM7/27/20
to CodenameOne Discussions
If I recall correctly the simulator needs to have the html directory in the classpath as a special case. Notice that this should still work for device builds regardless.
You can also open and run the project under NetBeans and that should work too although you might need to comment out a few things such as the Kotlin support in the build XML.

Angelo Maci

unread,
Jul 28, 2020, 5:47:49 AM7/28/20
to CodenameOne Discussions
Excuse me, how could I create the special html folder that the simulator wants? Where should it be on the filesystem?

Shai Almog

unread,
Jul 28, 2020, 10:30:42 PM7/28/20
to CodenameOne Discussions
It would be in the same place under src as a package. The problem is it isn't in the classpath of InterlliJ IDEA.So the workaround is to change the classpath which menas editing some of the IDE configurations to add that manually.

Angelo Maci

unread,
Jul 29, 2020, 2:39:21 AM7/29/20
to CodenameOne Discussions
I found this directory
/home/pc/IdeaProjects/sample/out/production/sample/html
that has the HTML page inside as expected.
You say it is not read from the simulator, if I am not wrong.
So what is the folder that the simulator wants to read? I cannot change or add it whitout knowing it.
thanks

Shai Almog

unread,
Jul 29, 2020, 9:57:21 PM7/29/20
to CodenameOne Discussions
No. The folder should be under your src directory.
It's the html package that we discussed. The classpath should include MY_PROJECT/src/html

Angelo Maci

unread,
Jul 30, 2020, 4:12:13 AM7/30/20
to CodenameOne Discussions
I cannot find the right settings in IntelliJ Idea IDE to add the folder path.
In the output I see this line
/usr/lib/jvm/java-11-openjdk-amd64/bin/java -Xms128m -Xmx981m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -XX:CICompilerCount=2 -Dsun.io.useCanonPrefixCache=false -Djdk.http.auth.tunneling.disabledSchemes=\"\" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djdk.attach.allowAttachSelf=true -Dkotlinx.coroutines.debug=off -Djdk.module.illegalAccess.silent=true -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine -Dsun.tools.attach.tmp.only=true -Dsun.awt.disablegrab=true -javaagent:/home/pc/sviluppo/idea-IC-201.7223.91/lib/idea_rt.jar=40775:/home/pc/sviluppo/idea-IC-201.7223.91/bin -Dfile.encoding=UTF-8 -classpath /home/pc/IdeaProjects/sample/out/production/sample:/home/pc/IdeaProjects/sample/src:/home/pc/IdeaProjects/sample/lib/CodenameOne.jar:/home/pc/IdeaProjects/sample/JavaSE.jar:native/internal_tmp:lib/impl/cls com.codename1.impl.javase.Simulator com.codename1.samples.sample

I think I should add the path to that classpath option but I cannot, no useful instructions on the web.

I created a new command manually like
/usr/lib/jvm/java-11-openjdk-amd64/bin/java -Xms128m -Xmx981m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -XX:CICompilerCount=2 -Dsun.io.useCanonPrefixCache=false -Djdk.http.auth.tunneling.disabledSchemes=\"\" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Djdk.attach.allowAttachSelf=true -Dkotlinx.coroutines.debug=off -Djdk.module.illegalAccess.silent=true -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine -Dsun.tools.attach.tmp.only=true -Dsun.awt.disablegrab=true -javaagent:/home/pc/sviluppo/idea-IC-201.7223.91/lib/idea_rt.jar=40775:/home/pc/sviluppo/idea-IC-201.7223.91/bin -Dfile.encoding=UTF-8 -classpath /home/pc/IdeaProjects/sample/out/production/sample:/home/pc/IdeaProjects/sample/src:/home/pc/IdeaProjects/sample/src/html:/home/pc/IdeaProjects/sample/lib/CodenameOne.jar:/home/pc/IdeaProjects/sample/JavaSE.jar:native/internal_tmp:lib/impl/cls com.codename1.impl.javase.Simulator com.codename1.samples.sample
(as you can see I added the path manually)

But I get the same "File not found error" again.

Reasonably, how long could the above mentioned issue take to be fixed?

Shai Almog

unread,
Jul 30, 2020, 10:45:00 PM7/30/20
to CodenameOne Discussions
It should be under the native IDE project settings which is accessible in the right click menu.
Reply all
Reply to author
Forward
0 new messages