Solved

Can't load standard profile: PYCC.pf.

Posted on 2011-03-01
3
974 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
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.

758 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

15 Experts available now in Live!

Get 1:1 Help Now