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

  • proubekas / 300 / Tues, 26 Jan 2010 09:08:00 GMT / 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:

    java, 2d, api, graphics, demorunner, bug

  • http://java.itags.org/java-tech/99608/«« Last Thread -
    1. 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 |

    2. 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 |

    3. 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 |

    4. 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 |

    5. 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 |

    6. 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 Questions

    • Zero replies to a post

      Hi All,How do you feel when there are no replies to your post? ...

      By svenkatesh, 11 Comments

    • Problems displaying PDF file content

      Hello everyone hows it going?I just like to ask a question. Is there anyway to retrieve the contents...

      By andresdelrotti, 1 Comments

    • Zips inside of Zips

      So, I'm trying to write a custom ClassLoader that will load classes from a .jar file inside of a...

      By joelmcnary, 4 Comments

    • zipping of class files/jsp

      iam using GZIPOutputStream to compress the jsps that iam sending as a responsei have achieved 2/3rd ...

      By annapurnamadala, 3 Comments

    • yuo can raed tihs .!

      I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. Thephaonmneal pweor of the hm...

      By chandrasekhar, 7 Comments

    • Is CD-ROM drive accessible through JMF ?

      Hello, I am new to JMF and I would like to know if it can be used to access the cd-rom drive, to che...

      By tabet, 9 Comments

    • invoking a string

      Hi,If a string were to contain the contents of a method. Would it be possible to invoke that method?...

      By jeffersonwillis, 2 Comments

    • Yet another mundane question..

      I was talking to some colleagues who come to office really early, (7-7.30 am), to find out how they ...

      By kayalcox, 10 Comments