Solved

Can't load standard profile: PYCC.pf.

Posted on 2011-03-01
3
986 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

724 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