Maybe it is happening elsewhere and this is just a strange "reset" procedure. What you know about what could cause the main class to be lost, so to fix it properly? Regards
Il giorno giovedì 4 febbraio 2021 alle 03:48:36 UTC+1 Shai Almog ha scritto: > I have never heard of the main getting lost in that file. I have no idea > how that can happen. > > On Wednesday, February 3, 2021 at 5:01:36 PM UTC+2 P5music wrote: > >> Sorry, maybe that was a wrong string replacement of mine I think. >> >> I think that the problem was that the line >> codename1.description=Myapp app >> that was missing. >> Now it seems to be working... >> >> No, the issue shows up again. >> >> This time indeed I have to remove that line to be able to run again. >> And then I have to restore it...and remove... >> >> But not all the times. It seems that every now and then the main class >> setting is lost somewhere and editing that line fixes it (or maybe just >> editing the file, I cannot check it now). >> >> It is very strange. Maybe you understand what's happening. >> It seems that editing and saving that file is necessary every time the >> main class is lost (why is it lost?). >> Regards >> >> Il giorno mercoledì 3 febbraio 2021 alle 03:50:07 UTC+1 Shai Almog ha >> scritto: >> >>> In the settings you have:: >>> codename1.mainName=MyApp >>> codename1.packageName=com.myapp.app >>> >>> But intellij is running >>> Simulator com.myapp.app.myapp >>> >>> Notice the case difference. It should be either MyApp or myapp but that >>> should be consistent everywhere. >>> >>> On Tuesday, February 2, 2021 at 1:19:57 PM UTC+2 P5music wrote: >>> >>>> So I restored my project but now I get the issue that led to break it >>>> in the first place by messing with .idea folder (bad StackOverflow advice). >>>> >>>> "C:\Program Files\Java\jdk-11.0.2\bin\java.exe" "" >>>> "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition >>>> 2020.3.2\lib\idea_rt.jar=51275:C:\Program Files\JetBrains\IntelliJ IDEA >>>> Community Edition 2020.3.2\bin" -Dfile.encoding=UTF-8 -classpath >>>> C:\Users\user\sviluppo\myapp\out\production\myapp;C:\Users\user\sviluppo\myapp\src;C:\Users\user\sviluppo\myapp\lib\CodenameOne.jar;C:\Users\user\sviluppo\myapp\JavaSE.jar;native\internal_tmp;lib\impl\cls >>>> >>>> com.codename1.impl.javase.Simulator com.myapp.app.myapp >>>> Error: Could not find or load main class >>>> Caused by: java.lang.ClassNotFoundException: >>>> >>>> Process finished with exit code 1 >>>> >>>> The project was in fact recreated and the source files copied, so it is >>>> possible that the main class setting was lost. >>>> I set the src folder as source folder but the issue still persists. >>>> >>>> The iml file seems to have correct entries and so do the xml's in the >>>> .idea folder. See below. >>>> But >>>> manifest.mf says >>>> Manifest-Version: 1.0 >>>> X-COMMENT: Main-Class will be added automatically by build >>>> >>>> see also the manifest below. >>>> >>>> What is to be done in order to fix the issue? >>>> Thanks in advance >>>> >>>> codename_settings.properties >>>> >>>> baseClass=src/generated/StateMachineBase.java >>>> codename1.android.keystore= >>>> codename1.android.keystoreAlias= >>>> codename1.android.keystorePassword= >>>> codename1.arg.ios.newStorageLocation=true >>>> codename1.arg.java.version=8 >>>> codename1.displayName=MyApp >>>> codename1.icon=icon.png >>>> codename1.ios.appid=Q5GHSKAL2F.com.myapp.app >>>> codename1.ios.certificate= >>>> codename1.ios.certificatePassword= >>>> codename1.ios.debug.certificate= >>>> codename1.ios.debug.certificatePassword= >>>> codename1.ios.debug.provision= >>>> codename1.ios.provision= >>>> codename1.ios.release.certificate= >>>> codename1.ios.release.certificatePassword= >>>> codename1.ios.release.provision= >>>> codename1.j2me.nativeTheme=nbproject/nativej2me.res >>>> codename1.languageLevel=5 >>>> codename1.mainName=MyApp >>>> codename1.packageName=com.myapp.app >>>> codename1.rim.certificatePassword= >>>> codename1.rim.signtoolCsk= >>>> codename1.rim.signtoolDb= >>>> codename1.secondaryTitle=MyApp >>>> codename1.vendor=CodenameOne >>>> codename1.version=1.0 >>>> guiResource=theme.res >>>> mainForm=Main >>>> package=generated >>>> userClass=src/userclasses/StateMachine.java >>>> >>>> >>>> myapp.iml >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <module type="CodenameOne.Module" version="4"> >>>> <component name="NewModuleRootManager" inherit-compiler-output="true"> >>>> <exclude-output /> >>>> <content url="file://$MODULE_DIR$"> >>>> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" >>>> /> >>>> </content> >>>> <orderEntry type="jdk" jdkName="11" jdkType="JavaSDK" /> >>>> <orderEntry type="sourceFolder" forTests="false" /> >>>> <orderEntry type="library" scope="PROVIDED" name="Codename One >>>> Libraries" level="project" /> >>>> </component> >>>> </module> >>>> >>>> ant >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <project version="4"> >>>> <component name="AntConfiguration"> >>>> <buildFile url="file://$PROJECT_DIR$/build.xml" /> >>>> </component> >>>> </project> >>>> >>>> misc >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <project version="4"> >>>> <component name="ProjectRootManager" version="2" >>>> languageLevel="JDK_1_8" project-jdk-name="11" project-jdk-type="JavaSDK"> >>>> <output url="file://$PROJECT_DIR$/out" /> >>>> </component> >>>> </project> >>>> >>>> modules >>>> <?xml version="1.0" encoding="UTF-8"?> >>>> <project version="4"> >>>> <component name="ProjectModuleManager"> >>>> <modules> >>>> <module fileurl="file://$PROJECT_DIR$/myapp.iml" >>>> filepath="$PROJECT_DIR$/myapp.iml" /> >>>> </modules> >>>> </component> >>>> </project> >>>> >>> -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/64fef986-7407-4616-a01d-7eea1f5d05e7n%40googlegroups.com.
