2
votes

i got an issue suddenly while running my Codename one project,

com.codename1.impl.javase.Simulator class wasn't found in project i clean & build the project multiple times and also restarted the netbeans but issue is still there.

also i didn't change the class path or anything and other projects are working fine,

any one can help please,

Running Results: enter image description here

Compiling Properties: enter image description here

Run Properties: enter image description here

Project Properties : enter image description here

enter image description here Build output:

ant -f E:\\Cross_Platform_Course\\NetBeansProjects\\Kaizen-Gate -Dnb.internal.action.name=build jar
No GUI Entries available
init:
deps-jar:
Created dir: E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build
Updating property file: E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build\built-jar.properties
Created dir: E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build\classes
Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
        code size and wider device support
Created dir: E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build\tmp
Compiling 3 source files to E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build\tmp
Created dir: E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build\empty
Created dir: E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build\generated-sources\ap-source-output
Compiling 3 source files to E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build\classes
Copying 1 file to E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build\classes
compile:
Created dir: E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\dist
Copying 1 file to E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\build
Not copying library E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\override , it's a directory.
Not copying library E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\lib\impl\cls , it's a directory.
Not copying library E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\lib\impl\stubs , it's a directory.
Not copying library E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\native\internal_tmp , it's a directory.
Copy libraries to E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\dist\lib.
Cannot fix dependencies for: E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\dist\lib\JavaSE.jar
Building jar: E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\dist\Kaizen-Gate.jar
To run this application from the command line without Ant, try:
java -jar "E:\Cross_Platform_Course\NetBeansProjects\Kaizen-Gate\dist\Kaizen-Gate.jar"
jar:
BUILD SUCCESSFUL (total time: 1 second)
1
Please provide your build log together with the question - simme
Build log updated with question, the issue while run i got popup that there is no main class. - Hesham Mohamed
Well then, is there? Do you have an accessible main method? - simme
it's a codename one project , so the main class is automatically generated , i have MyApplication.java class that have the init(), start(), stop() methods. - Hesham Mohamed

1 Answers

0
votes

The class is defined in JavaSE.jar which is in the root of the project. If you changed or removed that jar or changed the classpath from the default which should look like the screenshots below this will happen:

enter image description here

Notice JavaSE.jar is mentioned below. The presence and order of the entries is important.

enter image description here

The run section should look like this, notice that the main class of your application should be in the arguments section

enter image description here