Solved

java problem

Posted on 2002-06-05
15
194 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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.

746 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

12 Experts available now in Live!

Get 1:1 Help Now