Please Help. NetBeans IDE Problem + rt.jar. Trouble compiling MIDlets.
Hi all. For the past few weeks I have undertaken learning Java for mobile devices. I am having a slight problem with NetBeans 5.5 which I would appreciate help in fixing.
Currently installed on my system:-
- Wireless Toolkit 2.5
- NetBeans IDE 5.5 + Mobility Pack
- j2sdk1.4.2_13
- jdk1.6.0
- jre1.6.0
- javaee sdk5_02
(So pretty much every Java application!)
Now the problem. Basically, if I import the following at the beginning for my MIDlet...
import java.io.*;
import java.text.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
... thejava.sql has red line underneath saying "package does not exist". Now, what I found is that I need to import .jar files into the Library section. I managed to fix the javax.servlet package and some others, by importing the correct .jar files, but I found that to remove the red line for java.sql I needrt.jar.
However, this is located under one of my jre folders and not the j2me / jdk folders I have. Even though it removes the red line, when I compile the project I keep receiving "PREVERIFY" errors and "CONSTANT POOL" errors.
Yet, if I remove thert.jar file, these go away, but it won't compile then because it says the package is missing (back to square one!).
So, any ideas please? I have spent days and days just adding random .jar files to try and fix the problem but to no avail. An example of current imported .jar files in NetBeans:-
- rt.jar
- midpapai.zip
- jdbc.jar
- servlet.jar
- runtime12.jar
- classes12.jar
- ojdbc.jar
Try not to be too technical, I've only just started out. Lol. Thanks in advance!!

