• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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