Error in File name or class name not found during Automation operation: 'CreateObj​ect'

Hello Team,
When I am trying to execute the below code i am getting the following error. Any help would be greatly appreciated.
Set oFSO = CreateObject("Scripting.FileSystemObject")
If Not oFSO.FolderExists(SavePath) Then
Set f = oFSO.CreateFolder(SavePath)
Else
End If
53 4/11/2014 12:27:22 PM Error:
Error in <NoName(4).VBS> (Line: 9, Column: 1):
File name or class name not found during Automation operation: 'CreateObject'
I have googled through the error and tried to re-register the scrrun.dll using regsvr32 eventhogh it is successfully registered, i am getting the following error. My PC is windows 7 32bit OS.
any help is greatly appreciated.

The following script class will write a log file entry. See if it will run for you.
The script is using a class object that you might not have seen before. A little intro:  The top section is just for testing the class. Normally I just comment this out after the class is working well.  It should run right way. I would save the vbs file in the editor, That way when you are using autoactpath or currentscriptpath variables they will be able resolve the paths.
Paul
Attachments:
LoggingCode_V2.VBS ‏5 KB

Similar Messages

  • Error in Installation--The Java class is not found: SDTGui

    I am in the process of instlaling SAP in AIX machine
    When i start the Startsapinst,  i am getting the following error .
    Pls hlep
    <b>The Java class is not found: SDTGui</b>

    I am using humming bird software
    i have set the display.
    Xclock is running
    Pls help

  • [solved] error: gnome-doc-utils = 0.3.2 not found during configuring

    When configuring libdbusmenu after downloading the PKGBUILD from AUR, I get the following error:
    [tharriso@localhost libdbusmenu]$ makepkg
    ==> Making package: libdbusmenu 12.10.2-1 (Tue Feb 26 21:04:56 CST 2013)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving Sources...
    -> Found libdbusmenu-12.10.2.tar.gz
    ==> Validating source files with md5sums...
    libdbusmenu-12.10.2.tar.gz ... Passed
    ==> Extracting Sources...
    -> Extracting libdbusmenu-12.10.2.tar.gz with bsdtar
    ==> Removing existing pkg/ directory...
    ==> Starting build()...
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking whether NLS is requested... yes
    checking for style of include used by make... GNU
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking dependency style of gcc... gcc3
    checking for intltool >= 0.35.0... 0.50.2 found
    checking for intltool-update... /usr/bin/intltool-update
    checking for intltool-merge... /usr/bin/intltool-merge
    checking for intltool-extract... /usr/bin/intltool-extract
    checking for xgettext... /usr/bin/xgettext
    checking for msgmerge... /usr/bin/msgmerge
    checking for msgfmt... /usr/bin/msgfmt
    checking for gmsgfmt... /usr/bin/msgfmt
    checking for perl... /usr/bin/perl
    checking for perl >= 5.8.1... 5.16.2
    checking for XML::Parser... ok
    checking for library containing strerror... none required
    checking for gcc... (cached) gcc
    checking whether we are using the GNU C compiler... (cached) yes
    checking whether gcc accepts -g... (cached) yes
    checking for gcc option to accept ISO C89... (cached) none needed
    checking dependency style of gcc... (cached) gcc3
    checking whether gcc and cc understand -c and -o together... yes
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for ANSI C header files... yes
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking how to print strings... printf
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking whether the shell understands some XSI constructs... yes
    checking whether the shell understands "+="... yes
    checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for mt... no
    checking if : is a manifest tool... no
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... yes
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... no
    checking whether make supports nested variables... yes
    checking for glib-mkenums... /usr/bin/glib-mkenums
    checking for pkg-config... /home/tharriso/ApeInstalled/External/pkg-config/0.22/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for gtkdoc-check... /usr/bin/gtkdoc-check
    checking for gtkdoc-rebase... /usr/bin/gtkdoc-rebase
    checking for gtkdoc-mkpdf... /usr/bin/gtkdoc-mkpdf
    checking whether to build gtk-doc documentation... no
    checking gnome-doc-utils >= 0.3.2... no
    configure: error: gnome-doc-utils >= 0.3.2 not found
    ==> ERROR: A failure occurred in build().
    Aborting...
    Some things I've tried -
    [tharriso@localhost libdbusmenu]$ pkg-config --modversion gnome-doc-utils
    Package gnome-doc-utils was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gnome-doc-utils.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gnome-doc-utils' found
    [tharriso@localhost libdbusmenu]$ pacman -Q gnome-doc-utils
    gnome-doc-utils 0.20.10-1
    Found a few results on Google where people mention the same error with a different package, but haven't found any solutions.
    Last edited by harro112 (2013-02-26 12:37:33)

    checking for pkg-config... /home/tharriso/ApeInstalled/External/pkg-config/0.22/bin/pkg-config
    current pkg-config version in arch is 0.28-1 , and should be found as /usr/bin/pkg-config .

  • "The java class is not found:"  during cloning

    Hi.
    I've just cloned an 11.5.10.2 environment from one AIX5.2 server running 9.2.0.7 to another server at the same AIX and RDBMS level.
    After running the clone steps, the application was automatically started and I was able to access it via Self Service, forms, run concurrent requests etc - in short, I had a working system.
    Now, however, when I try to stop or start the application using adstrtal.sh/adstpall.sh, I hit the following:
    "The java class is not found: oracle/apps/ad/autoconfig/ServiceControl
    Check logfile /data/testcomn/admin/log/TEST_ireaix2/05011011.log for details"
    On the command line, when I call the line the script is trying to execute:
    /usr/java14/bin/java -classpath "${CLASSPATH}:${JAVA_TOP}:${FND_TOP}/java/3rdparty/stdalone/xmlparserv2.zip" oracle.apps.ad.autoconfig.ServiceControl -e /oracle/testappl/admin/TEST_ireaix2.xml -u apps/starl1ght -m 2 -l yadda –debug
    I'm able to bypass this particular error and some of the application processes do start but not all of them and obviously I still have an underlying Java/environment issue.
    Any suggestions gratefully received.
    Rgds,
    Jes

    May be you should try posting this on an appropriate forum to get a speedier response.
    Regards

  • Feedback file '.\Obj\LabVIEW.fed' not found

    Hi all,
      I am using luminary micro board LM3S8962 and i am using LABVIEW to program the machine when i was trying to run the program i am facing this error
    "Feedback file '.\Obj\LabVIEW.fed' not found". Can anybody help me out to solve this issue. And for your kind information i am just trying the sample programs.
     Regards,
     LENIN.

    Hi Kenny,
    I hope you are doing well today! What is interface 3.vi? Is it possible for you to post your project over here? Also, I would recommend creating a simple DSC application; and would like you to build it. Do you still get errors?
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Why java file name and class name are equal

    could u explain why java file name and class name are equal in java

    The relevant section of the JLS (?7.6):
    When packages are stored in a file system (?7.2.1), the host system may choose to enforce the restriction that it is a compile-time error if a type is not found in a file under a name composed of the type name plus an extension (such as .java or .jav) if either of the following is true:
    * The type is referred to by code in other compilation units of the package in which the type is declared.
    * The type is declared public (and therefore is potentially accessible from code in other packages).
    This restriction implies that there must be at most one such type per compilation unit. This restriction makes it easy for a compiler for the Java programming language or an implementation of the Java virtual machine to find a named class within a package; for example, the source code for a public type wet.sprocket.Toad would be found in a file Toad.java in the directory wet/sprocket, and the corresponding object code would be found in the file Toad.class in the same directory.
    When packages are stored in a database (?7.2.2), the host system must not impose such restrictions. In practice, many programmers choose to put each class or interface type in its own compilation unit, whether or not it is public or is referred to by code in other compilation units.

  • Error in File ****.rpt: The table could not be found in

    Hi ,
    I have a Crystal Report which uses a stored procedure to get it's data.
    The stored procedure has no parameters but it is pretty complex and gives a resultset in the end with a select statement.
    I designed the report in CR 11.5.12.1838.
    The report works perfect in crystal reports designer.
    Unfortunately I am getting an error in Central Management Concsole and InfoView
    The error is:
    Error in File ****.rpt: The table could not be found.
    I am using ODBC connection and I even used to sa credentials to run the report in CMC but had no luck.
    One thing I should mention that the stored procedure name as ;1 in the end.
    I appreciate if you could help me with this report
    Thanks

    The  SQL profiler RPC completed shows:
    exec sp_tables N'My[_]Procedure [_]Name[_]Has[_]Underscores,N'%',NULL,NULL
    and it's variations. Nothing else and that returns no result.
    My procedure name has underscores, I will get rid of that.
    I will recreate my Stored procedure without underscore or any special characters and let you know about the result
    Umit

  • System name for alias GD4_500 not found in portal

    Hi people,
    I want to launch a query from analyzer, but i have the next error message "System name for alias GD4_500 not found in portal".
    What can i do??
    More thanks

    Read,
    http://help.sap.com/saphelp_nw70/helpdata/en/fb/93ed3d72fe4b5ae10000000a11405a/content.htm
    Regards
    Juan

  • SAPinst error:- The java class is not found:  com.sap.engine.offline.Offlin

    Hi,
    I am in the midst of Installing SOLMAN on RHEL5-ORACLE
    Have installed IBM JDK version 1.4.2_10
    During the CREATE SECURE STORE PHASE I am getting the following error:
    sapinst_dev log file O/P
    WARNING[E] 2008-06-09 18:04:43.225
               CJSlibModule::writeError_impl()
    CJS-30050  Cannot create the secure store. SOLUTION: See output of log file SecureStoreCreate.log:
    The java class is not found:  com.sap.engine.offline.OfflineToolStart.
    TRACE      2008-06-09 18:04:43.225 [iaxxejsbas.hpp:483]
               EJS_Base::dispatchFunctionCall()
    JS Callback has thrown unknown exception. Rethrowing.
    TRACE      2008-06-09 18:04:43.243 [syuxctask.cpp:1382]
               CSyTaskImpl::start(bool)
    A child process has been started. Pid = 2529
    TRACE      2008-06-09 18:04:43.281 [syuxctask.cpp:1382]
               CSyTaskImpl::start(bool)
    A child process has been started. Pid = 2530
    ERROR      2008-06-09 18:04:43.310 [sixxcstepexecute.cpp:951]
    FCO-00011  The step createSecureStore with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_SecureStore|ind|ind|ind|ind|8|0|createSecureStore was executed with status ERROR .
    TRACE      2008-06-09 18:04:43.317 [iaxxgenimp.cpp:752]
                CGuiEngineImp::showMessageBox
    <html> <head> </head> <body> <p> An error occurred while processing service SAP Solution Manager 4.0 Support Release 4 > SAP Systems > Oracle > Central System > Central System. You may now </p> <ul> <li> choose <i>Retry</i> to repeat the current step. </li> <li> choose <i>View Log</i> to get more information about the error. </li> <li> stop the task and continue with it later. </li> </ul> <p> Log files are written to /tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS. </p> </body></html>
    TRACE      2008-06-09 18:04:43.317 [iaxxgenimp.cpp:1255]
               CGuiEngineImp::acceptAnswerForBlockingRequest
    Waiting for an answer from GUI
    SAPINST.LOG file  O/P
    WARNING 2008-06-09 18:04:43.224
    Execution of the command "/opt/IBMJava2-amd64-142/bin/java -classpath /tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/launcher.jar -Xmx256m com.sap.engine.offline.OfflineToolStart com.sap.security.core.server.secstorefs.SecStoreFS /tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/lib:/tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/exception.jar:/tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/logging.jar:/tmp/sapinst_instdir/SOLMAN/SYSTEM/ORA/CENTRAL/AS/install/sharedlib/tc_sec_secstorefs.jar create -s SMD -f /sapmnt/SMD/global/security/data/SecStore.properties -k /sapmnt/SMD/global/security/data/SecStore.key -enc -p XXXXXX" finished with return code 1. Output:
    The java class is not found:  com.sap.engine.offline.OfflineToolStart
    WARNING[E] 2008-06-09 18:04:43.225
    CJS-30050  Cannot create the secure store. SOLUTION: See output of log file SecureStoreCreate.log:
    The java class is not found:  com.sap.engine.offline.OfflineToolStart.
    ERROR 2008-06-09 18:04:43.310
    FCO-00011  The step createSecureStore with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|2|0|NW_CreateDBandLoad|ind|ind|ind|ind|10|0|NW_SecureStore|ind|ind|ind|ind|8|0|createSecureStore was executed with status ERROR .
    SecurStoreCreate log O/P
    The java class is not found:  com.sap.engine.offline.OfflineToolStart
    Pls suggest how to resolve this issue
    Pls help to resolve this issue
    Rgds,
    Abhijeet

    Hi All,
    I Found the Solution.
    The SAPinst tool was somehow not able to extracte the
    J2EEINSTALL.SAR files from the JAVA Components DVD.
    So I manually extracted the the file in the temporary install folder which the SAPinst creates in the /tmp filesystem (on LINUX by deafult) during the installation process.
    The following command is used (I used this on Red Hat LINUX 5.2) to extract the J2EEINSTALL.SAR file:-
    /sapmnt/SMD/exe/SAPCAR
    -xvf /dump/SR4_Java_Components/D51033521/DATA_UNITS/JAVA_J2EE_OSINDEP_J2EE_INST/J2EEINSTALL.SAR
    /sapmnt/SMD/exe/SAPCAR -->source directory of the file SAPCAR which is used to extarct CAR / SAR files on UNIX
    /dump/SR4_Java_Components/D51033521/DATA_UNITS/JAVA_J2EE_OSINDEP_J2EE_INST/J2EEINSTALL.SAR--> destination dir. where the SAPinst tool will read and execute the file.
    Rgds,
    Abhijeet K

  • Where is the Package Name and Class Name for Android to Facebook SSO?

    Where is the Package Name and Class Name for Android to Facebook SSO?
    I am trying to fill these fields http://developers.facebook.com/docs/mobile/android/build/#ref for Facebook but i can't figure out what to place in Android Package Name and Andorid Class Name,
    same thing for the Android Key Hash, I followed this guide http://www.skoobalon.com/blog/2012/06/13/getting-the-android-key-hash-for-facebook-from-an -air-app/ but I am not sure if it is the right thing to do.
    I was thinking maybe the Pakage Name is air.com.myname.myappname (where com.myname.myappname is also the id used in the application.xml) and the Class name is  air.com.myname.myappname.MyDocumentClass ?
    Is there an official guide somewhere?
    Also do you guys know if there is somewhere a library we can use within AIR to do SSO on Facebook from Andorid?

    For what it's worth, I don't think a WiFi connection would be reliable enough. You wouldn't want your picture to freeze just because a neighbour has turned on their baby monitor. WiFi uses the same frequencies as a myriad of other devices, as well as all your neighbours' WiFi.

  • MSS Report Export to excel - ERROR - load: class query not found

    Hi All,
    I am navigating and getting error as follows:
    Manger Services ->My reports -> Report Selection -> HIS Reports -> General -> Employee Details -> add some people and click start report -> report shows -> click local file -> save as spreadsheet get ERROR - load: class query not found in the status bar or IE and IE then locks up
    Please reply if any one has some clue.
    Thanks & Regards,
    Vishal

    Hey Vishal,
    This issue gave us a  very hard time. The query was HRIS manager. when you add some attributes to be exported to excel and then select export. It hangs there. or hangs at the step where you select save as spreadsheet, OR after it where it runs a query to export.
    I came to know that Java JRE is used in the last step. So for solving this issue, go to java.com, on the first screen there will be big link to install java(i guess JRE). install it and then try exporting your query. I am sure it will work.
    Just notice that after doing installation of Java you will get coffee cup in you system tray.
    Thanks.
    Ankur.
    P.S. Points if works.

  • "Class Circle not found in TryBouncingBalls" error message. Help !

    Dear People,
    I have an error message :
    "TryBouncingBalls.java": Error : class Circle not found in class stan_bluej_ch5_p135.TryBouncingBalls at line 67, "
    Circle circle = new Circle(xPos + 130, 30);
    below are the classes TryBouncingBalls, BouncingBall, BallDemo, Canvas
    Thank you in advance
    Stan
    package stan_bluej_ch5_p135;
    import java.awt.*;
    import java.awt.geom.*;
    public class TryBouncingBalls
    public static void main(String[] args)
    Canvas myCanvas = new Canvas("Creativity at its best");
    myCanvas.setVisible(true);
    BouncingBall ball = new BouncingBall(50,50,16, Color.red, 500, myCanvas);
    BouncingBall ball2 = new BouncingBall(70,80,20, Color.green, 500, myCanvas);
    BouncingBall ball3 = new BouncingBall(90,100,16, Color.red, 500, myCanvas);
    BouncingBall ball4 = new BouncingBall(30,30,20, Color.green, 500, myCanvas);
    ball.draw();
    ball2.draw();
    ball.draw();
    ball2.draw();
    // make them bounce
    boolean finished = false;
    while(!finished) {
    myCanvas.wait(50); // small delay
    ball.move();
    ball2.move();
    ball3.move();
    ball4.move();
    // stop once ball has travelled a certain distance on x axis
    if(ball.getXPosition() >= 550 && ball2.getXPosition() >= 550)
    finished = true;
    myCanvas.setFont(new Font("helvetica", Font.BOLD, 14));
    myCanvas.setForegroundColor(Color.red);
    myCanvas.drawString("We are having fun, ...\n\n", 20, 30);
    myCanvas.wait(1000);
    myCanvas.setForegroundColor(Color.black);
    myCanvas.drawString("...drawing lines...", 60, 60);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.gray);
    myCanvas.drawLine(200, 20, 300, 50);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.blue);
    myCanvas.drawLine(220, 100, 370, 40);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.green);
    myCanvas.drawLine(290, 10, 320, 120);
    myCanvas.wait(1000);
    myCanvas.setForegroundColor(Color.gray);
    myCanvas.drawString("...and shapes!", 110, 90);
    myCanvas.setForegroundColor(Color.red);
    myCanvas.drawString("to bring to focus creative ideas !", 310, 290);
    // the shape to draw and move
    int xPos = 10;
    Rectangle rect = new Rectangle(xPos + 40, 150, 30, 20);
    Rectangle rect2 = new Rectangle(xPos + 80, 120, 50, 25);
    Rectangle rect3 = new Rectangle(xPos+ 1200, 180, 30, 30);
    Rectangle rect4 = new Rectangle(xPos + 150, 220, 40, 15);
    myCanvas.fill(rect);
    myCanvas.fill(rect2);
    myCanvas.fill(rect3);
    myCanvas.fill(rect4);
    Circle circle = new Circle(xPos + 130, 30);
    // Circle circle2 = new Circle(xPos + 150, 50);
    // Circle circle3 = new Circle(xPos + 170, 30);
    // Circle circle4 = new Circle(xPos + 200, 40);
    // myCanvas.fill(circle);
    // myCanvas.fill(circle2);
    // myCanvas.fill(circle3);
    // myCanvas.fill(circle4);
    // move the rectangle and circles across the screen
    for(int i = 0; i < 200; i ++) {
    myCanvas.fill(rect);
    myCanvas.fill(rect2);
    myCanvas.fill(rect3);
    myCanvas.fill(rect4);
    myCanvas.wait(10);
    myCanvas.erase(rect);
    myCanvas.erase(rect2);
    myCanvas.erase(rect3);
    myCanvas.erase(rect4);
    xPos++;
    rect.setLocation(xPos, 150);
    rect2.setLocation(xPos, 120);
    rect3.setLocation(xPos, 180);
    rect4.setLocation(xPos, 220);
    // at the end of the move, draw once more so that it remains visible
    myCanvas.fill(rect);
    myCanvas.fill(rect2);
    myCanvas.fill(rect3);
    myCanvas.fill(rect4);
    package stan_bluej_ch5_p135;
    import java.awt.*;
    import java.awt.geom.*;
    * Class BouncingBall - a graphical ball that observes the effect of gravity. The ball
    * has the ability to move. Details of movement are determined by the ball itself. It
    * will fall downwards, accelerating with time due to the effect of gravity, and bounce
    * upward again when hitting the ground.
    * This movement can be initiated by repeated calls to the "move" method.
    * @author Bruce Quig
    * @author Michael Kolling (mik)
    * @author David J. Barnes
    * @version 1.1 (23-Jan-2002)
    public class BouncingBall
    private static final int gravity = 3; // effect of gravity
    private int ballDegradation = 2;
    private Ellipse2D.Double circle;
    private Color color;
    private int diameter;
    private int xPosition;
    private int yPosition;
    private final int groundPosition; // y position of ground
    private Canvas canvas;
    private int ySpeed = 1; // initial downward speed
    * Constructor for objects of class BouncingBall
    * @param xPos the horizontal coordinate of the ball
    * @param yPos the vertical coordinate of the ball
    * @param ballDiameter the diameter (in pixels) of the ball
    * @param ballColor the color of the ball
    * @param groundPos the position of the ground (where the wall will bounce)
    * @param drawingCanvas the canvas to draw this ball on
    public BouncingBall(int xPos, int yPos, int ballDiameter, Color ballColor,
    int groundPos, Canvas drawingCanvas)
    xPosition = xPos;
    yPosition = yPos;
    color = ballColor;
    diameter = ballDiameter;
    groundPosition = groundPos;
    canvas = drawingCanvas;
    * Draw this ball at its current position onto the canvas.
    public void draw()
    canvas.setForegroundColor(color);
    canvas.fillCircle(xPosition, yPosition, diameter);
    * Erase this ball at its current position.
    public void erase()
    canvas.eraseCircle(xPosition, yPosition, diameter);
    * Move this ball according to its position and speed and redraw.
    public void move()
    // remove from canvas at the current position
    erase();
    // compute new position
    ySpeed += gravity;
    yPosition += ySpeed;
    xPosition +=2;
    // check if it has hit the ground
    if(yPosition >= (groundPosition - diameter) && ySpeed > 0) {
    yPosition = (int)(groundPosition - diameter);
    ySpeed = -ySpeed + ballDegradation;
    // draw again at new position
    draw();
    * return the horizontal position of this ball
    public int getXPosition()
    return xPosition;
    * return the vertical position of this ball
    public int getYPosition()
    return yPosition;
    package stan_bluej_ch5_p135;
    import java.awt.*;
    import java.awt.geom.*;
    * Class BallDemo - provides two short demonstrations showing how to use the
    * Canvas class.
    * @author Michael Kolling and David J. Barnes
    * @version 1.0 (23-Jan-2002)
    public class BallDemo
    private Canvas myCanvas;
    * Create a BallDemo object. Creates a fresh canvas and makes it visible.
    public BallDemo()
    myCanvas = new Canvas("Ball Demo", 600, 500);
    myCanvas.setVisible(true);
    * This method demonstrates some of the drawing operations that are
    * available on a Canvas object.
    public void drawDemo()
    myCanvas.setFont(new Font("helvetica", Font.BOLD, 14));
    myCanvas.setForegroundColor(Color.red);
    myCanvas.drawString("We can draw text, ...", 20, 30);
    myCanvas.wait(1000);
    myCanvas.setForegroundColor(Color.black);
    myCanvas.drawString("...draw lines...", 60, 60);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.gray);
    myCanvas.drawLine(200, 20, 300, 50);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.blue);
    myCanvas.drawLine(220, 100, 370, 40);
    myCanvas.wait(500);
    myCanvas.setForegroundColor(Color.green);
    myCanvas.drawLine(290, 10, 320, 120);
    myCanvas.wait(1000);
    myCanvas.setForegroundColor(Color.gray);
    myCanvas.drawString("...and shapes!", 110, 90);
    myCanvas.setForegroundColor(Color.red);
    // the shape to draw and move
    int xPos = 10;
    Rectangle rect = new Rectangle(xPos, 150, 30, 20);
    // move the rectangle across the screen
    for(int i = 0; i < 200; i ++) {
    myCanvas.fill(rect);
    myCanvas.wait(10);
    myCanvas.erase(rect);
    xPos++;
    rect.setLocation(xPos, 150);
    // at the end of the move, draw once more so that it remains visible
    myCanvas.fill(rect);
    * Simulates two bouncing balls
    public void bounce()
    int ground = 400; // position of the ground line
    myCanvas.setVisible(true);
    // draw the ground
    myCanvas.drawLine(50, ground, 550, ground);
    // crate and show the balls
    BouncingBall ball = new BouncingBall(50, 50, 16, Color.blue, ground, myCanvas);
    ball.draw();
    BouncingBall ball2 = new BouncingBall(70, 80, 20, Color.red, ground, myCanvas);
    ball2.draw();
    // make them bounce
    boolean finished = false;
    while(!finished) {
    myCanvas.wait(50); // small delay
    ball.move();
    ball2.move();
    // stop once ball has travelled a certain distance on x axis
    if(ball.getXPosition() >= 550 && ball2.getXPosition() >= 550)
    finished = true;
    ball.erase();
    ball2.erase();
    package stan_bluej_ch5_p135;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.geom.*;
    * Class Canvas - a class to allow for simple graphical
    * drawing on a canvas.
    * @author Michael Kolling (mik)
    * @author Bruce Quig
    * @version 1.8 (23.01.2002)
    public class Canvas
    private JFrame frame;
    private CanvasPane canvas;
    private Graphics2D graphic;
    private Color backgroundColor;
    private Image canvasImage;
    * Create a Canvas with default height, width and background color
    * (300, 300, white).
    * @param title title to appear in Canvas Frame
    public Canvas(String title)
    this(title, 600, 600, Color.white);
    * Create a Canvas with default background color (white).
    * @param title title to appear in Canvas Frame
    * @param width the desired width for the canvas
    * @param height the desired height for the canvas
    public Canvas(String title, int width, int height)
    this(title, width, height, Color.white);
    * Create a Canvas.
    * @param title title to appear in Canvas Frame
    * @param width the desired width for the canvas
    * @param height the desired height for the canvas
    * @param bgClour the desired background color of the canvas
    public Canvas(String title, int width, int height, Color bgColor)
    frame = new JFrame();
    canvas = new CanvasPane();
    frame.setContentPane(canvas);
    frame.setTitle(title);
    canvas.setPreferredSize(new Dimension(width, height));
    backgroundColor = bgColor;
    frame.pack();
    * Set the canvas visibility and brings canvas to the front of screen
    * when made visible. This method can also be used to bring an already
    * visible canvas to the front of other windows.
    * @param visible boolean value representing the desired visibility of
    * the canvas (true or false)
    public void setVisible(boolean visible)
    if(graphic == null) {
    // first time: instantiate the offscreen image and fill it with
    // the background color
    Dimension size = canvas.getSize();
    canvasImage = canvas.createImage(size.width, size.height);
    graphic = (Graphics2D)canvasImage.getGraphics();
    graphic.setColor(backgroundColor);
    graphic.fillRect(0, 0, size.width, size.height);
    graphic.setColor(Color.black);
    frame.show();
    * Provide information on visibility of the Canvas.
    * @return true if canvas is visible, false otherwise
    public boolean isVisible()
    return frame.isVisible();
    * Draw the outline of a given shape onto the canvas.
    * @param shape the shape object to be drawn on the canvas
    public void draw(Shape shape)
    graphic.draw(shape);
    canvas.repaint();
    * Fill the internal dimensions of a given shape with the current
    * foreground color of the canvas.
    * @param shape the shape object to be filled
    public void fill(Shape shape)
    graphic.fill(shape);
    canvas.repaint();
    * Fill the internal dimensions of the given circle with the current
    * foreground color of the canvas.
    public void fillCircle(int xPos, int yPos, int diameter)
    Ellipse2D.Double circle = new Ellipse2D.Double(xPos, yPos, diameter, diameter);
    fill(circle);
    * Fill the internal dimensions of the given rectangle with the current
    * foreground color of the canvas. This is a convenience method. A similar
    * effect can be achieved with the "fill" method.
    public void fillRectangle(int xPos, int yPos, int width, int height)
    fill(new Rectangle(xPos, yPos, width, height));
    * Erase the whole canvas.
    public void erase()
    Color original = graphic.getColor();
    graphic.setColor(backgroundColor);
    Dimension size = canvas.getSize();
    graphic.fill(new Rectangle(0, 0, size.width, size.height));
    graphic.setColor(original);
    canvas.repaint();
    * Erase the internal dimensions of the given circle. This is a
    * convenience method. A similar effect can be achieved with
    * the "erase" method.
    public void eraseCircle(int xPos, int yPos, int diameter)
    Ellipse2D.Double circle = new Ellipse2D.Double(xPos, yPos, diameter, diameter);
    erase(circle);
    * Erase the internal dimensions of the given rectangle. This is a
    * convenience method. A similar effect can be achieved with
    * the "erase" method.
    public void eraseRectangle(int xPos, int yPos, int width, int height)
    erase(new Rectangle(xPos, yPos, width, height));
    * Erase a given shape's interior on the screen.
    * @param shape the shape object to be erased
    public void erase(Shape shape)
    Color original = graphic.getColor();
    graphic.setColor(backgroundColor);
    graphic.fill(shape); // erase by filling background color
    graphic.setColor(original);
    canvas.repaint();
    * Erases a given shape's outline on the screen.
    * @param shape the shape object to be erased
    public void eraseOutline(Shape shape)
    Color original = graphic.getColor();
    graphic.setColor(backgroundColor);
    graphic.draw(shape); // erase by drawing background color
    graphic.setColor(original);
    canvas.repaint();
    * Draws an image onto the canvas.
    * @param image the Image object to be displayed
    * @param x x co-ordinate for Image placement
    * @param y y co-ordinate for Image placement
    * @return returns boolean value representing whether the image was
    * completely loaded
    public boolean drawImage(Image image, int x, int y)
    boolean result = graphic.drawImage(image, x, y, null);
    canvas.repaint();
    return result;
    * Draws a String on the Canvas.
    * @param text the String to be displayed
    * @param x x co-ordinate for text placement
    * @param y y co-ordinate for text placement
    public void drawString(String text, int x, int y)
    graphic.drawString(text, x, y);
    canvas.repaint();
    * Erases a String on the Canvas.
    * @param text the String to be displayed
    * @param x x co-ordinate for text placement
    * @param y y co-ordinate for text placement
    public void eraseString(String text, int x, int y)
    Color original = graphic.getColor();
    graphic.setColor(backgroundColor);
    graphic.drawString(text, x, y);
    graphic.setColor(original);
    canvas.repaint();
    * Draws a line on the Canvas.
    * @param x1 x co-ordinate of start of line
    * @param y1 y co-ordinate of start of line
    * @param x2 x co-ordinate of end of line
    * @param y2 y co-ordinate of end of line
    public void drawLine(int x1, int y1, int x2, int y2)
    graphic.drawLine(x1, y1, x2, y2);
    canvas.repaint();
    * Sets the foreground color of the Canvas.
    * @param newColor the new color for the foreground of the Canvas
    public void setForegroundColor(Color blue)
    graphic.setColor(Color.blue);
    * Returns the current color of the foreground.
    * @return the color of the foreground of the Canvas
    public Color getForegroundColor()
    return graphic.getColor();
    * Sets the background color of the Canvas.
    * @param newColor the new color for the background of the Canvas
    public void setBackgroundColor(Color newColor)
    backgroundColor = newColor;
    graphic.setBackground(newColor);
    * Returns the current color of the background
    * @return the color of the background of the Canvas
    public Color getBackgroundColor()
    return backgroundColor;
    * changes the current Font used on the Canvas
    * @param newFont new font to be used for String output
    public void setFont(Font newFont)
    graphic.setFont(newFont);
    * Returns the current font of the canvas.
    * @return the font currently in use
    public Font getFont()
    return graphic.getFont();
    * Sets the size of the canvas.
    * @param width new width
    * @param height new height
    public void setSize(int width, int height)
    canvas.setPreferredSize(new Dimension(width, height));
    Image oldImage = canvasImage;
    canvasImage = canvas.createImage(width, height);
    graphic = (Graphics2D)canvasImage.getGraphics();
    graphic.drawImage(oldImage, 0, 0, null);
    frame.pack();
    * Returns the size of the canvas.
    * @return The current dimension of the canvas
    public Dimension getSize()
    return canvas.getSize();
    * Waits for a specified number of milliseconds before finishing.
    * This provides an easy way to specify a small delay which can be
    * used when producing animations.
    * @param milliseconds the number
    public void wait(int milliseconds)
    try
    Thread.sleep(milliseconds);
    catch (InterruptedException e)
    // ignoring exception at the moment
    * Nested class CanvasPane - the actual canvas component contained in the
    * Canvas frame. This is essentially a JPanel with added capability to
    * refresh the image drawn on it.
    private class CanvasPane extends JPanel
    public void paint(Graphics g)
    g.drawImage(canvasImage, 0, 0, null);

    Dear Miciuli,
    I found the definition for the circle in the canvas class and used it to creates circles ! Thank you for jaring my brain into thinking !
    Stan
    Ellipse2D.Double circle = new Ellipse2D.Double(xPos, 70, 30 , 30);

  • Error in file receiver adapter (Directory does not exist / cannot be create

    I have a NFS reiceiver file NFS adapter with target directory:
    10.128.68.38\arbo2000\UploadPinfos\arbodev
    if I run this line in windows, windows access to this folder.
    Full Error log:
    Receiver Adapter v2123 for Party '', Service 'BS_0000_ARBO_DEV':
    Configured at 2006-04-06 18:08:26 CEST
    History:
    - 2006-04-06 18:08:35 CEST: Error: Message processing failed: Exception: Message processing failed - configuration error in file receiver adapter (Directory does not exist / cannot be created)
    Can somebody help me please??

    Hi Alvaro,
            If your XI server is running on Unix platform then you'll get the access only after mounting 10.128.68.38 this system as a drive. This is equivalent to the windows network mapping.
    Next thing is that once that is done then you can access the path /arbo2000/UploadPinfos/arbodev by mentioning it in your directory path.
    To check whether the above mentioned is the problem then pls do try by doing it with FTP protocol. If it works then for acting as a local directory for NFS you need to mount the drive.
    Cheers
    JK

  • Problem with Player class: Error: (28) class Player not found

    Hi,
    I had this error while attempting to use the Player object of media package. I am using JDeveloper 3.2
    Error: (28) class Player not found in class lyee.Frame5.
    My program code has this shape.
    import java.awt.event.*;
    import java.applet.*;
    import java.net.*;
    import java.io.*;
    import javax.media.*;
    public class Frame5 extends JFrame {
    FlowLayout flowLayout = new FlowLayout();
    JPanel jPanel1 = new JPanel();
    Player lecteur;
    Could someone help me finding where the error is exactly. The Player object is in javax.media pakcage, right ? Is there any librarary missing ??
    Thank you
    Jaouhar

    If you haven't done so already, you have to install JMF -- Java Media Framework, which you can download from the Sun website ( http://java.sun.com ). After that, you have to add that library to your project, in your project settings dialog.

  • ITunes error: "The file iTunes Library.itl does not appear to be a valid iTunes library file."

    Every couple of weeks I get this iTunes error after connecting iPod Nano 6th generation. Then it deletes my whole iPod content. I am running Windows 7 x64 Enterprise with latest patches, iTunes 10.2.2.14 and McAfee antivirus.
    I tried to reinstall QuickTime + iTunes, clean the system and then reinstall. But this does not work. I also tried to create a brand new library. But no success...
    Error: "The file iTunes Library.itl does not appear to be a valid iTunes library file. iTunes has attempted to recover your iTunes library and renamed this file to iTunes Library (Damaged) 3.itl."
    Any idea?

    No I haven't. I tried almost everything possible but without any remarkable shift. I am about to sell my brand new iPod:(

Maybe you are looking for

  • Problem in BI 7.0 while loding info cube

    when i am loading data to info cube in bi 7.0 i am getting an error no sid foud for value ' 00000 ' of chareteristic 0currency

  • BAPI_SALESDATA_CREATEFROMDAT2 Changing Condition Value

    Hi,   when I use  BAPI_SALESDATA_CREATEFROMDAT2  to changeing condition value   wa_order_conditions_in-itm_number  = '000010'.   wa_order_conditions_in-COND_ST_NO  = '010'.     wa_order_conditions_in-COND_COUNT  = '01'.    wa_order_conditions_in-cond

  • RunInstaller issue

    Dear All, I am working on Oracle 10g Installation both server and client. The platform is AIX v5.3 and need to automate the installation. In the script i need to run the runInstaller which gives a question "Has the rootpre.sh been run as root user?"

  • I want to have access from my backing bean to attributes

    Hi, I have a table PERSON with the columns ID (PK), FIRST_NAME, LAST_NAME and SALUTATION_ID (FK). I have a second table SALUTATION with the columns ID and NAME. I do use the following lines of code if I want to make changes to the PERSON table and it

  • Driver for 3com 3c905B Fast Ethernet

    Hello, I was trying to see where I could get a driver for Solaris 8 Sparc - 3Com 3c905B for SunBlade or what ethernet 100 mb network card is suppported in Solaris? Thanks