Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Trouble creating JPEG with Java Servlet

Trouble creating JPEG with Java Servlet
Thread Tools
Fresh-Faced Recruit
Join Date: Aug 2000
Status: Offline
Reply With Quote
Jun 7, 2001, 07:14 PM
 
I am trying to compile a Java Servlet that creates a JPEG on the fly. I am using ProjectBuilder. I've added <font face = "courier"> JavaVM.framework</font> to my project.

The class i'd like to use is <font face = "courier">com.sun.image.codec.jpeg.*</font>

I see that it is in ui.jar located at /System/Library/Frameworks/JavaVM.framework/Classes/ui.jar

I am using the following line to access the class:
<font face = "courier">import com.sun.image.codec.jpeg.*;</font>

ProjectBuilder says "cannot resolve symbol" when I try to compile the code.

Does anyone have any suggestions? Thanks.
     
Dedicated MacNNer
Join Date: Aug 1999
Status: Offline
Reply With Quote
Jun 7, 2001, 09:36 PM
 
Try adding that jar to your project. That's what I did with servlet.jar and it works fine...
     
webhead  (op)
Fresh-Faced Recruit
Join Date: Aug 2000
Status: Offline
Reply With Quote
Jun 7, 2001, 10:07 PM
 
Originally posted by MadBrowser:
<STRONG>Try adding that jar to your project. That's what I did with servlet.jar and it works fine...</STRONG>
Unfortunately adding ui.jar does not solve the problem.

Any other ideas out there?

Thanks.
     
Dedicated MacNNer
Join Date: Apr 2001
Location: San Francisco, USA
Status: Offline
Reply With Quote
Jun 7, 2001, 11:10 PM
 
Originally posted by webhead:
<STRONG>Unfortunately adding ui.jar does not solve the problem.</STRONG>
  • Select your target.
  • Navigate to the second tab entitled Build Settings.
  • Under the Search Paths section, highlight Java Classes and press return.
  • Enter the path /System/Library/Frameworks/JavaVM.framework/Classes/ui.jar
  • Build your project.

This works for me. I was able to import the jpeg package and use the JPEGCodec class with no problems.

HTH
     
webhead  (op)
Fresh-Faced Recruit
Join Date: Aug 2000
Status: Offline
Reply With Quote
Jun 8, 2001, 01:19 PM
 
Originally posted by honeydew:
<STRONG>
  • Select your target.
  • Navigate to the second tab entitled Build Settings.
  • Under the Search Paths section, highlight Java Classes and press return.
  • Enter the path /System/Library/Frameworks/JavaVM.framework/Classes/ui.jar
  • Build your project.

This works for me. I was able to import the jpeg package and use the JPEGCodec class with no problems.

HTH</STRONG>
Thanks for the quick tutorial on how to add classes to Project Builder. Everything works fine now.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:48 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2