Forte cant find classes !?! HELP !

WHen I compile a simple program that imports javax.microedition.lcdui.*;

I get error messages saying:

example/About.java [21:1] package javax.microedition.lcdui does not exist

import javax.microedition.lcdui.*;

example/About.java [52:13] cannot resolve symbol

symbol : class Displayable

location: class example.About

private Displayable previous; // the previous screen to go back to

example/About.java [60:34] cannot resolve symbol

symbol : class Display

location: class example.About

public static void showAbout(Display display) {

example/About.java [62:2] cannot resolve symbol

symbol : class Alert

location: class example.About

Alert alert = new Alert("About MIDP");

example/About.java [62:20] cannot resolve symbol

symbol : class Alert

location: class example.About

Alert alert = new Alert("About MIDP");

example/About.java [63:19] cannot resolve symbol

symbol : variable Alert

location: class example.About

alert.setTimeout(Alert.FOREVER);

example/About.java [70:10] cannot resolve symbol

symbol : class Image

location: class example.About

Image image = Image.createImage(icon);

example/About.java [70:24] cannot resolve symbol

symbol : variable Image

location: class example.About

Image image = Image.createImage(icon);

8 errors

Errors compiling About.

How can I resolve this problem ?!?! I need help, since I cant compile anything with forte as it is now :((

[1606 byte] By [DanielHellstrand] at [2007-11-25 8:18:10]
# 1

This little program:

import java.io.*;

import javax.microedition.midlet.*;

public class testclass {

public testclass() {

System.out.println("Tjoho");

}

}

Generate this error:

testclass.java [2:1] package javax.microedition.midlet does not exist

import javax.microedition.midlet.*;

^

1 error

Errors compiling testclass.

Why cant Forte 4 ME find the classes ?!?! (as you can se it can without problem find java.io.*, but not the midlet related classes).

Daniel Hellstrand at 2007-7-1 14:27:01 > top of Java-index,Development Tools,Java Tools...
# 2
The strange thing is that it works fine to compile it with WTK (separatly installed) or directly in a DOS windows... Does anyone have a clue !?!?!
Daniel Hellstrand at 2007-7-1 14:27:01 > top of Java-index,Development Tools,Java Tools...
# 3

I kinda went throw a similar problem,

I just had to make sure that all jar/zip files and paths are included in the classpath.

1) first check the output in your IDE and see if it includes the correct classpath in the execution command, for instance you should see

C:\j2sdk1.4.0_02\bin\javac <other options here> -classpath .... {should include all of your zip/jar files here} ... myfile.java

go to Tools->options->building->External Compiler and in the expert tab, add the jar/zip files in the class path.

I hope that will help!

706565 at 2007-7-1 14:27:01 > top of Java-index,Development Tools,Java Tools...
# 4

I think these two FAQs might have a solution to your problem:

Why can't I compile my MIDP program?

http://forte.sun.com/cgi-bin/WebX?14@80.Kzfya1ilj8j.0@.ee7d9f9

Accessing MIDP packages (javax.microedition.midlet.* etc)

http://forte.sun.com/cgi-bin/WebX?14@80.Kzfya1ilj8j.0@.ee7a1fb

-M

Moazam Raja at 2007-7-1 14:27:01 > top of Java-index,Development Tools,Java Tools...