Solved

java problem

Posted on 2002-06-05
15
225 Views
Last Modified: 2010-03-31
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
Comment
Question by:klnhk
  • 6
  • 5
  • 3
  • +1
15 Comments
 
LVL 9

Expert Comment

by:Ovi
ID: 7055719
what JDK are you using ?
0
 
LVL 9

Expert Comment

by:Ovi
ID: 7055721
there is only java.awt.print
0
 
LVL 92

Expert Comment

by:objects
ID: 7055737
Try removing those two lines as they are invalid.

Can you post the complete code.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Accepted Solution

by:
girionis earned 50 total points
ID: 7055758
 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
 
LVL 3

Expert Comment

by:oraelbis
ID: 7056535
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
 
LVL 35

Expert Comment

by:girionis
ID: 7056770
 oraelbis if you think my comment was of use and help to you, you could award the points to me :-)
0
 
LVL 9

Expert Comment

by:Ovi
ID: 7058598
I use JDK1.4 and there is no trace of javax.print package. Take a look again ...
0
 
LVL 9

Expert Comment

by:Ovi
ID: 7058603
... perhaps as a separate jar file ? Please post the link from Sun.
0
 
LVL 9

Expert Comment

by:Ovi
ID: 7058610
Indeed there is such a package, but I cannot access'it&use'it.
0
 
LVL 35

Expert Comment

by:girionis
ID: 7058716
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
 
LVL 35

Expert Comment

by:girionis
ID: 7058718
>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
 
LVL 9

Expert Comment

by:Ovi
ID: 7058822
It exist but I don't know why it cannot be used (imported).
0
 
LVL 92

Expert Comment

by:objects
ID: 7058834
I'm guessing cause Stanley's not using 1.4.
0
 
LVL 92

Expert Comment

by:objects
ID: 7058836
0
 
LVL 35

Expert Comment

by:girionis
ID: 8834010
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
login jsp example 24 84
throw exception 21 66
Crystal Reports Licensing Questions 4 56
Java syntax, or is it Selenium 6 37
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question