Trying to end a class

While trying to end a class I get an error that states: class, interface or enum expected
the following closing statement is used
} // end class Employee
the following is the entire code
// Employee.java
//store and recall payroll info
import java.util.*;
     public class Employee
          // declare variables
               String empName;
               double rate;
               double hours;
           // initialize variables in constructor
           public Employee ( String empName, double rate, double hours );
                  this.empName = employeeName;
                  this.rate = hourlyPay;
                  this.hours = hoursWorked;
             // generate getters and setters
             public String getEmpName ();
                  return empName;
             public void setEmpName ( String empName );
                  this.empName = employeeName;
             public double getRate ();
                  return rate;
             public void setRate ( double rate );
                  this.rate = hourlyPay;
             public double getHours ();
                  return hours;
             public void setHours ( double hours );
                  this.hours = hoursWorked;
             // use method to calculate pay
             public money.format getTotalPay ();
                  return ( totalPay );
        } // end main
   } // end class Employee

they actually do, this is a second class to a program that i am writing for a java class assignment.
I will sent both parts that may help.
// Payroll.java
// Create and manipulate a payroll program
import java.util.Scanner;
import java.text.DecimalFormat;
public class Payroll
    // Main method begins execution of Java Application
    public static void main( String args[] )
        String employeeName; // employee name read by user
        boolean isValid = true; // test condition
        double pay; // calculates pay
        // create Scanner to obtain input from command window
        Scanner input = new Scanner( System.in );
        // start loop
        while ( isValid )
            System.out.print( "Enter Employee Name. (type stop to quit):" ); // prompt
            employeeName = input.nextLine(); // obtain user input
            if (employeeName.equalsIgnoreCase ( "stop" ))
                    isValid = false; // reset test condition
                    break; // stop the program
               else
                    pay = calculatePay(); // call new method to perform calculations
            System.out.println( "total pay for" + employeeName +":"+pay );
     } // end main method
     //this method calculates returns the total pay to my calling method in the main
     public static double calculatePay()
          // define and initialize my variables
          double hourlyPay; // hourly pay read by user
          double hoursWorked; // hours worked read by user
          double totalPay; // total pay as calculated by program
        Scanner input = new Scanner(System.in);
        System.out.print( "Enter Hourly Pay:" ); // prompt
        hourlyPay = input.nextDouble(); // obtain user input
        if ( hourlyPay < 0 )
            System.out.println( "Enter Positive Number. Please re-enter hourly pay:" );
            hourlyPay = input.nextDouble();
        System.out.print( "Enter Hours Worked:" ); // prompt
        hoursWorked = input.nextDouble(); // obtain user input
        if (hoursWorked < 0 )
            System.out.print( "Enter Positive Number. Please re-enter hours worked:" );
            hoursWorked = input.nextDouble();
          //get total pay
        totalPay = hourlyPay*hoursWorked; //multiply variables
        // create decimalFormat
        DecimalFormat money = new DecimalFormat( "$0.00" );
        // display total
        System.out.print( "Total Pay For Employee Is: " );
        System.out.println(money.format ( totalPay ) );
        // return total pay
        return totalPay;
    } // end main
} // end class Payroll
// Employee.java
//store and recall payroll info
import java.util.*;
     public class Employee
          // declare variables
               String empName;
               double rate;
               double hours;
           // initialize variables in constructor
           public Employee ( String empName, double rate, double hours )
                  this.empName = employeeName;
                  this.rate = hourlyPay;
                  this.hours = hoursWorked;
             // generate getters and setters
             public String getEmpName ()
                  return empName;
             public void setEmpName ( String empName )
                  this.empName = employeeName;
             public double getRate ()
                  return rate;
             public void setRate ( double rate )
                  this.rate = hourlyPay;
             public double getHours ()
                  return hours;
             public void setHours ( double hours )
                  this.hours = hoursWorked;
             // use method to calculate pay
             public money.format getTotalPay ()
                  return ( totalPay );
        } // end main
   } // end class Employee

Similar Messages

  • Extra bytes at the end of class file error

    I have created an applet.
    it worked fine when i ran it with appletviewer.
    it ran fine when i opened it with a browser (when it still was on my computer and not on the net).
    now, when i uploaded all the files, when try to open the page where my applet should be, the applet doesn't start and the console writes:
    java.lang.ClassFormatError: Extra bytes at the end of class file ImageHolderNotifier
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    i tried rebuilding the project and uploading all the .class files from scratch... still, no change :-/
    i have compiled it using eclipse 3.1.0, JDK1.5.0_02.
    my JRE is 1.5.0_02
    i've tried running it both with Internet Explorer and FireFox...

    Works locally but not after uploading.
    Must be uploaded wrong then (ftp ascii??) or it's the web server.

  • Trying to make a class to read in strings, help needed

    hello
    i have this class that reads in numbers here is the code
    import java.io.*;
    public class readNumber {
         public static int readlnt()
              throws java.io.IOException
              BufferedReader str= new BufferedReader(new InputStreamReader(System.in));
              String input;
              int res = 0;
              Integer num = new Integer(res);//create integer object
              input = str.readLine();//read input and return a string
              return num.parseInt(input);//convert String to an int and return
              }// end of read method
         }//end of class numberi was trying to makr one to read in words i have this so far
    import java.io.*;
    public class readWord {
         public static int readlnt()
              throws java.io.IOException
              BufferedReader str= new BufferedReader(new InputStreamReader(System.in));
              String input;
              String res = null;
              String word = new String(res);
              input = str.readLine();
              return word.parseword(input);
              }// end of read method
         }//end of class numberi need a little help with the readWord class, any advice you can give would be great
    thanks alot
    Anthony

    Your basic logic is probably going to be something like this:
    (a) read from the stream until you get a letter. (discard spaces at the beginning of a line, or between words)
    (b) create a string or a string buffer that contains the letter you just read.
    (c) read from the stream as long as you're getting letters, appending them to the end of the string or string buffer. When you get a character that isn't a letter, discard it, and return what you've built up.
    This assumes you want to discard punctuation marks, spaces, carriage returns, etc.

  • Getting error when trying to end date the element links

    When i am trying to end date the element link and i am getting a error message as ORA-01403: no data found if i click on the details button the following message is displayed:
    ORA-01403: no data found
    FRM-40735: ON-DELETE trigger raised unhandled exception ORA-01403.
    If i click on Ok button it bringgs another popup message that reads as follows:
    An Unexpected Error- 1403 has occured.An alert has been sent to the system administrator.
    ORA-01403: no data found
    I am really not getting why my link is not end dating.
    Could anyone advice me on how i can end date my element links.
    NB:the date track i am using is 01-DEC-2009 and no prayroll or quick pay has been processed as of this date

    Pl see if enabling an Forms Runtime Diagnostics (FRD) trace can help identify the cause
    MOS Doc 373548.1 - How To Collect And Use Forms Trace (FRD) in Oracle Applications Release 12
    MOS Doc 167635.1 - How To Perform Forms Runtime Diagnostics (FRD) Tracing in Applications 11i
    HTH
    Srini

  • Front end Java classes?

    Aloha all-
    I'm familar with using LiveCycle Data Services with Flex and love its use of front-end ActionScript classes that map back to the server. I was wondering if such functionality was possible with Java classes? My guess is no, but wanted to make sure as I've been going through the docs and haven't found anything explicit.
    Basically, I'm thinking about using LiveCycle DS in an all Java project (Swing front end) and if it communication could be handled by DS, which I'm familiar with, instead of creating my own JMS topics, that'd be great. Plus it provides a way to move the app from Java/Swing to Flex/Air.
    Ron

    Hi Ron,
    We don't currently provide a client-side Java API for LC DS.
    If you plan on switching from Swing to Flex/Air in the future, the major thing to watch out for is that the classes you ship over the wire from the server to the client adhere to the Java bean serialization rules that Flash AMF serialization requires (no-arg constructor, public get/set methods for properties, etc.). But you should be able to expose the same server code to a Flex/Air client with minimal to no impact.
    Porting your front-end app from Swing to Flex/Air wouldn't offer any opportunities for client-side code reuse.
    Best,
    Seth

  • Problem closing a Program (remains in status 'trying to end program')

    After upgrading to OS Maverick, CrossOver issued an error message. Trying to finish the program didn't work, it continuous indicating it's trying to end it. Even after using the immediatly stopping function, it falls into the 'trying to end program' mode on opening CrossOver again. Any suggestions on how to solve it?

    I would suggest force-quitting the application as detailed here. I hope this helps.

  • Suffering an complie error when trying to compile java class in EBS11i

    Hi,
    When I trying to compile java classes with which imported the HttpServletResponse class, will get the follow error message:
    package javax.servlet does not exist
    cannot resolve symbol
    symbol : class HttpServletResponse
    It seems the javax.servlet package is not included in the classpath. But I checked the $CLASSPATH, it seems no problem.
    echo $CLASSPATH
    /u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/lib/tools.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/lib/dt.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/charsets.jar:/u02/applvis/viscomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar:/u02/applvis/viscomn/java/appsborg2.zip:/u02/applvis/visora/8.0.6/forms60/java:/u02/applvis/viscomn/java
    Does anyone know the reason?
    environment: ebs 11i
    Thanks&Regards,
    Xiaofeng

    resolved this issue.
    1. Edit $APPL_TOP/admin/adovars.env file -
    Add the following jar files to the AF_CLASSPATH line -
    Full path of /...../iAS/Apache/Jsdk/lib/jsdk.jar
    Full path of /...../iAS/Apache/Jserv/libexec/ApacheJServ.jar
    2. Bounce the concurrent manager in order to have the changes take effect.

  • Extra bytes at the end of class file listeners/SessionListener ?

    wen i am running my JSP pages i am getting this error...
    can anybody explain this error, Y it is comming...
    SEVERE: Error configuring application listener of class listeners.SessionListener
    java.lang.ClassFormatError: Extra bytes at the end of class file listeners/SessionListener
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3677)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4183)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1112)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Jun 24, 2008 10:58:29 AM org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Skipped installing application listeners due to previous error(s)

    The class files are broken. Recompile them. If you're uploading them, doublecheck if the FTP program used doesn't do mad things with binary files.

  • HELP Error trying to load XMLNode.class

    I am trying to load the Beta XDK for PL/SQL into the database. At first when I ran the command:
    loadjava -user ..... xmlparserv2.jar
    I got a whole lot of errors saying that it could not read the compressed format. So I decompressed the .jar file and tried to load each .class individually. This seemed to work fine until I tried the XMLNode.class file. I get this error when I try to load it:
    Error while opening or reading XMLNode.class
    Exception oracle.aurora.server.tools.ToolsException: file format error
    loadjava: 1 errors
    Anyone know why I am getting this or have any fixes? Thank you.

    Hi,
    whether u ve checked "texts language dependent" option in the masterdata/texts context screen of the infoobject? If so, then u ve to specify the language (for english, EN)in ur flat file too
    Hope it helps..Let me know
    Regards,
    R.Ravi

  • Strange problem when tried to convert HelloWorld.class..

    Hi friends..
    i've downloaded the Java Card SDK 2.2.1, and i tried to compile HelloWorld application that shipped with its distribution..
    i found strange problem when i tried to convert HelloWorld.class into .CAP, etc.. :(
    I use Windows XP, assume that i've set the Environment Variables needed
    i've compiled the HelloWorld.java into HelloWorld.class..
    the package of of HelloWorld is : com.sun.javacard.samples.HelloWorld;
    and i use this config file :
    -out EXP JCA CAP
    -exportpath .
    -applet  0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1 com.sun.javacard.samples.HelloWorld.HelloWorld
    com.sun.javacard.samples.HelloWorld
    0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0and then i tried to run converter script in the Console :
    *C:\java_card_kit-2_2_1\samples>converter -config com\sun\javacard\samples\HelloWorld\HelloWorld.opt*
    *error: file com\sun\javacard\samples\HelloWorld\HelloWorld.opt could not be found*
    Usage:  converter  <options>  package_name  package_aid  major_version.minor_ve
    sion
    OR
    converter -config <filename>
                        use file for all options and parameters to converter
    Where options include:
            -classdir <the root directory of the class hierarchy>
                          set the root directory where the Converter
                          will look for classes
            -i            support the 32-bit integer type
            -exportpath  <list of directories>
                          list the root directories where the Converter
                          will look for export files
            -exportmap    use the token mapping from the pre-defined export
                          file of the package being converted. The converter
                          will look for the export file in the exportpath
            -applet <AID class_name>
                          set the applet AID and the class that defines the
                          install method for the applet
            -d <the root directory for output>
            -out  [CAP] [EXP] [JCA]
                          tell the Converter to output the CAP file,
                          and/or the JCA file, and/or the export file
            -V, -version  print the Converter version string
            -v, -verbose  enable verbose output
            -help         print out this message
            -nowarn       instruct the Converter to not report warning messages
            -mask         indicate this package is for mask, so restrictions on
                          native methods are relaxed
            -debug        enable generation of debugging information
            -nobanner     suppress all standard output messages
            -noverify     turn off verification. Verification is defaultPlease help me regarding this, because i'm new in this field..
    Thanks in advance..

    Thanks safarmer for your reply..
    i tried this :
    C:\java_card_kit-2_2_1\samples>javac -target 1.3 -source 1.1 -g -classpath .\cla
    sses;..\lib\api.jar;..\lib\installer.jar src\com\sun\javacard\samples\HelloWorld
    \*.java
    javac: invalid source release: 1.1
    Usage: javac <options> <source files>
    use -help for a list of possible options
    C:\java_card_kit-2_2_1\samples>javac -target 1.3 -source 1.2 -g -classpath .\cla
    sses;..\lib\api.jar;..\lib\installer.jar src\com\sun\javacard\samples\HelloWorld
    \*.java
    it seems that i can't specify the -source to 1.1, so i tried to use -source 1.2..
    after that, i tried to convert again, and i got this error :
    C:\java_card_kit-2_2_1\samples\src>converter -config com\sun\javacard\samples\He
    lloWorld\HelloWorld.opt
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to lic
    ense terms.
    error: com.sun.javacard.samples.HelloWorld.HelloWorld: unsupported class file fo
    rmat of version 47.0.
    conversion completed with 1 errors and 0 warnings.Please help me regarding this..
    Thanks in advance..

  • Trying to create a class

    Hi,
    I�m trying to use the class Point to create a new class Line that handles lines in a 2-dimensional space. Much of what I want to achieve is already accomplished, but I still want to incorporate three aspects that I can�t really figure out how to solve.
    1. I want to create a "boolean isParallell(Line1) {" method that checks if the line in question is parallel with line1.
    2. I want to create a "public static Line longest(Line[] lines) {" class method that returns the longest line in the array lines. If the longest line is 0, null should be returned.
    3. I want to create a "public static boolean isPolygon(Line[] lines) {" class method that determines if the lines in the array lines constitute a polygon.
    Any input you might have on how I go about accomplishing this is very much appreciated. (If you find it easier just to assist me with the code, that�s fine with me ;-)
    Thanks!
    import java.awt.Point.*;
    public class Line {
         private Point p1;
         private Point p2;
         public Line(){
              this.p1 = new Point();     
              this.p2 = new Point();
         public Line(Point p1, Point p2) {
              this.p1 = p1;
              this.p2 = p2;
         public String toString() {
              return "[" + this.p1.getX() + ", " + this.p2.getX() + ", " + this.p1.getY() + ", " + this.p2.getY() + "]";
         public double length() {
              double tmpX = (this.p2.getX() - this.p1.getX()) * (this.p2.getX() - this.p1.getX());
              double tmpX = (this.p2.getY() - this.p1.getY()) * (this.p2.getY() - this.p1.getY());
         public void translate(int dx, int dy) {
              this.p1.translate(dx, dy);
              this.p1.translate(dx, dy);
         public Line translatedLine(int dx, int dy) {
              Point tmpP = new Point(p1, p2);
              return tmpP.translate(dx, dy);
         public boolean equal(Line1) {          
              if(this.p1.equals(Line1.getP1()) && this.p2.equals(Line1.getP2())
                   return true;
              return false;
         // boolean isParallell(Line1) {
         // public static Line longest(Line[] lines) {
                        // for( int i = 0; i<lines.length; i++)      
         // public static boolean isPolygon(Line[] lines) {
         public Point getP1(){
              return p1;
         public Point getP2(){
              return p2;
    }

    You need to brush up on you geometry!
    1. I want to create a "boolean isParallell(Line1) {"
    method that checks if the line in question is
    parallel with line1.Check the slope of this line and Line1. If they're equal, then they're parallel.
            y2 - y1
    slope = -------
            x2 - x1Be carefull for roundoff errors!
    2. I want to create a "public static Line
    longest(Line[] lines) {" class method that returns
    the longest line in the array lines. If the longest
    line is 0, null should be returned.
    dX = x2-x1
    dY = y2-y1
    distance = \/ (dX*dX) + (dY*dY)
    3. I want to create a "public static boolean
    isPolygon(Line[] lines) {" class method that
    determines if the lines in the array lines constitute
    a polygon.I know what a polygon is, but just to eliminate any misunderstanding could you give an example of a poygon made out of Line[]?

  • I am trying to create a class diagram with jdeveloper but class is grey out

    i am trying to create a class diagram with jdeveloper but class is greyed out even though I downloaded the J2EE version
    I went through the following steps :
    Click the project in which you want to create a new diagram, choose File New from JDeveloper's menu, then select General Diagrams in the left pane of the New dialog.
    I have downloaded J2EE Edition Version 10.1.3.1.0.3984

    When the class diagram is disabled - does the wizard for creating a new class in the new->General also disabled?
    If it is then you are not placing your cursor on the project before you choose file->new
    (you are probably on the workspace that contains the project).

  • Error while trying to call Java Class from Peoplecode

    Gurus,
    I am trying to read a property file from peoplecode using standard java classes. However, I am getting this error more than one overload matches
    Below are 2 ways in which I tried doing this and both ended up in the same error
    Code 1>_
         Local JavaObject &file = CreateJavaObject("java.io.File", "D:\\psft.properties");
         Local JavaObject &properties = CreateJavaObject("java.util.Properties");
         Local JavaObject &reader = CreateJavaObject("java.io.FileReader", &file);
         &properties.load(); Error thrown : "Calling Java java.io.FileReader.<init>: more than one overload matches"
    Code 2>_
         Local JavaObject &file = CreateJavaObject("java.io.File", "D:\\psft.properties");
         Local JavaObject &properties = CreateJavaObject("java.util.Properties");
         Local JavaObject &properyFile = CreateJavaObject("java.io.FileInputStream", &file);
         &properties.load();
    Error thrown : "Calling Java java.io.FileInputStream.<init>: more than one overload matches."
    The above error is thrown on the 3rd line when I try to invoke the FileInputStream or FileReader class/constructor.
    In fact both the above code pieces work absolutely fine when I write them into a java class and run them on a java runtime. Any inputs would be of great help !! Alternatively, I will have to use peoplecode file.readline(), etc to read the property file. Since java has this smarter way to reading a property file, I thought of giving it a try ..
    -Sudripta

    I tested this on one of my windows servers using PT 8.50:
    Local JavaObject &joCurrFile = CreateJavaObject("java.io.File", "c:/temp/test-date.txt");
    Local JavaObject &jlongtime = CreateJavaObject("java.util.Date");
    Local number &modifytime = &jlongtime.getTime();
    MessageBox(0, "", 0, 0, "original time: " | &joCurrFile.lastModified());
    Local boolean &filemodified = &joCurrFile.setLastModified(&modifytime);
    MessageBox(0, "", 0, 0, "&modifytime: " | &modifytime, "");
    MessageBox(0, "", 0, 0, "&filemodified: " | &filemodified, "");
    MessageBox(0, "", 0, 0, "new time: " | &joCurrFile.lastModified());Here are the results:
    PeopleTools 8.50.05 - Application Engine
    Copyright (c) 1988-2010 PeopleSoft, Inc.
    All Rights Reserved
    original time: 1287677026144 (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: original time: 1287677026144 (0,0) (0,0)
    &modifytime: 1287677277845 (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: &modifytime: 1287677277845 (0,0) (0,0)
    &filemodified: True (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: &filemodified: True (0,0) (0,0)
    new time: 1287677277845 (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: new time: 1287677277845 (0,0) (0,0)
    Application Engine program DSS_TEST_IO ended normallyDoes your app server have permissions to modify the files you are trying to modify? Also, how did you verify the date/time of the files? Were you using Windows Explorer? Did you refresh the view first? Or did you use the console dir/ls? I seriously doubt there is a security manager in place that would restrict what you can do with Java. Security managers are common in applets/browser context, but not in apps.

  • Getting error message Cannot Resolve Symbol when trying to compile a class

    Hello All -
    I am getting an error message cannot resolve symbol while trying to compile a java class that calls another java class in the same package. The called class compiles fine, but the calling class generates
    the following error message:
    D:\Apache Tomcat 4.0\webapps\examples\WEB-INF\classes\cal>javac
    ConnectionPool.java
    ConnectionPool.java:158: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    private void addConnection(PooledConnection value) {
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    The code is listed as follows for PooledConnection.java (it compiles fine)
    package cal;
    import java.sql.*;
    public class PooledConnection {
    // Real JDBC Connection
    private Connection connection = null;
    // boolean flag used to determine if connection is in use
    private boolean inuse = false;
    // Constructor that takes the passed in JDBC Connection
    // and stores it in the connection attribute.
    public PooledConnection(Connection value) {
    if ( value != null ) {
    connection = value;
    // Returns a reference to the JDBC Connection
    public Connection getConnection() {
    // get the JDBC Connection
    return connection;
    // Set the status of the PooledConnection.
    public void setInUse(boolean value) {
    inuse = value;
    // Returns the current status of the PooledConnection.
    public boolean inUse() {
    return inuse;
    // Close the real JDBC Connection
    public void close() {
    try {
    connection.close();
    catch (SQLException sqle) {
    System.err.println(sqle.getMessage());
    Now the code for ConnectionPool.java class that gives the cannot
    resolve symbol error
    package cal;
    import java.sql.*;
    import java.util.*;
    public class ConnectionPool {
    // JDBC Driver Name
    private String driver = null;
    // URL of database
    private String url = null;
    // Initial number of connections.
    private int size = 0;
    // Username
    private String username = new String("");
    // Password
    private String password = new String("");
    // Vector of JDBC Connections
    private Vector pool = null;
    public ConnectionPool() {
    // Set the value of the JDBC Driver
    public void setDriver(String value) {
    if ( value != null ) {
    driver = value;
    // Get the value of the JDBC Driver
    public String getDriver() {
    return driver;
    // Set the URL Pointing to the Datasource
    public void setURL(String value ) {
    if ( value != null ) {
    url = value;
    // Get the URL Pointing to the Datasource
    public String getURL() {
    return url;
    // Set the initial number of connections
    public void setSize(int value) {
    if ( value > 1 ) {
    size = value;
    // Get the initial number of connections
    public int getSize() {
    return size;
    // Set the username
    public void setUsername(String value) {
    if ( value != null ) {
    username = value;
    // Get the username
    public String getUserName() {
    return username;
    // Set the password
    public void setPassword(String value) {
    if ( value != null ) {
    password = value;
    // Get the password
    public String getPassword() {
    return password;
    // Creates and returns a connection
    private Connection createConnection() throws Exception {
    Connection con = null;
    // Create a Connection
    con = DriverManager.getConnection(url,
    username, password);
    return con;
    // Initialize the pool
    public synchronized void initializePool() throws Exception {
    // Check our initial values
    if ( driver == null ) {
    throw new Exception("No Driver Name Specified!");
    if ( url == null ) {
    throw new Exception("No URL Specified!");
    if ( size < 1 ) {
    throw new Exception("Pool size is less than 1!");
    // Create the Connections
    try {
    // Load the Driver class file
    Class.forName(driver);
    // Create Connections based on the size member
    for ( int x = 0; x < size; x++ ) {
    Connection con = createConnection();
    if ( con != null ) {
    // Create a PooledConnection to encapsulate the
    // real JDBC Connection
    PooledConnection pcon = new PooledConnection(con);
    // Add the Connection to the pool.
    addConnection(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // Adds the PooledConnection to the pool
    private void addConnection(PooledConnection value) {
    // If the pool is null, create a new vector
    // with the initial size of "size"
    if ( pool == null ) {
    pool = new Vector(size);
    // Add the PooledConnection Object to the vector
    pool.addElement(value);
    public synchronized void releaseConnection(Connection con) {
    // find the PooledConnection Object
    for ( int x = 0; x < pool.size(); x++ ) {
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // Check for correct Connection
    if ( pcon.getConnection() == con ) {
    System.err.println("Releasing Connection " + x);
    // Set its inuse attribute to false, which
    // releases it for use
    pcon.setInUse(false);
    break;
    // Find an available connection
    public synchronized Connection getConnection()
    throws Exception {
    PooledConnection pcon = null;
    // find a connection not in use
    for ( int x = 0; x < pool.size(); x++ ) {
    pcon = (PooledConnection)pool.elementAt(x);
    // Check to see if the Connection is in use
    if ( pcon.inUse() == false ) {
    // Mark it as in use
    pcon.setInUse(true);
    // return the JDBC Connection stored in the
    // PooledConnection object
    return pcon.getConnection();
    // Could not find a free connection,
    // create and add a new one
    try {
    // Create a new JDBC Connection
    Connection con = createConnection();
    // Create a new PooledConnection, passing it the JDBC
    // Connection
    pcon = new PooledConnection(con);
    // Mark the connection as in use
    pcon.setInUse(true);
    // Add the new PooledConnection object to the pool
    pool.addElement(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // return the new Connection
    return pcon.getConnection();
    // When shutting down the pool, you need to first empty it.
    public synchronized void emptyPool() {
    // Iterate over the entire pool closing the
    // JDBC Connections.
    for ( int x = 0; x < pool.size(); x++ ) {
    System.err.println("Closing JDBC Connection " + x);
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // If the PooledConnection is not in use, close it
    if ( pcon.inUse() == false ) {
    pcon.close();
    else {
    // If it is still in use, sleep for 30 seconds and
    // force close.
    try {
    java.lang.Thread.sleep(30000);
    pcon.close();
    catch (InterruptedException ie) {
    System.err.println(ie.getMessage());
    I am using Sun JDK Version 1.3.0_02" and Apache/Tomcat 4.0. Both the calling and the called class are in the same directory.
    Any help would be greatly appreciated.
    tnx..
    addi

    Is ConnectionPool in this "cal" package as well as PooledConnection? From the directory you are compiling from it appears that it is. If it is, then you are compiling it incorrectly. To compile ConnectionPool (and PooledConnection similarly), you must change the current directory to the one that contains cal and type
    javac cal/ConnectionPool.

  • Error while trying to load java classes

    I am doing a 9iAS installation - at the end
    of the installation I get an error stating
    that the SSOHash class has not been loaded into the database. When I run the loadjava utility to load the class into the database
    I get the following error:
    ora-29545: badly formed class: user has
    attempted to load a class (oracle.security.sso.SSOHash) into a restricted package. Permission can be granted by using dbms_java.grant_permission.
    When I execute the dbms_java package I get
    the following error:
    ora-29532: classnotfoundexception
    ora-06512: at "SYS.DBMS_JAVA", line 0
    The install is being carried out on Solaris.
    and the jdk version of the OS is 1.1. I read
    in the oracle documentation that Oracle 8i
    uses Java 2 compliance. Would it be a good
    idea to upgrade the os jdk to 2.0 and do
    a fresh install or are there workarounds.
    Any help would be greatly appreciated.
    Thanks,
    Suzanne

    This is a little late, but it sounds like you don't have the Java option installed on the database.

Maybe you are looking for