Main() testing program errors

Dear,
I am very new and trying my best to write a program - to read, search and print the student record - name, id and GPA. Now, I get the 2 errors to run my class.
Please advise
Your advice would be appreciated. thanks
1. Add Class :
import java.io.*;
import java.util.*;
public class AddStudent
     public AddStudent(Vector a)
          String tempId;
          String tempName;
          float tempGpa=0f;
          try{
          InputStreamReader is = new InputStreamReader (System.in);
          BufferedReader console = new BufferedReader (is);
          System.out.print("Please enter the student number: ");
          String ans = console.readLine();
          tempId = ans ;
          //System.out.println(tempId);
          System.out.print("Please enter the student name: ");
          ans = console.readLine();
          tempName = ans ;
          System.out.print("Please enter the GPA: ");
          ans = console.readLine();
          tempGpa = Float.parseFloat(ans);
          a.addElement(new Student(tempId, tempName, tempGpa));
          }catch( java.io.IOException ex) {
          ex.printStackTrace(); }
2. Main
import java.util.*;
import java.io.*;
public class OptionMenuTest
     public static void main(String[] args)
          //store the input student record with Vector class (included in java.util package)
          Vector studentList = new Vector();
          if (option == 1)
               AddStudent addStudent = new AddStudent(Vector studentList);
               System.out.println("added" + studentList);
3. Compile result :
javac OptionMenuTest.java
OptionMenuTest.java:37: ')' expected
AddStudent addStudent = new AddStudent(Vector studentLis
t);
^
OptionMenuTest.java:37: cannot resolve symbol
symbol : variable Vector
location: class OptionMenuTest
AddStudent addStudent = new AddStudent(Vector studentLis
t);
^
2 errors

Spend more time on learning the stucture of the language, then less errors you will get!
Easy way to learn meaning of "error massages" is to make these errors on-purpose and compare results.
Regards
Giz

Similar Messages

  • Sample delivered simple cobol test program error

    Hi,
    I am receiving the below error, When I try to run the delivered cobol program on my new production linux server. (The same program executed successfully in my Dev and test servers.)
    Compiled and linked the cobol program successfully.
    Any help on this highly appreciated.
    SUCCESSFUL DATABASE CONNECTION
    Application Program Failed
    Action Type     : SQL UPDATE                  
    In Pgm Section  : SQLRT: SQL-STMT-GET                                                                                                                                       
    Error Message   : Stored Statement PTPUSTAT_U_PRCRQSE not found
    Stored Stmt     : PTPUSTAT_U_PRCRQSE
                                           at pos 00028
    PTPSQLRT - Error Encountered
    No longer have connection to DB due to an error from previous
    action: SQL UPDATE                    . Bypassing current action: SQL SELECT                    .
    Terminating Program.
    Thanks
    Soundappan

    The error message indicates that a stored statement is missing from PS_SQLSTMT_TBL. This table is initially loaded by the dms scripts that run when the database is created (something like epengs.dms), but there is a later step in the installation guide--Updating PeopleTools System Data--which instructs you to run the storept.dms script. This would have refreshed all stored statements for programs that start with PT. If you still have your log files you can check to see if this was run, or if it encountered errors. Either way, you can run the dms script to fix the problem. If this task was missed, though, you might want to verify that this was the only task that was missed.
    Regards,
    Bob

  • XDC error while running test program FP_CHECK_DESTINATION_SERVICE

    Hi, all.
    We are on ECC 6.0 backend single stack and EP6 on NW04 SP17. I have installed the ADS on the java stack on EP6. However, I could not get the XDC working. Note that I am just using http for the ADS, not https.
    When I run the test programs like FP_TEST_00, FP_CHECK_DESTINATION_SERVICE and FP_CHECK_HTTP_DATA_TRANSFER on the ABAP side, it keeps giving me error:
    #1.5#000802104262006000000015000005F0000453556EDC6093#1217526304263#com.adobe.AdobeDocumentServices#com.adobe/AdobeDocumentServices#com.adobe.AdobeDocumentServices#ADSUser#226#SAP J2EE Engine JTA Transaction : [045ffffffc4ffffffbe0006]###67a637e05f2811dda73c000802104262#SAPEngine_Application_Thread[impl:3]_6##0#0#Error#1#/System/Server#Plain###Processing exception during a "Render" operation.
    Request start time: Thu Jul 31 13:45:03 EDT 2008
    com.adobe.ProcessingError: No <Render><Output><XDC> specified
    However, other checks like http://<server>:<port>/AdobeDocumentServices/Config, FP_PDF_TEST_00 and http://<server>:<port>/sap/bc/fp/form/layout/fp_test_00.xdp, are successful.
    I noticed that the AdobeDocumentServices is missing on the ECC6 since it is single stack. But the folder exists on the EP6 server. From my readings, the XDC is called via RFC against the  FP_ICF_DATA_<SID> destination which I have already setup in EP6.
    So I am really out of idea. Can you please help?
    Thanks,
    Jonathan.

    Well, I am pretty familiar with the ADS config guide now.
    The RFC connection used by Adobe is ADS on sm59. I can run connection test without a problem.
    By the way, the AdobeDocumentServices directory under SYS\global has the following sub-dir:
    DataManagerService
    DestProtoService
    FontManagerService
    lib
    LicenseSupportService
    PDFManipulation
    RenderErrorlog
    ServicesNatives2
    TrustManagerService
    XMLFormService
    I have to create the RenderErrorlog manually. Also, the folders DataManagerService and DestProtoService, RenderErrorlog are empty. Can you check your server and see if you have files underneath these folders?
    I am suspecting something is corrupted on the system because I took over the system from someone.
    Thanks,
    Jonathan.

  • Could not find main class program will exit error while installing Oracle Client 32 bit on windows 7 32 bit OS?

    Hi Experts,
    When I am installing Oracle client 32 bit software on Windows 7 32 bit I am getting error as "could not find main class program will exit"
    I have tried installing latest Java software 7 also JDK 1.6.0_34 still I am getting the same problem below is my " oraparam.ini " details
    [Oracle]
    DISTRIBUTION=TRUE
    SOURCE=../stage/products.xml
    LICENSE_LOCATION=
    BOOTSTRAP_COMPS="oracle.swd.oui:11.1.0.6.0,oracle.swd.oui.core:11.1.0.6.0,oracle.jdk:1.5.0.1.1"
    JRE_SCRATCH_LOC=jdk/jre
    JRE_MEMORY_OPTIONS=" -mx96m"
    DEFAULT_HOME_LOCATION=product\11.1.0\client
    DEFAULT_HOME_NAME=OraClient11g_home
    NO_BROWSE=/net
    NLS_ENABLED=TRUE
    BOOTSTRAP=TRUE
    EXT_JLIB=../stage/ext/jlib
    OUI_VERSION=11.1.0.6.0
    ## JRE_VERSION is only for Windows. This is to copy accessbridge dlls
    JRE_VERSION=1.4.2
    ACCESS_DIR=../install/access
    #SHOW_HOSTNAME=ALWAYS_SHOW shows the hostname panel always
    #SHOW_HOSTNAME=NEVER_SHOW does not the hostname panel
    #SHOW_HOSTNAME=CONDITION_SHOW shows the hostname panel on condition
    SHOW_HOSTNAME=NEVER_SHOW
    #THIN_JDBC_FILENAME is optional and defaults to classes12.jar
    #The value specified for this should be packaged with OUI, and should
    #be relative to <OUI expanded stagedir>/jlib/
    THIN_JDBC_FILENAME=classes12.jar
    #RUN_OUICA specifies the batch script name that needs to be run
    #The script is ouica.bat for win32, and ouica.sh for solaris.
    #If the value is not specified, then the OUICA script is not run
    RUN_OUICA=ouica.bat
    CLUSTERWARE={"oracle.crs","10.1.0.2.0"}
    SILENT_VARIABLE_VALIDATION=TRUE
    [Generic Prereqs]
    MIN_DISPLAY_COLORS=256
    [IMAGES]
    FILE1=images/billboards.gif
    LICENSE_LOCATION=license.txt

    Duplicates of the other two times you asked this question:
    https://forums.oracle.com/thread/2559093
    https://forums.oracle.com/thread/2558027
    (and this time, your question does not appear to have anything to do with this particular forum space, either)
    Duplicate is locked.
    Do not EVER multi--post.   That is extremely bad forum etiquette.

  • Runtime error in F-48( Test environment error in SAPLGLT0 program )

    Hi Expert,
    i am getting the run time error while run the F-48 tcode in program "SAPLGLT0" and include "LGLT0FER"
    if i do the Extended program check of SAPLGLT0 program i am getting
    Test environment error like : The namespace of the program SAPLGLT0 has the setting "C" and cannot be tested A pssible cause for this is that an SAP program is being checked in a customer System
    How to correct that ? is any sap note available ?
    Thanks and Regards,
    GR

    Hi,
    Please check the following notes
    Note 1242773 - Getting short dump when doing GR for combined requisitions
    Note 1047059 - Run time error in migo/Goods receipt
    Regards,
    Jigar

  • Error msg Could not find the main class.Program will exit. in jar execution

    Hello,
    I have created a jar so that I can used it in the webapp.
    but when I click on it it says "Could not find the main class.Program will exit."
    I searched a lot in the net and found that it has to do with the manifest file.
    I even updated the manifest file using the command "jar umf main.txt filefolderupload.jar" with the class name mention along with the package heirarchy.
    (pakage heirarchy in /,\ and .)
    I am using JDK 1.5 . and have Updated JRE 1.6.
    Also tried with extending the class with JApplet, but in vain.
    Kindly help me in the above mention issue.
    tia,
    Sarwa

    This post hints at a number of misunderstandings on your part, and raises a couple of important questions.
    Note that this 'simple question' has a complicated answer. Given the complexity of it, it might pay to add Dukes to it, ..a lot of Dukes.
    The important questions are.
    1) Does this file/directory uploader need to provide the end-user with a file dialog in which they can choose a local directory to upload, or will a multi-file chooser do?
    2) Does this uploader need to upload to foreign sites, or does it upload back to its own server?
    Looking at this table I prepared to describe the [uploader/local file access|http://pscode.org/test/uploader/fileuploader.html] possibilities, if the answers to the questions are 'multi-file chooser will do' and 'home site only', the best option is a sandboxed app. launched using webstart (JNLP) - option 5. If either of those questions go the other way, option 6 (digitally signed with extended permissions) is needed.

  • Error message encounter in ODBC 32bit test program

    I am using the Oracle ODBC 32 Bit test program (from Oracle 8i client) to test my ODBC connection. I did this: Press Connect, Choose my desire ODBC connection, a screen pops up asking for service name, user name and password, I filled in the boxes with the correct value, then the following error comes up:
    [Start quote]
    SQLSTATE: 01000
    Native Error Code:444
    Driver Message: The driver returned invalid (or failed to return) SQL_DRIVER_ODBC_VER: 03.51
    Need Any suggestions to avoid error?
    [End quote]
    Does anyone have any idea what this is all about? I tried to follow the suggestions but the suggestions doesn't work. It seems outdated already.
    Thanks very much!

    I'm guessing that your version of the MDAC (Microsoft Data Access Components) is out of date & doesn't realize that the ODBC 3.51 spec exists. You can download the updated version at <http://www.microsoft.com/data>. The README that comes with your ODBC driver should indicate which version of the MDAC to install.
    Justin

  • Error:-could not find the main class programe will exit(Java virtual mach)

    Hi,
    i changed the mainfest file for an executive jar file(judge.jar) using the command on dos :-"jar cvfm judge.jar c:\judge\MAINFEST.MF -C judge/ ." , but when i run this jar file again after making changes in mainfest file it is not working. an error encounter like "could not find the main class programe will exit how to solve"(Java virtual machine launcher).please suggest me how to solve this error.
    Thanks
    Ashwani Gupta

    Hi,
    mainfest file has a entry like "main -class: judge.repository.corpus"
    please tell me the solution of this error i am doing internship in national university of singapore......and my project is related to data mining.I am using judge.jar when i extract this jar files i saw there was no main-class in manifest file so i change it and make it again jar file using dos command.please suggest me how i can reomove this error.
    Thanks in advance.
    Ashwani

  • Jar file error: could not find main class. program will exit

    I have created a jar file using following command
    jar cfm MyProj.jar Manifest.txt richa\*.class
    and I have included main class header in the Manifest.txt. The executable jar file is created but when I double click on it, it prompts an error Could not find the main class. program will exit.
    Please help. Its urgent..
    Thanks in advance

    This simply state that jvm was unable to fine Main Class file.
    I hope you have configured manifest file including your main file information and class path used by the project with proper package hierarchy,
    as described in article
    [https://java.sun.com/docs/books/tutorial/deployment/jar|https://java.sun.com/docs/books/tutorial/deployment/jar]
    Edited by: Deepesh on Jul 13, 2008 4:58 AM

  • FXTrans Script runs on error: UJK_EXECUTION_EXCEPTION:Run program error

    Dear Experts,
    I found a couple of messages related to this topic but unfortunately no solution that fits for me. I have the following problem. In 7.0 we implemented a very simple prototype currency translation and it worked just fine. We migrated the appsets etc. to 7.5 SP4 and I was gonna run the currency translation but the script gives me the following error in the package as well as in the script logic tester:
    RUN CURRENCY CONVERSION
    EXCEPTION OCCURRED WHEN RUNNING PROGRAMS:
    Error found in BPC
    UJK_EXECUTION_EXCEPTION:Run program error, Message Number: ""
    For that reason, the package of course runs on an error.
    This is my FXTRANS-Script:
    *RUN_PROGRAM CURR_CONVERSION
    CATEGORY = %CATEGORY_SET%
    CURRENCY = %RPTCURRENCY_SET%
    TID_RA = %TIME_SET%
    OTHER = [ENTITY=%ENTITY_SET%]
    RATEENTITY = GLOBAL
    *ENDRUN_PROGRAM
    This is my Test-Script for the Checker:
    *RUN_PROGRAM CURR_CONVERSION
    CATEGORY = V301
    CURRENCY = EUR
    TID_RA = 2011.JAN
    OTHER = [ENTITY=S21001]
    RATEENTITY = GLOBAL
    *ENDRUN_PROGRAM
    I am very sure that I maintained all needed dimensions and properties. I just dont understand why the system gives me such a weird error message. I'm desperate.
    Thanks in advance,
    Cora

    Dear CoraBo
    I hope you 've configured " Currency Conversion Business Rules" in main Financial App, as required.
    In the meanwhile, as I could not find much details of error LOG report in your message,  I suggest you to have some insight of possibility of error ("UJK_EXECUTION_EXEPTION:Run Program Error") in the following thread for your reference:
    Currency Conversion
    Hope this will help you, for some extent.
    Regards
    ukraghu

  • Error:  "Could not complete your request because of a program error" (photoshop CS2 9.0.2 on MAC OSX

    Today I started my program (photoshop CS2 9.0.2) and opened a JPG file. When I went to print the file the program crashed and closed. When I restarted the program and went to open the file I got this error message, "Could not complete your request because of a program error".
    I have tried several different file types/sizes and all result in the same error message since the program crashed. It will not open any file I try to open. As I indicated above I am using Photoshop CS2 9.0.2 it is on a MAC with OSX 10.4.11.
    I called Adobe and the Rep directed me to Tech Note 331307 and told me to Re-create the Photoshop preferences files. Which I did and restarted the program, but when I tried to open a file (any file) I still get the same error message so it doesn't appear to be the preferences.
    Does anyone have any info as to what the problem may be and how to correct it.
    Thanks

    Thanks for the response. OK... This is the first day I have been able to get back to the problem.
    My system I am running Photoshop on is a Power Mac G4, AGP Graphics ATY Rage 128Pro chip set 16MB VRAM LCD 1280x1024 32-bit color, 500MHz, 1.75GB of memory, 1 MB L2 Cache, 100 MHz Bus Speed. I had installed the latest security update and repaired the permissions the day the problem started.
    Now to day I started the system and went in and created a Guest Account. I logged into the guest account and started Photoshop. Low and behold it worked just fine. So I logged out of guest and logged into my main user account And started Photoshop. Wouldn't you know it.... It works just fine. I can open any file I want with now problems.
    I got to thinking after I had done all of this that I wished I had tried to open a file in Photoshop today prior to creating the guest account to see if it still had the problem in my main user account.
    I did not change anything else on the system and all seems to work fine now. So at his point I am really not sure what the problem was.
    Again thanks for taking the time to respond to this issue.

  • "Program error" When I click on the timeline/motion controls or try to export/save as my animation. PS CC late 2014

    I have been working on an animation for an online ad. The file is 300 by 250. It's about 24 seconds long. I had completed and saved my work as a GIF file. I also saved some static JPGs of the animation. Everything was still working at this point. Then I closed Photoshop and reopened the PSD file to export it to a different format, but when I clicked on the time-marker in the timeline window or tried to edit my animation, I got this error message: "could not complete your request because of a program error." Watch the following video to see exactly what happens:
    I'm running Adobe Photoshop CC November 2014. I'm working on a PSD file, 24 seconds long, 30 fps.
    I looked in my library/preferances/adobe folder for photoshop's error log file. This is the error in that file:
    2014:11:12 18:30:17 : /Volumes/workarea/PS_15_Mac_Daily_Retail/20140730.r.148/photoshop/main/photoshop/sources/ ULinkManager.cpp : 1380 : REQUIRE failed
    Thank you so much for reading this. It sucks to work so long on an ad and then have this happen for seemingly no reason. Please help if you can.

    Looks like issues with some linked smart objects... You could try and copy/ move the whole shebang to another location in the hopes that it either fixes the issue or PS completely forgets the linked files completely so you might relink/ replace them.
    Mylenium

  • Adobe Photoshop CS6 Extended Could not complete your request because of a program error.

    When starting Photoshop CS6 I get this error message, Adobe Photoshop CS6 Extended  Could not complete your request because of a program error (-- OK --).  This happens on the main screen immediately.  Once I click OK the program seems to be alright.  But some part of it, that I haven't discovered yet, may not function properly.
    I am running Windows7 Professional Service Pack 1 64 bit with Intel i7-4770k CPU and 16 GIG Ram.
    This problem just started recently, everything has been fine up till now.  I must have done something when trying to defragment the Registry or get rid of temp files.
    I have uninstalled Photoshop CS6 and reinstalled it with no effect.  I have tried to run Photoshop CS6 32 bit in Safe Mode, but it will not run.  It hangs up on Reading Memory.
    Is there any kind log file that would tell me what is causing this to occur?
    Does anyone know what might cause this?
    Thank you in advance for any helpful information.
    J. J. Patterson

    Did you reset your Preferences and Photoshop tools.  Photoshop Preferences are not removed with an un-install and an Install does not install preferences.  Preferences are created  for a user id when a user ID start Photoshop  and there are no preferences for the user ID.    

  • Photoshop CS 'Program error' but works in different account

    My version of Photoshop CS suddenly stopped working. It said 'program error' when I try to load any files. Then, after quitting, it failed to reload each time.
    I have tried reinstalling, then uninstalling fully (through Adobe's uninstall procedure). Also, deleting the preferences and font caches but still no luck. So I downloaded the try out version of CS2 and it installed fine. But it now says exactly the same thing '
    I created a new account on the computer and tried it from there - and it worked! So I then copied my preferences to that account and it still worked, so I guess it isn't the preferences.
    It seems there is something wrong with my main account but not sure where to look. Is it easy to transfer all setting and all files to the new account?
    Thanks
    Alan

    I had a lot of grief with this exact problem. I fixed it by deleting my printers in mac OSX preferences. I have not re-added them yet, but since removing the printers I have not had the problem occur since - and this is after an erase and install, an archive and install,upgrading to CSII and calls to Adobe phone support were of no help. Everything else in the CS suite worked, except photshop. Photoshop would work if I created a new user account, but this work-around was not acceptable to me. In desperation, with deadlines looming, I was about to do another erase and fresh install when I found this:
    Solution 6: Re-create your printers in Mac OS X.
    To re-create your printers, first delete them and then add them again.
    To delete your printers:
    1. Open System Preferences from the Apple menu.
    2. Select Print & Fax, and click Printing.
    3. Select each printer in the list and click the delete key (the minus key).
    For instructions on how to add your printers again, see "Setting up to print to a printer" in Mac Help or search Help using the phrase "add a printer."
    http://www.adobe.com/support/techdocs/331627.html
    That fixed the problem for me and I really hope that helps someone else. This was a terrible and frustrating problem for me, not only am I a design student but I also earn a living using the Adobe software and my mac, and Photoshop is one of my primary tools.

  • Photoshop CC 2014.2.2 program error when I place a layer or open a new file

    I have just updated to the most recent PS CC2014 version. Twice, in fact, and the same problem persists. At some point while working on a file it will become impossible to place a new layer or open a new file. Other program functions work, but these will produce an error message: "Could not complete your request because of a program error." It's very frustrating and the only solution is to restart the program which will run fine for a while and then do it again.
    Is anyone else experiencing this? Or better still, has anyone found a solution to this issue?
    Richard

    I am experiencing a similiar problem.
    Ever since I upgraded to CC I have received this error after using Photoshop for more than 5 mins, or trying to performing tasks such as: placing a linked file, copying and pasting, dragging and dropping an image or even using "File>Open"
    I did a complete system clean install of Yosemite, and reinstalled CC completely 3 times.
    Any assistance in resolving would be greatly appreciated!
    Error Log Text:
    2015:01:06 13:41:33 : tracked key 0000000000001468 of type P5_ADsc not found : 1 : REQUIRE failed
    2015:01:06 13:41:33 : /Volumes/workarea/PS_15_Mac_Daily_Retail/20141204.r.310/photoshop/main/photoshop/xcode/.. /interfaces/UTrackResourceImp.h : 137 : REQUIRE failed
    2015:01:06 13:41:33 : tracked key 00000000000010C0 of type P5_ADsc not found : 1 : REQUIRE failed
    2015:01:06 13:41:33 : /Volumes/workarea/PS_15_Mac_Daily_Retail/20141204.r.310/photoshop/main/photoshop/xcode/.. /interfaces/UTrackResourceImp.h : 137 : REQUIRE failed
    2015:01:06 13:41:33 : tracked key 0000000000000E38 of type P5_ADsc not found : 1 : REQUIRE failed
    2015:01:06 13:41:33 : /Volumes/workarea/PS_15_Mac_Daily_Retail/20141204.r.310/photoshop/main/photoshop/xcode/.. /interfaces/UTrackResourceImp.h : 137 : REQUIRE failed
    2015:01:06 13:41:33 : tracked key 0000000000000460 of type P5_ADsc not found : 1 : REQUIRE failed
    2015:01:06 13:41:33 : /Volumes/workarea/PS_15_Mac_Daily_Retail/20141204.r.310/photoshop/main/photoshop/xcode/.. /interfaces/UTrackResourceImp.h : 137 : REQUIRE failed

Maybe you are looking for