đŸ•ˇī¸ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 144 (from laksa065)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

â„šī¸ Skipped - page is already crawled

đŸšĢ
NOT INDEXABLE
✅
CRAWLED
7 months ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffFAILdownload_stamp > now() - 6 MONTH7.9 months ago
History dropFAILisNull(history_drop_reason)tooold
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttp://tutoringcenter.cs.usfca.edu/resources/using-java-via-command-line.html
Last Crawled2025-08-30 13:54:50 (7 months ago)
First Indexed2013-08-10 11:44:16 (12 years ago)
HTTP Status Code200
Content
Meta TitleCS Tutoring Center
Meta Descriptionnull
Meta Canonicalnull
Boilerpipe Text
Lab Setup You need to set your $CLASSPATH variable on the lab computers, or you will be stuck specifying long classpath parameters every time you run java . This becomes especially important when you start using third-party libraries and must include multiple jar files. To do this, you will need to edit a configuration file in your home account. See the Using Linux via Command Line guide if you are unfamiliar using a text editor via the command line prior to completing this guide. Change to your home directory (run cd ~ at the prompt) and open the .bash_profile file. If it does not exist yet, go ahead and create it. Add the following line to the file: export CLASSPATH=".:.*" Some classes also provide some third-party libraries for you on the lab computers. For example, the CS 212 course places third-party libraries at /home/public/cs212/libraries/ on the lab computers. You can also add that directory (or any other) to your $CLASSPATH variable by adding the additional line: export CLASSPATH="$CLASSPATH:/home/public/cs212/libraries/*" Save the file and exit. Then, run the following command: . .bash_profile Make sure you include the . dot followed by a space before the .bash_profile above. To test that everything is setup, try the following command: cat ~/.bash_profile You should see somewhere in the output the following lines (there may be other lines as well): export CLASSPATH=".:./*" export CLASSPATH="$CLASSPATH:/home/public/cs212/libraries/*" If that looks correct, run the following command as well: echo $CLASSPATH If it is setup correctly, you will see something similar to the following: .:./*:/home/public/cs212/libraries/* You should see all of the directories you specified in your $CLASSPATH variable above. (It is okay if there are extra directories in the output.) Compile Make sure you are currently in the directory with your source code files. Remember, Java source code is always stored a *.java file. You first need to compile these files using Java. To do this, run the following command: javac *.java Now, when you ls your directory, you should notice you also have *.class files. Those are the files necessary to execute your Java code. A common error if you do not have your classpath setup properly will be similar to: error: package org.junit does not exist In this case, javac cannot figure out where the third-party libraries like junit are located. Double-check that your classpath is setup correctly. Execute To run your code, you need to know which class has the main() method. To execute your code, run the following command: java ClassName Replace ClassName with the classname (no file extension) that contains your main() method. If you have not setup your classpath yet, you need to also provide a -cp "." parameter to tell the java tool to look for your *.class files in the current directory. A common error if you do not have your classpath setup properly will be similar to: Exception in thread "main" java.lang.NoClassDefFoundError: In this case, javac cannot figure out where the class files are located. Double-check that your classpath is setup correctly and that your code is properly compiled. Arguments If you want to provide command-line arguments to your program, just include those arguments after the class name: java ClassName arg1 arg2 arg3 ... Replace arg1 arg2 arg3 ... with your command-line arguments (separated by spaces). For example, suppose the class Driver takes a filename as an argument. To execute your code with the argument, run the following command: java Driver hello.txt If you must specify a file name with a space inside it, use quotes around the filename: java Driver "Hello World.txt" Jar Files If you have already packaged your *.class files in a *.jar file, you can skip compiling your code with javac . To execute your code, run the following command: java -cp filename.jar ClassName arguments Replace filename.jar with the name of your jar file (assuming it is in the current directory). For this to work, your *.jar file must contain ALL of the necessary classes for your program to run. JUnit Tests You can run JUnit tests via the command-line on the lab computers. You need to make sure your classpath is setup (see above) first. To run your tests, you can use the following command: java org.junit.runner.JUnitCore ClassName Replace ClassName with the name of the class with the JUnit tests. For example, suppose the JUnit tests are located in a file named Tester.java . After you have compiled the source code, you can use the following command to run those tests: java org.junit.runner.JUnitCore Tester You will get some basic text output telling you how many tests you passed or failed.
Markdownnull
Readable Markdownnull
ML Classification
ML Categoriesnull
ML Page Typesnull
ML Intent Typesnull
Content Metadata
Languageen
Authornull
Publish Timenot set
Original Publish Time2013-08-10 11:44:16 (12 years ago)
RepublishedNo
Word Count (Total)850
Word Count (Content)763
Links
External Links7
Internal Links13
Technical SEO
Meta NofollowNo
Meta NoarchiveNo
JS RenderedNo
Redirect Targetnull
Performance
Download Time (ms)42
TTFB (ms)42
Download Size (bytes)3,131
Shard144 (laksa)
Root Hash10754122321078002144
Unparsed URLedu,usfca!cs,tutoringcenter,/resources/using-java-via-command-line.html h80