9

there is an error in all my javax header file "package javax. does not exist" here is an image.

enter image description here

COD3BOY
  • 11,964
  • 1
  • 38
  • 56
Rajesh
  • 91
  • 1
  • 2
  • 6

6 Answers6

3

Try to add the library Persistence (JPA 2.1) in your folder Libraries.
To do this: Left-click Libraries->Add Library...->select Persistence (JPA 2.1)

Félix LD
  • 372
  • 1
  • 5
  • 19
1

It is easy, I was facing the same issue and fixed in this way:

  1. File -> New File -> Persistence -> New Persistence UNIT

Here you need to select your desire package from drowpdown list and click ok. It will add EclipsLink in library folder which has the package javax.

enter image description here

flik
  • 3,433
  • 2
  • 20
  • 30
1

Netbeans 6.9.1 already has Java ME SDK 3.0. Just check the Emulator Platform in the properties of your application. If there is no emulator platform just download the sun java toolkit or Java ME SDK 3.0 and then integrate with Java platform on your netbeans IDE.

icedwater
  • 4,701
  • 3
  • 35
  • 50
bharath
  • 14,283
  • 16
  • 57
  • 95
1

Download one of the jar file from the following link and store it in your local machine :

http://www.jarfinder.com/index.php/java/info/javax.obex.Operation

Now follow the given steps in the following link to add that jar file into your project.

http://gpraveenkumar.wordpress.com/2009/06/17/abc-to-import-a-jar-file-in-netbeans-6-5/

This should resolved your errors.

Nirmal
  • 4,789
  • 13
  • 72
  • 114
  • No need add external `jar` for Java ME application. Just need to add the Java ME platform. I think he missed that. – bharath Sep 12 '11 at 11:58
0

The error message says: package javax.obex does not exist. This means you are missing a library (JAR file). Add the JAR file to your project. In Eclipse you can do that by right-clicking the project, selecting Properties, then Java Build Path, Libraries. Click "Add JARs" or "Add External JARs" to add the relevant JAR file to your project.

This JAR file most likely has something to do with bluetooth. You can download an interface JAR from here, but you most likely need an implementation JAR also.

Jesper
  • 202,709
  • 46
  • 318
  • 350
  • Jesper, Look the image clearly. `javax.microedition` also showing error. This error might be a platform configuration issue. – bharath Sep 12 '11 at 12:01
0

You probably don't have the project libraries properly setup: it looks like you have added the source jar file to your project, not the jar with actual class files.

Femi
  • 64,273
  • 8
  • 118
  • 148