SimpleIO (not the simpleIO directory itself) as the library! Named "simpleIO"), choose the directory that contains In a named package directory structure (for example in a directory Select the jar file itself as the library. One small thing to look out for: if the classes are in a jar file, The selected libraries will now be available Then add the location where your classes are as a library path. The "Preferences" dialogue and select the "Libraries" tab. The first way is via the "Preferences" dialog. There are actually three ways of doing this in BlueJ. Without the need to copy all the simpleIO classes into every project. You may have your own package called "simpleIO" that In the same style as the Java standard libraries. In order to add variables to a watch window, use CTRL+click to obtain the menu.Sometimes, you may want to make your own libraries generally available.Use F7 and F8 to step through programs just as you would on the PC.Try CTRL-C and CTRL-V to copy and paste.(NetBeans uses a hidden folder for the default directory location.) Use FILE / MOUNT FILESYSTEM to be able to use that folder for your programs. Be sure to create a new folder on your system to hold your programs rather than trying to use the default folder.Use the menus rather than shortcuts (for example, use BUILD / COMPILE FILE rather than "F9".This can happen if you run a program and it crashes but the process has not been terminated or if you omit the line System.exit(0). If you run out of memory, it could be that there are too many processes running simultaneously.When your program works to your satisfaction, you can remove the comments and query the user for the input values. If you can't step through a program: Try assigning literals to your variables and comment out the JOptionPane dialogue boxes for data entry when you wish to step through a program this will simplify the process.Right-click on the PC with your cursor in the Watch window or use CTRL+Shift+F7 to add variables to the Watch Window.Use Window / Debugger Window to seleect the Watch window.Click on the line number of your breakpoint line to remove the breakpoint.Use Run / Finish Debugger Session to end."Input Sentence Window", JOptionPane.QUESTION_MESSAGE) */ * String sentence=JOptionPane.showInputDialog(null, "Type in a sentence", Note: It is cumbersome to try to debug through a JOptionPane statement it is easier to comment out the JOptionPane statement and follow it with an initialization, such To step through additional methods, use F7. use F8 to step through your program, line by line within main.use Run / Run Other / Debug or CTRL + shift + F5 to start a debugging session in your file.Click on the line number of the first line in main (after the opening brace) to set a breakpoint this should color the line in a dark pink.you can use the "BlueJ View" under Projects to right-click on your file and select "Compile" or "Run". use Shift + F6 to execute the current file (both Windows and Mac).use F9 to compile the current file on Windows (on the Mac use the menu: BUILD / COMPILE FILE).Now you can start typing your code or copy and paste from a model that we have done in class.FILE / NEW FILE / JAVA CLASSES / EMPTY JAVA FILE / NEXT / Enter a file name at the top of the screen leave "Package" blank / FINISH. FILE / NEW PROJECT / BlueJ / Empty BlueJ Project / Enter a project name & file location / FINISH.Getting Started: writing and running programs: Instructions for using the IDE: Netbeans - BlueJ edition (for the MAC) Then select and click "" to Download for the MAC OS.Click here to donwload NetBeans - BlueJ Edition.On Mac OS X systems, Java is already available so you do not need to install it. Be sure to select the correct version for your system (Windows) before you download. Go to and select Download the System Here.(Note: You do NOT need to install JCreator or NetBeans if you installed the JDK and JCreator bundle from above).Step 2: Install one of the following IDE: JCreator OR NetBeans (BlueJ Edition): (Note: You do NOT need to install JCreator to use NetBeans.).Instructions for installing the JDK bundle (JDK and JCreator) are posted here.Windows users will need to install JDK first (the Java Development Kit from Sun).Instructions for installing the Java and the IDE Window Step 1: Install the Java Development Kit (JDK) from Sun:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |