• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

java problem

hi,
C:\>javac PrintExample.java
PrintExample.java:2: package javax.print not exist
import javax.print.*;
^
PrintExample.java:3: package javax.print.attribute not exist
import javax.print.attribute.*;
^

how can I solve this problem?

Thanks.
Stanley
0
klnhk
Asked:
klnhk
  • 6
  • 5
  • 3
  • +1
1 Solution
 
OviCommented:
what JDK are you using ?
0
 
OviCommented:
there is only java.awt.print
0
 
objectsCommented:
Try removing those two lines as they are invalid.

Can you post the complete code.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
girionisCommented:
 Download the latest JDK1.4 Java 2 Platform Standard Edition and try again. I think the javax.print package is available only in the latest edition.

  As Ovi pointed out it would also help us if you tell us what version of JDK you are using.

  Hope it helps.
0
 
oraelbisCommented:
I check my JDK1.3.1 for javax.print package, and not find it there. On Sun web site, here is links only from 1.4.0 version. Qirionis give right answer.
0
 
girionisCommented:
 oraelbis if you think my comment was of use and help to you, you could award the points to me :-)
0
 
OviCommented:
I use JDK1.4 and there is no trace of javax.print package. Take a look again ...
0
 
OviCommented:
... perhaps as a separate jar file ? Please post the link from Sun.
0
 
OviCommented:
Indeed there is such a package, but I cannot access'it&use'it.
0
 
girionisCommented:
I did not know it existed too until oraelbis posted the question and had a look at Sun's site. I do not know if it offers any special features that the java.awt.print does not offer but I guess since it's there it has to offer something new.
0
 
girionisCommented:
>I did not know it existed too until oraelbis posted the question and had a look at Sun's site

  Sorry I meant when klnhk posted his original question. I got confused who asked it. My apologies again.
0
 
OviCommented:
It exist but I don't know why it cannot be used (imported).
0
 
objectsCommented:
I'm guessing cause Stanley's not using 1.4.
0
 
girionisCommented:
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area that this question is:

- points to girionis

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 6
  • 5
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now