When compiling I get msg: Class java.io.* not found in import.

import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
public class CheckNumber {
//program that checks the input buffer has valid integer value
     public static void main(String[] args) {
          String inLine = null;
          int checkInteger = 0;
          try {
          BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in) );
          System.out.print("Enter a valid Integer and hit <ENTER>: ");
          inLine = inStream.readLine();
          checkInteger = Integer.parseInt(inLine);
          } catch (NumberFormatException nfe) {
          System.out.println("You did not enter a valid Integer: " + nfe);
          return;
          } catch (IOException e) {
          System.out.println("IOException: " + e);
          return;
          System.out.println("You entered a valid Integer: " + checkInteger);
Compiling produced the following output:
C:\jdk\work1>javac CheckNumber.java
CheckNumber.java:1: Class java.io.InputStreamReader not found in import.
import java.io.InputStreamReader;
^
CheckNumber.java:2: Class java.io.BufferedReader not found in import.
import java.io.BufferedReader;
^
CheckNumber.java:12: Class java.io.BufferedReader not found in type declaration.
BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in) );
^
CheckNumber.java:12: Class java.io.InputStreamReader not found in new.
BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in) );
^
CheckNumber.java:15: Class java.io.BufferedReader not found in void main(java.lang.String[]).
inLine = inStream.readLine();
^
CheckNumber.java:21: Exception java.io.IOException is never thrown in the body of the corresponding try statement.
} catch (IOException e) {
^
6 errors

I recently did a standard installation of jdk 1.5.
This is the first time I am trying import.
I set the path:
set path=c:\jdk\bin
Hmm...
C:\jdk\bin>java -version
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Client VM (build 1.5.0_15-b04, mixed mode, sharing)
C:\jdk\bin>javac -J-version
'javac' is not recognized as an internal or external command,
operable program or batch file.
There's no javac.exe file.
I have javaw.exe and java.exe.

Similar Messages

  • 'invalid class-java beans not available for import

    Hi Experts,
    i am using java bean model in my Web Dynpro Application.
    for that one i have created command bean(Customer) and in my command bean i am using some other class(CustomerInfo) as reference. this CustomerInfo class contains 4 attribtes(name ,id ,etc  all are of type String)
    when i try to import these 2 class into web dynpro (using java bean model),for the Customer class it
    is giving an error message 'invalid class-java beans not
    available for import'.but 2nd class(CustomerInfo) is imported successfully with out giving the error.what might be reason.
    any help will be appriciated
    Thanks in advance
    With Regards
    Naidu

    Naidu,
    Please try to repeat JavaBean model import when running IDE in console mode (correspondign short-cut should be available in Windows Start menu, otherwise just copy original short-cut, edit it and change in command string "javaw" to java).
    Post here what is shown on console during import.
    VS

  • Package com.sun.java.swing not found in import

    I'm trying to show graphic information but the swing package does not load up don't know what is going on Any help is welcome
    THIS IS THE LINE I GET WHEN I TRY TO IMPORT SWING
    Package com.sun.java.swing not found in import

    I'm trying to show graphic information but the swing
    package does not load up don't know what is going on
    Any help is welcome
    THIS IS THE LINE I GET WHEN I TRY TO IMPORT SWING
    Package com.sun.java.swing not found in importThat's an old package reference. Try javax.swing

  • Invalid Class -Java Bean not available for import

    hai friends,
    i have declared the bean but unable to import into webdynpro application
    i am geting the error invalid Class-java bean Not available for improt
    i am try for this since more than 10 days , i get the same error
    even i thought there may be issues with nwds , i have installed thrice.
    there is application download from the sdn tu_bonus calculation it is working 
    plz help me  neede very urgently

    Hi,
    Go thro' these solved threads dealing with similar type of problem,
    Import JavaBean Error : Invalid Class
    invalid class - ..as Model Class already exist
    Hope it helps to fix the error !
    Regards
    Srinivasan T

  • IT7, when changing options, get "Waiting on iPod", then not found.

    I keep getting this wierd error when I try to change the options in IT7, I see the "Updating...", then a dialog pops up and says "waiting for ipod" then andother that it can't find it.
    This also happens if I let it sit for a while with no activity.
    iPod doesn't get "unmounted" from IT, it just can't seem to find it. I still see the iPod icon on the desktop.
    Something iss definitly up with IT7...
    Any suggestions?

    It sounds like your iPod might be "stuck" in disk mode....try resetting the iPod:
    http://docs.info.apple.com/article.html?artnum=61705
    then, try again...it's a place to start!

  • FirstGUI.java:7: Package java.swing not found in import.

    Hi,
    I am currently taking JAVA at UGA and am trying to learn the GUI part on my own, since our professor is not going to cover this. This is the first error I get when I compile the program. Any help is greatly appreciated...
    Thanks,
    Joe
    Below is the program...
    /* A first GUI. This class creates a label and a button. The count in the label is incremented each
    time that the button is pressed.
    import java.awt.*;
    import java.awt.event.*;
    import java.swing.*;
    public class FirstGUI extends JPanel {
         // Instance variables
         private int count = 0;          // Number of pushes
         private JButton pushButton;     // Push button
         private JLabel label;          // Label
         // Initialization method
         public void init() {
              // Set the layout manager
              setLayout( new BorderLayout() );
              // Create a label to hold the push count
              label = new JLabel("Push Count: 0");
              add( label, BorderLayout.NORTH );
              label.setHorizontalAlignment( label.CENTER );
              // Create a button
              pushButton = new JButton("Test Button");
              pushButton.addActionListener( new ButtonHandler (this) );
              add( pushButton, BorderLayout.SOUTH );
              // Method to update push count
              public void updateLabel() {
                   label.setText( "Push Count: " + (++count) );
         // Main method to create frame
         public static void main(String a[]) {
              // Create a frame to hold the application
              JFrame fr = new JFrame("FirstGUI ...");
              fr.setSize(200,100);
              // Create a Window Listener to handle "close" events
              WindowHandler 1 = new WindowHandler();
              fr.addWindowListener(1);
              // Create and initialize a FirstGUI object
              FirstGUI fg = new FirstGUI();
              fg.init();
              // Add the object to the center of the frame
              fr.getContentPane().add(fg, BorderLayout.CENTER);
              // Display the frame
              fr,setVisible( true );
    class ButtonHandler implements ActionListener {
         private FirstGUI fg;
         // Constructor
         public ButtonHandler ( FirstGUI fg1 ) {
              fg = fg1;
         // Execute when an event occurs
         public void actionPerformed( ActionEvent e ) {
              fg.updateLabel();
    }

    The error is below...
    A:\ENGR1140>javac FirstGUI.java
    FirstGUI.java:39: Identifier expected.
    public static void main(String s[]) {
    ^
    FirstGUI.java:39: 'class' or 'interface' keyword expected.
    public static void main(String s[]) {
    ^
    I don't think the actual error is on line 39, I looked in the book that has the code and line 39 is typed just as it is shown in the book.
    Below is the program...
    /* A first GUI. This class creates a label and a button. The count in the label is incremented each
    time that the button is pressed.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class FirstGUI extends JPanel {
         // Instance variables
         private int count = 0;          // Number of pushes
         private JButton pushButton;     // Push button
         private JLabel label;          // Label
         // Initialization method
         public void init() {
              // Set the layout manager
              setLayout( new BorderLayout() );
              // Create a label to hold the push count
              label = new JLabel("Push Count: 0");
              add( label, BorderLayout.NORTH );
              label.setHorizontalAlignment( label.CENTER );
              // Create a button
              pushButton = new JButton("Test Button");
              pushButton.addActionListener( new ButtonHandler (this) );
              add( pushButton, BorderLayout.SOUTH );
              // Method to update push count
              public void updateLabel() {
                   label.setText( "Push Count: " + (++count) );
         // Main method to create frame
         public static void main(String s[]) {
              // Create a frame to hold the application
              JFrame fr = new JFrame("FirstGUI ...");
              fr.setSize(200,100);
              // Create a Window Listener to handle "close" events
              WindowHandler 1 = new WindowHandler();
              fr.addWindowListener(1);
              // Create and initialize a FirstGUI object
              FirstGUI fg = new FirstGUI();
              fg.init();
              // Add the object to the center of the frame
              fr.getContentPane().add(fg, BorderLayout.CENTER);
              // Display the frame
              fr,setVisible( true );
    class ButtonHandler implements ActionListener {
         private FirstGUI fg;
         // Constructor
         public ButtonHandler ( FirstGUI fg1 ) {
              fg = fg1;
         // Execute when an event occurs
         public void actionPerformed( ActionEvent e ) {
              fg.updateLabel();

  • MyApplet.java:2: Class netscape.javascript.JSObject not found in import.

    Hi,
    Im getting: MyApplet.java:2: Class netscape.javascript.JSObject not found in import.
    import netscape.javascript.JSObject;
    Where can i get this package. Someone said jaws.jar, but its not to be found. Im new on this project and I dont know how the old people compiled this applet.
    JDK version is:
    Solaris VM (build Solaris_JDK_1.2.2_10, native threads, sunwjit)
    Thanks

    Thanks man!
    I installed the jdk1.4 on my workstation. I then compiled the program via JDeveloper and pumped the class over to my server.
    Thanks again.

  • Compiler error "oracle.xml.parser.v2.XMLElement" not found in class com.ora

    Compiler error "oracle.xml.parser.v2.XMLElement" not found in class com.oracle.demos......?
    I am currently testing a simple sample application with a java code similar to the one shown at
    the bottom of this post.
    However during deployment/compilation the compiler gives an error:
    Error(26,23): XMLElement not found in class com.oracle.demos.orderbooking.ApproveImpl
    Additionally similar other errors appear:
    Error(23,66): JAXBException not found in class com.oracle.demos.orderbooking.ObjectFactory
    Error(51,58): UnmarshalException not found in class com.oracle.demos.orderbooking.ObjectFactory
    Error(9,92): Element not found in interface com.oracle.demos.orderbooking.Approve
    What's wrong?
    It seems to me that I have to add some (more) *.jar files/libraries to the project?
    Which *.jars and where should I add them in JDeveloper?
    source code:
    package com.oracle.demos.orderbooking;
    public class ApproveImpl extends com.oracle.demos.orderbooking.ApproveTypeImpl implements com.oracle.demos.orderbooking.Approve
    public ApproveImpl(oracle.xml.parser.v2.XMLElement node)
    super(node);
    }

    Hai James this the response I am getting can you please tell what should I write inside ora:getNodeValue() to get the value of node <genReturnText>
    The drag and dropping the variable name is not working, I have to write the path manually but I dont know how.
    <ns1:getRoutingAndFrameJumpersResponse xmlns:ns1="com.NetworkInstallations">
    -<com.GetRoutingAndFrameJumpersOutput>
    <destination>
    SW
    </destination>
    <e2EData>
    busProcOriginator
    </e2EData>
    <genReturnCode>
    40777
    </genReturnCode>
    <genReturnText>
    EMW_Get_Routing_And_FrameJumpers_Succeeded
    </genReturnText>
    <supplCode>
    ISY002
    </supplCode>
    <supplText>
    Transaction successfully completed.
    </supplText>
    <severityCode>
    S
    </severityCode>
    <retriable>
    false
    </retriable>
    </com.GetRoutingAndFrameJumpersOutput>
    </ns1:getRoutingAndFrameJumpersResponse>

  • Getting Error base class BitmapAsset was not found

    I am converting a project using Away3D boomstick to the new FL11 version. I have installed the 4.5.1 SDK, dropped in the new away3d classes, added the flashplayer11_b1_playerglobal_071311.swc and now I get the following error.
    Description Resource Path Location Type
    1017: The definition of base class BitmapAsset was not found. Mercer-Molehill line 10 Flex Problem
    Any Ideas? I really need to get this working for a demo tomorrow.

    It seem the right playergloblal is not accessed. If You compile in Flash IDE make sure that ActionsScript Settinng is configure with the rigth paths.
    The SDK 4,5 has change the name of flex.swc to core.swc and others files.
    Flex 4.5 Framework Differences
    flex.swc and utilities.swc were renamed to core.swc and authoringsupport.swc
    The datavisualization.swc was split into charts.swc and advancedgrids.swc.
    Path to sdk
    I put all those SWC in a folder in C:\Program Files (x86)\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\flex_sdk\4.5\
    Flash Actionscript  settings. -> library path ->add the path till sdk
    Configure globalplayer.swc. in Flash
    in Common-Configuration/Player created a copy of FlashPlayer10_3.xml to FlashPlayer11.xml.
    <player id="FlashPlayer11" version="12" asversion="3">
       <name>Flash Player 11</name>
    Finally
    Flash Actionscript  settings. -> library path ->add path till globalplayer
    it work for me. ( tell me if I done wrong please).

  • On my iPad, when I try to open a movie I purchased from iTunes, I get "The requested URL was not found on this server."

    On my iPad, when I try to open a movie I purchased from iTunes, I get "The requested URL was not found on this server."  It's on my laptop but when I play it there, it 'jerks' every couple of seconds.  How can I fix both these issues?  Thanks!!

    Select the content which is causing a problem and use the 'Report a problem' button in Your Purchase History on your computer.

  • I get error message''one file not found'' when tring to sync Ipod Nano 6th gen to I tunes. Help

    I get error message''one file not found'' when tring to sync Ipod nano 6th gen to Itunes. Help

    See:
    iTunes cannot sync... apps not determined installed on...: Apple Support Communities
    installed apps could not be determined...: Apple Support Communities

  • I get "disc burner or software not found" when I try to burn a playlist.

    I am now getting "disc burner or software not found" when I try to burn a playlist from iTunes version 10.6.1.7 on Windows 7 PC. I've not added any new burner software or made any software changes of any kind. I have NERO 8 and I checked the "burn rights" is set for "everyone".
    Is the any solution?
    NASA_1967 

    Could you post your diagnostics for us please?
    In iTunes, go "Help > Run Diagnostics". Uncheck the boxes other than DVD/CD tests, as per the following screenshot:
    ... and click "Next".
    When you get through to the final screen:
    ... click the "Copy to Clipboard" button and paste the diagnostics into a reply here.

  • Unable to update, when executed table gets lock and Execution does not stop even for an hour.

    Following is my Query, which unables to update. When Executed, table gets lock and Execution does not stop even for an hour.
    update Employees 
          set Status = 'Close'
          where statusid IN (select statusid 
                                             from MyView 
                                              where DownloadedDate ='2014-07-27 00:00:00.000'
    here Employee contains 3,00,000 of records and Subquery return 1,50,000 Empid 
    i tried in various ways but not able to solve, statusid  column have no index on,  i tried using cursor but it does not work.
    plz let me know how to solve this Issue, Its very Important to get solve as all my further work depends on Updation
    , THANKS IN ADVANCE.

    See also your other thread with the same question:
    http://social.msdn.microsoft.com/Forums/en-US/80243625-fc3b-4ee1-bce1-4adcdbc16c14/unable-to-update-when-executed-table-gets-lock-execution-does-not-stop-execution-even-for-an-hour?forum=sqlserversamples
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • When I try to update LR I get an error message Application not found

    When I try to update LR I get an error message "Application not found".
    When I try Help in LR it can't be found.
    What is wrong?

    Talked with Adobe support. Told me to go to Cloud app and log out, then log
    in again and then update. Worked fine for me. Hope this helps!
    Best regards,
    Fredrik Moell
    Tomatis New Zealand
    www.tomatis.co.nz
    A division of Your Amazing Health Ltd
    54 Fancourt Street, Meadowbank, Auckland 1072
    0800-TOMATIS (866 2847)
    Personal 021-1721 930

  • Attempting to re-dnld purchased music to computer. get msg that store is not dnld'g at the time..??Do I need to get ICloud?  May I do without it?

    attempting to re-dnld purchased music to computer from itunes Store. Getting msg that store is not dnld'g at the present time..Do I need ICloud? Perhaps Store not "open" these hours? ????

    You don't need iCloud to re download music.
    Patricia... follow the instructions here >  Downloading past purchases from the App Store, iBookstore, and iTunes Store

Maybe you are looking for

  • Im having trouble in opening the apple store this is how it looks like

    Process:         App Store [288] Path:            /Applications/App Store.app/Contents/MacOS/App Store Identifier:      com.apple.appstore Version:         1.0.2 (63.1) Build Info:      Firenze-630100~1 Code Type:       X86-64 (Native) Parent Process

  • [SOLVED] Problem copying objects in Inkscape 0.48.0-4

    I have problems when I copy any object when using inkscape. Even after removing the config directories and using a completely blank document. I create a simple rect and press ctr+c (or use the context menu) and this error comes up: El script inkex.py

  • Dedicating physical CPUs to a zone and migrating a Solaris 8 box to a zone?

    If I have a machine with a large number of cores (say 24), and dedicate 4 of the CPUs to the zone, psrinfo shows the number of CPU's dedicated to that zone as 4, however, the global zone still shows 24. Does this mean that if there's enough stuff run

  • Word 2003 vs. Word 2007

    Hi everyone - I've been running Office 2003 on my laptop, but since I sync-ed my Pearl, whenever I start Word it puts me into "compatibility mode", which somehow forces me to work on my '03 docs in '07.  Any idea how I can go back to using Word '03 o

  • Mail message displaying "blocked plug-in"

    I used to copy youtube videso and send them to friends via mail... Never had a problem doing so with OSX 10.6.8 NOW alla of a sudden that is not possible and I get a "blocked plug-in" in the body of the message instead of the youtube video... How do