Solved

java problem

Posted on 2002-06-05
15
203 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Python Assistance 7 73
Checkbox and ListView in Android Layout 4 56
eclipse shortcuts 9 45
rhino JavaScript import, load 25 67
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now