Home » Category » Java Miscellaneous

Java Miscellaneous: java 2D API Graphics?demorunner bug?

300| Wed, 19 Sep 2007 21:00:00 GMT| proubekas| Comments (6)
I just bought the book java 2D API Graphics?by Vincent J. Hardy. I am having a problem running the emorunner?GUI application. The error message I get for all the examples is could not start Demo: Create Process: runsnippet xxx error=2?where xxx is the demo I am trying to run. If I invoke the command line unsnippet?for the examples it works. I have tried a 1.3 and a 1.4 JVM same error. Unlike most books this one does not seem to have a web site. Has anyone else run into this problem?

Keywords & Tags: java, 2d, api, graphics, demorunner, bug

URL: http://java.itags.org/java-tech/99608/
 
«« Prev - 6 helpful answers below.
Running under WinME I start demorunner.bat, get a file tree of demo programs, click on one of them and get:Could not start demo: CreateProcess: runsnippet HelloRenderingModel error=0So yes, the same thing happens to me to. I've checked my paths and they seem OK.Dane

east75th | Sat, 07 Jul 2007 02:40:00 GMT |

I found a page on the web for the book.

http://developer.java.sun.com/developer/Books/2dgraphics/

Unfortunately the new .jar does not fix the problem we are having. I am on Windows 2000. What are you using? What gets me steamed is that the readme.txt in the updated .jar has two of the author's email addresses. But when I try to send him a email it gets rejected on both of them. The error is "unknown user". How unhelpfull can one get? It's one thing to not help me debug my own code, which I am sure so people have tried to get Vincent to do, but it another thing entirely to ask him to fix his own bugs.

proubekas | Sat, 07 Jul 2007 02:40:00 GMT |

Are you referring to the OS? I'm using WinME.

Because it's the only learning resource for 2D graphics, you'd think Sun would have posted a fix long ago.

What irks me about the 2D support is that it's weak on operating on the individual color channels (LookupOp.filter() works only on all three) and the few types of graphics files (jpg and GIF only) supported.

east75th | Sat, 07 Jul 2007 02:40:00 GMT |

I had the same problems but actually managed to get a reply back from Vincent Hardy - he sent me an updated batch file for Win 2000 - but it still gives the same problems!

johnjsmith | Sat, 07 Jul 2007 02:40:00 GMT |

John J. Smith

Would you be willing to post the fix to this thread? Maybe, just maybe, I can compare what Vincent sent you, and what is on the CD, and the Web updates, and try to figure out what fix Vincent was trying to implement. If I can figure that out, maybe I can find where the fix goes wrong and fix the fix! I would then post it in this thread for the good of all.

TIA

proubekas | Sat, 07 Jul 2007 02:40:00 GMT |

No problem. Here's what Vincent sent me (demorunner.bat):

java -classpath .;c:\glf\glf.jar DemoRunner

demos.properties

================

script.Windows_2000=runsnippet.bat

script.Windows_NT=runsnippet.bat

script.Windows_95=runsnippet.bat

script.Windows_98=runsnippet.bat

script.Windows_Me=runsnippet.bat

script.Windows_XP=runsnippet.bat

All_Demos=Part_I Part_II Part_III

Part_I=Chapter_01 Chapter_02 Chapter_03 Chapter_04 Chapter_05

Chapter_01=HelloRenderingModel

Chapter_02=ShapeRendering SimpleTextRendering SimpleTextLayoutRendering

ImageLoad FontAttribute CompositeAttribute AffineTransformAttribute

StrokeAttribute PaintAttribute RenderingHintsAttribute ClipAttribute

Chapter_03=ScreenRendering PrinterRendering OffscreenBufferRendering

Chapter_04=ShapeUsage ShapeClasses DukeShapeDemo CMYKSave ImageFilters

StyledTextRendering JustifiedTextBlock CustomGlyphLayout

Chapter_05=AffineTransformTypes BasicStrokeControls PaintTypes

ColorTransparency TexturePaintControls FontLister FontFlip

AlphaCompositeRules ClippingUsage

Part_II=Chapter_06 Chapter_07 Chapter_08 Chapter_09

Chapter_06=HelloLayers

Chapter_07=UsingLayers LayerMarginsUsage AnchorPlacement

AdjustedAnchorPlacement AnchorPlacementTransform EiffelFill EiffelStroke

EiffelComposite TextLayerControls ImagePlacement HelloLayersReuse

CombiningLayers

Chapter_08=UsingCompositionComponent

Chapter_09=GradientPaintExtUsage RadialGradientPaintUsage

RadialGradientPaintExtUsage CompositeStrokeUsage ControlStrokeUsage

ShapeStrokeUsage WaveStrokeUsage TextStrokeUsage ColorCompositeUsage

LightOpUsage1 LightOpUsage2 LightOpUsage3 SpotLightUsage LightOpUsage4

ElevationMapUsage LightOpUsage5 GetSunLightUsage GetSpotLightUsage

GetLightRampUsage GetHotSpotLightRampUsage ToneAdjustmentOpUsage

WaveTransformUsage BumpTransformUsage

Part_III=Chapter_11 Chapter_12 Chapter_13 Chapter_14 Chapter_15

Chapter_16 Chapter_17

Chapter_11=ImageDropShadowComposition ShadowsComposition

ShapeCastShadowComposition TextRecessedShadowComposition

Chapter_12=BacklitGlowMenuComposition BacklitGlowMenuCompositionOff

NeonGlowMenuComposition NeonGlowMenuCompositionCold

Chapter_13=LightPaintingComposition

Chapter_14=CircularLayoutComposition TriangularLayoutComposition

ShapeLayoutComposition GlyphDecorationComposition

Chapter_15=PostCardComposition

Chapter_16=BarComposition CylinderComposition SphereComposition

VolumeComposition

Chapter_17=BrushedMetal RecessedShadow ShadowStandOut GLFWebDemoTwo

GLFWebDemoOne TextFlowers SoftFocus SunSet ShapeSplatter LookupParts

Lights

AffineTransformAttribute.exec=imageSnippet

AffineTransformTypes.exec=noArguments

AlphaCompositeRules.exec=noArguments

BasicStrokeControls.exec=noArguments

ClipAttribute.exec=noArguments

ClippingUsage.exec=imageSnippet

CMYKSave.exec=cmykSave

CMYKSave.params=vango09CMYK.jpg true

ColorTransparency.exec=colorTransparency

CompositeAttribute.exec=imageSnippet

CustomGlyphLayout.exec=glyphLayoutSnippet

DukeShapeDemo.exec=noArguments

FontAttribute.exec=noArguments

FontFlip.exec=noArguments

FontLister.exec=noArguments

FontTransform.exec=noArguments

HelloRenderingModel.exec=noArguments

ImageFilters.exec=imageSnippet

ImageLoad.exec=imageSnippet

JustifiedTextBlock.exec=textBlock

OffscreenBufferRendering.exec=offscreenSnippet

OffscreenBufferRendering.params=vangoWithBorder.jpg

PaintAttribute.exec=noArguments

PaintTypes.exec=imageSnippet

PrinterRendering.exec=imageSnippet

RenderingHintsAttribute.exec=noArguments

ScreenRendering.exec=imageSnippet

ShapeClasses.exec=noArguments

ShapeRendering.exec=noArguments

ShapeUsage.exec=noArguments

SimpleTextLayoutRendering.exec=noArguments

SimpleTextRendering.exec=noArguments

StrokeAttribute.exec=noArguments

StyledTextRendering.exec=fontSnippet

TexturePaintControls.exec=textureSnippet

rem

rem Part II code samples

rem

rem Chapter 1

HelloLayers.exec=compositionFactory

rem Chapter 2

UsingLayers.exec=textCompositionFactory

LayerMarginsUsage.exec=compositionFactory

AnchorPlacement.exec=anchorPlacement

AdjustedAnchorPlacement.exec=anchorPlacement

AnchorPlacementTransform.exec=anchorPlacement

EiffelFill.exec=noArguments

EiffelStroke.exec=noArguments

EiffelComposite.exec=noArguments

TextLayerControls.exec=textCompositionFactory

ImagePlacement.exec=textCompositionFactory

HelloLayersReuse.exec=compositionFactory

CombiningLayers.exec=textCompositionFactory

rem Chapter 3

UsingCompositionComponent.exec=noArguments

rem Chapter 4

GradientPaintExtUsage.exec=noArguments

RadialGradientPaintUsage.exec=noArguments

RadialGradientPaintExtUsage.exec=noArguments

CompositeStrokeUsage.exec=noArguments

ControlStrokeUsage.exec=noArguments

ShapeStrokeUsage.exec=noArguments

WaveStrokeUsage.exec=noArguments

TextStrokeUsage.exec=noArguments

ColorCompositeUsage.exec=colorCompositeUsage

LightOpUsage1.exec=imageSnippet

LightOpUsage2.exec=imageSnippet

LightOpUsage3.exec=lightOpUsage3

SpotLightUsage.exec=compositionFactory

LightOpUsage4.exec=lightOpUsage4

ElevationMapUsage.exec=textCompositionFactory

LightOpUsage5.exec=lightOpUsage5

GetSunLightUsage.exec=textCompositionFactory

GetSpotLightUsage.exec=textCompositionFactory

GetLightRampUsage.exec=textCompositionFactory

GetHotSpotLightRampUsage.exec=textCompositionFactory

ToneAdjustmentOpUsage.exec=textCompositionFactory

WaveTransformUsage.exec=noArguments

BumpTransformUsage.exec=noArguments

rem

rem Part III code samples

rem

rem Chapter 2

ImageDropShadowComposition.exec=ch2TextCompositionFactory

ShadowsComposition.exec=ch2TextCompositionFactory

ShapeCastShadowComposition.exec=ch2TextCompositionFactory

TextRecessedShadowComposition.exec=ch2TextCompositionFactory

rem Chapter 3

BacklitGlowMenuComposition.exec=ch3TextCompositionFactory

BacklitGlowMenuCompositionOff.exec=ch3TextCompositionFactory

NeonGlowMenuComposition.exec=ch3TextCompositionFactory

NeonGlowMenuCompositionCold.exec=ch3TextCompositionFactory

rem Chapter 4

LightPaintingComposition.exec=ch4TextCompositionFactory

rem Chapter 5

CircularLayoutComposition.exec=ch5TextCompositionFactory

TriangularLayoutComposition.exec=ch5TextCompositionFactory

ShapeLayoutComposition.exec=ch5TextCompositionFactory

GlyphDecorationComposition.exec=ch5TextCompositionFactory

rem Chapter 6

PostCardComposition.exec=ch6TextCompositionFactory

rem Chapter 7

BarComposition.exec=ch7TextCompositionFactory

CylinderComposition.exec=ch7TextCompositionFactory

SphereComposition.exec=ch7TextCompositionFactory

VolumeComposition.exec=ch7TextCompositionFactory

noArguments=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET%

offscreenSnippet=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% res/images/snippets/vango09.jpg %2%

imageSnippet=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% res/images/snippets/vango09.jpg

textureSnippet=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% res/images/snippets/texture.jpg

colorTransparency=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% res/images/snippets/syberia30.jpg

cmykSave=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.CMYKSave res/misc/cmyk.pf

res/images/snippets/vango09.jpg %2% true

fontSnippet=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% serif 30

glyphLayoutSnippet=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% serif CrossWords

textBlock=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.JustifiedTextBlock res/text/apidoc.txt serif 30

500

ch2TextCompositionFactory=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.util.CompositionStudio

res/com/sun/glf/beans/ch2/%SNIPPET%.ser.txt

ch3TextCompositionFactory=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.util.CompositionStudio

res/com/sun/glf/beans/ch3/%SNIPPET%.ser.txt

ch4TextCompositionFactory=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.util.CompositionStudio

res/com/sun/glf/beans/ch4/%SNIPPET%.ser.txt

ch5TextCompositionFactory=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.util.CompositionStudio

res/com/sun/glf/beans/ch5/%SNIPPET%.ser.txt

ch6TextCompositionFactory=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.util.CompositionStudio

res/com/sun/glf/beans/ch6/%SNIPPET%.ser.txt

ch7TextCompositionFactory=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.util.CompositionStudio

res/com/sun/glf/beans/ch7/%SNIPPET%.ser.txt

textCompositionFactory=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.util.CompositionStudio

res/com/sun/glf/beans/%SNIPPET%.ser.txt

compositionFactory=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.util.CompositionStudio com.sun.glf.snippets.%SNIPPET%

anchorPlacement=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% res/images/snippets/syberia84.jpg

colorCompositeUsage=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% res/images/snippets/vango09.jpg 255 0 0

lightOpUsage3=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% res/images/snippets/vango09.jpg 1.5

res/images/snippets/elevationMap.jpg

lightOpUsage4=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% doNotUseFile 4

res/images/snippets/elevationMap.jpg

lightOpUsage5=java -Dcom.sun.glf.getAllFonts=true

com.sun.glf.snippets.%SNIPPET% res/images/snippets/elevationMap.jpg

johnjsmith | Sat, 07 Jul 2007 02:40:00 GMT |

Java Miscellaneous Hot Answers

Java Miscellaneous New questions

Java Miscellaneous Related Categories