|
||||||||||||||
|
jGRASP FAQ
1) Why won't my program compile? jGRASP does not contain and is not delivered with any compilers. If you get an error message indicating that the compiler was not found, make sure you do have a compiler installed. jGRASP is set up by default to run a Java SDK compiler for Java, a gnu-style compiler for C and C++, etc. A different compiler may be selected by choosing a different compiler environment (or creating one if it does not exist). To choose one, select "Settings" / "Compiler Settings" / "Workspace" or "Project", depending on whether you want use the compiler for all projects or just the current project. Select the appropriate language for your code. Select the "Environment" tab. Select an environment and hit "Use". Hit the "OK" button. If you need to create a compiler environment, search the jGRASP help for Compiler Environments . Generally, the executable for the compiler must be on your system's path, or on a path added by jGRASP. Having it on your system path means you can also use the compiler from the command line or from a DOS shell. Having it only in jGRASP allows you to use different compilers (such as different Java versions) easily. A compiler may "add itself" to the system's path when installed, or it may not. Follow these instructions to add a path only in jGRASP or for the system. To add a directory to the path only in jGRASP:
To add a directory to your system's path: on Windows NT/2000/XP, Windows 98/ME, or Linux/UNIX
2) What happened to pcGRASP and UNIX GRASP? pcGRASP and UNIX GRASP are no longer maintained. jGRASP is more stable and has more features than the previous versions, so unless you have a very old (and slow) system, we recommend using jGRASP. The older versions are still available in the archive. 3) Which jGRASP version should I download? If you are on Windows, get the "jGRASP exe" version. For Mac OS X, get the "jGRASP pkg.tar.gz" version. On any other OS, get the "jGRASP zip" version. If the installer for one of the self-installing versions does not work, please let us know. You can use the zip version on any system, just follow the instructions. 4) Which Java version should I use / am I using? If you will be developing Java applications on a Windows, Linux, or UNIX system, in most cases you should get the latest J2SE SDK from Sun. It is best to run jGRASP on the latest version of Java. If you need to compile and run programs on an older version, add the "bin" directory for the older version to the jGRASP PATH settings (click here for more information). To see which Java version jGRASP is running under, hit "Tools" / "System Info". To see how the Java version was chosen if you are on Windows, pop up the "jGRASP Control Shell" from the Windows taskbar. 5) How can I set command line arguments for the program I'm running? Click "Run" / "Run Arguments" and enter arguments in the window that comes up. Arguments are separated by whitespace, and may be double-quoted to include whitespace. Use %" to enter a double quote, and %% to enter a percent sign. Note that Windows does not support multiple command-line arguments at the OS level - there is only one argument that is broken up to simulate multiple arguments as the target program sees fit. Not all programs agree on how to do this. For Windows, double quotes in arguments will be backslash-escaped and all arguments will be double quoted. This should be appropriate for most targets. 6) How can I set compiler flags? Go to "Settings" / "Compiler Settings" / "Workspace" or "Project" depending on whether you want these flags to apply to all compiling, or just to the current project (you can also set compiler flags for individual files - use "Edit" / "Compiler Settings" / "File" from an editing window). Select the language you are using, then select the "Flags/Args/Main" tab. Click off the default box for "FLAGS" in the row corresponding to the compile command you are interested in, and enter the flags in the text box. "FLAGS2" is used when there are two sets of flags - when running Java for example, "FLAGS" are flags to the target application, and "FLAGS2" are flags to Java itself. 7) Why does the keyboard focus change when I move the mouse over a window? A partial focus-follows-mouse system is implemented in jGRASP. You can turn this off under the "Settings" menu. If it is on, the keyboard focus will be in the window the mouse is over (but clicking in a virtual desktop window still pop it up - that is why it is partial focus-follows-mouse). Focus-follows-mouse is available system-wide on many non-Windows systems, and most experienced users find it more productive than click-to-focus. It allows you to read one window at a large size while typing into a window that is behind it and has just a sliver visible, and to quickly slide from one window to another and execute a command pertaining to that window, without wasting the time necessary to pop it to the top. The downside is that you may sometimes type into a window you did not mean to type into, especially if you are not used to the system. In a true focus-follows-mouse system, you can also click in a window and use menus without popping it up; only clicking on the title bar or border will raise it. True focus-follows-mouse in a virtual desktop under Java is at best impractical to implement, and may not be possible without creating a new Look-And-Feel. 8) How can I make more room for the debugger window? Turning on "Settings" / "Full Height Tab Pane" will reorganize the main jGRASP window so that the tab pane on the left occupies the full height of the window. 9) How can I use Ctrl-d, Ctrl-c, "cls" etc. for a running program? The jGRASP Run I/O window does not support end-of-file or other system specific console/shell commands/signals. This functionality may be added in the future. In Windows, you can run your programs in a DOS shell from jGRASP by turning on "Run" / "Run in MSDOS Window". On other systems, you will have to run from the command line if you need those functions. 10) Why do I get a "FATAL ERROR in native method: No transports initialized Transport dt_shmem failed to initialize, rc = 509." message when debugging Java or starting the workbench? If you are running Java under a Java sdk or jre
that does not include dt_shmem.dll and/or dt_socket.dll, you
may get the message FATAL ERROR in native method: No transports initialized or FATAL ERROR in native method: No transports initialized Most likely you are running under a JRE delivered with another Java application, or some non-standard version of Java. To find the location of the "java" that is running, turn on "Settings" / "Verbose Messages" and (attempt to) debug. The full path to the "java" command will be shown as "actual command sent". To fix the problem, either adjust your system PATH to remove the path to the problem JRE, or select one of the compiler environments with "prefer JDK compiler" in the name (those will use the same "java" that jGRASP is running under to run user programs). |
|||||||||||||
|
Copyright © 2011 Auburn University |