Solved

Can't load standard profile: PYCC.pf.

Posted on 2011-03-01
3
977 Views
Last Modified: 2012-05-11
hi

i am new to JAVA.

I am writing code for a project which requires me to convert an image to grayscale. For which i am using this code

public static BufferedImage convertToGrayscale(BufferedImage source) {
     BufferedImageOp op = new ColorConvertOp(
      ColorSpace.getInstance(ColorSpace.CS_GRAY), null);
     return op.filter(source, null);
}


It works well so long as i am in development mode (using netbeans), but when i build and try to run the .jar, i get the error that PYCC.pf can't load.

From what i ahve read around apparently this file is delibrately not included in JRE although its there in the JDK.

Q: How to i include this file for distribution with my 'compiled' .jar ?
0
Comment
Question by:young_buddha
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
Dejan Pažin earned 500 total points
ID: 35011681

Which version of java are you using? There was a bug with this in java 1.4:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4668557

In 1.6 the file is in the jre.
0
 

Author Comment

by:young_buddha
ID: 35014800
Hi

i installed 1.6 and it works now, thanks.

But how do i ensure that the users will have 1.6 installed on their systems ??

0
 
LVL 17

Expert Comment

by:Dejan Pažin
ID: 35014854


Usually applications state system requirements in the readme file.

You can also check the version of java at application start in the main method and if the version is not 1.6 display instructions on how to download 1.6 or how to fix the missing jar bug.
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
groupNoAdj 7 85
jar file executable 12 39
Arrays.asList  VS  ArrayList 4 44
Groovy problem when using SOAPUI : DispatchException occurred 7 27
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 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…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

911 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

17 Experts available now in Live!

Get 1:1 Help Now