âšī¸ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | FAIL | download_stamp > now() - 6 MONTH | 6 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://www.cs.fsu.edu/~myers/cop3252/howto/cmdline.html |
| Last Crawled | 2025-10-18 19:32:59 (6 months ago) |
| First Indexed | 2022-03-15 07:19:10 (4 years ago) |
| HTTP Status Code | 200 |
| Meta Title | Command line compiling help |
| Meta Description | null |
| Meta Canonical | null |
| Boilerpipe Text | Command line compiling help Primary SDK tools
The primary Java SDK tools, which can be accessed from a command
prompt/shell, are:
javac // the compiler
java // loader/interpreter
Windows versions of these filenames would be:
javac.exe
java.exe
These commands (discussed below) will work in any of the following
command-line prompts, as long as the SDK is installed:
Unix (like in the CS accounts) Windows command prompt (DOS prompt) Mac OS X Terminal prompt (which uses Unix) Using the javac command Source code files will end in .java To compile a source code file, the command format is:
javac filenmame Examples:
javac Example1.java
javac MyProg.java
javac Arithmetic.java
The result will be a file (or files) ending in .class For every class in a source code file, a full .class file is
created Using the java command To run a java program, use the java command. Basic format:
java main-class In this format, substitute (for main-class above) the name of
the class that contains the main() method that is the start of
your desired program Examples:
java Arithmetic // runs main() in class Arithmetic
java Fred // runs main() in class Fred
Working in a CS account on linprog Everybody enrolled in this course is allowed to sign up for a
temporary Computer Science department account. Instructions are here:
You'll want to download SSH software for this, if you don't already
have it. See the account info page for download link Once you register for an account, you should log into
linprog.cs.fsu.edu if you want to use the SDK tools from your CS
account login. linprog has the latest Java SDK installed This machine is running Linux, so you would need to be familiar with
basic unix commands (like creating files, directories, moving around,
etc). I created a basic unix tutorial here, which has just enough to
show you how to get around:
This environment is fine for console applications. It will not be as
good when we get to GUI applications (although can be done through
tunnelling) Working on a Windows PC on the command line Select "Start", then "Run", then type "cmd", to open a command
prompt Use "cd" command to change directories (similar to unix command) Use "dir" to see a directory listing Use javac and java commands as illustrated
earlier Recommend using a Windows-based text-editor to actually edit the
files. Wordpad is fine for this purpose. You will probably need to set the "PATH" variable. See below Setting the PATH environment variable
To run a program from the command line from any directory, you
either have to type its full location and name every time (annoying) or
set its location in your "PATH". To set the path...
You'll need to know where your Java SDK was installed. Usually it
goes (by default) into a folder like this:
C:\Program Files\Java\jdk1.6.0_16
Make sure you take note of the exact folder name and location
From the Start menu, right-click "My Computer", and pick
"Properties" Click the "Advanced" tab Click the "Environment Variables" button At the top of the window, where it says "User variables for ...." look
to see if there is a "PATH" variable in the window. If there is,
highlight it and click Edit. If there isn't, click "New" Make sure Variable name says, "PATH". Under "Variable value", add in
the expression that matches where the java installation is, along with
"\bin". Example:
C:\Program Files\Java\jdk1.6.0_16\bin
IF there's already something in the PATH variable, separate it from
the new item (above) with a semi-colon. Example:
C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Program Files\Java\jdk1.6.0_13\bin
Changes won't apply until you close the "cmd" prompt and launch it
again |
| Markdown | # Compiling on the Command line with Java SDK
## Primary SDK tools
The primary Java SDK tools, which can be accessed from a command prompt/shell, are:
```
javac // the compiler
java // loader/interpreter
```
Windows versions of these filenames would be:
```
javac.exe
java.exe
```
These commands (discussed below) will work in any of the following command-line prompts, as long as the SDK is installed:
- Unix (like in the CS accounts)
- Windows command prompt (DOS prompt)
- Mac OS X Terminal prompt (which uses Unix)
## Using the javac command
- Source code files will end in
.java
- To compile a source code file, the command format is:
```
javac filenmame
```
- Examples:
```
javac Example1.java
javac MyProg.java
javac Arithmetic.java
```
- The result will be a file (or files) ending in
.class
- For every class in a source code file, a full
.class
file is created
## Using the java command
- To run a java program, use the
java
command. Basic format:
```
java main-class
```
- In this format, substitute (for *main-class* above) the name of the class that contains the
main()
method that is the start of your desired program
- Examples:
```
java Arithmetic // runs main() in class Arithmetic
java Fred // runs main() in class Fred
```
## Working in a CS account on linprog
- Everybody enrolled in this course is allowed to sign up for a temporary Computer Science department account. Instructions are here:
- [CS Account Information](http://www.cs.fsu.edu/~myers/cgs3416/howto/account.html)
- You'll want to download SSH software for this, if you don't already have it. See the account info page for download link
- Once you register for an account, you should log into
linprog.cs.fsu.edu
if you want to use the SDK tools from your CS account login. linprog has the latest Java SDK installed
- This machine is running Linux, so you would need to be familiar with basic unix commands (like creating files, directories, moving around, etc). I created a basic unix tutorial here, which has just enough to show you how to get around:
- [My Basic Unix Tutorial](http://www.cs.fsu.edu/~myers/howto/UnixTutorial.txt)
- This environment is fine for console applications. It will not be as good when we get to GUI applications (although can be done through tunnelling)
## Working on a Windows PC on the command line
- Select "Start", then "Run", then type "cmd", to open a command prompt
- Use "cd" command to change directories (similar to unix command)
- Use "dir" to see a directory listing
- Use
javac
and
java
commands as illustrated earlier
- Recommend using a Windows-based text-editor to actually edit the files. Wordpad is fine for this purpose.
- You will probably need to set the "PATH" variable. See below
### Setting the PATH environment variable
To run a program from the command line from **any** directory, you either have to type its full location and name every time (annoying) or set its location in your "PATH". To set the path...
1. You'll need to know where your Java SDK was installed. Usually it goes (by default) into a folder like this:
```
C:\Program Files\Java\jdk1.6.0_16
```
Make sure you take note of the exact folder name and location
2. From the Start menu, right-click "My Computer", and pick "Properties"
3. Click the "Advanced" tab
4. Click the "Environment Variables" button
5. At the top of the window, where it says "User variables for ...." look to see if there is a "PATH" variable in the window. If there is, highlight it and click Edit. If there isn't, click "New"
6. Make sure Variable name says, "PATH". Under "Variable value", add in the expression that matches where the java installation is, along with "\\bin". Example:
```
C:\Program Files\Java\jdk1.6.0_16\bin
```
7. IF there's already something in the PATH variable, separate it from the new item (above) with a semi-colon. Example:
```
C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Program Files\Java\jdk1.6.0_13\bin
```
8. Changes won't apply until you close the "cmd" prompt and launch it again |
| Readable Markdown | null |
| Shard | 19 (laksa) |
| Root Hash | 2399862591257072619 |
| Unparsed URL | edu,fsu!cs,www,/~myers/cop3252/howto/cmdline.html s443 |