Skip to content

ucsd-cse-spis-2015/Hello-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hello-Java

Hello World in Java

Create the file Hello.java using a text editor such as:

To compile on your ACMS account, use javac Hello.java, like this:

[spis15t7@ieng6-240]:Hello-Java:507$ javac Hello.java
[spis15t7@ieng6-240]:Hello-Java:508$ 

To run on your ACMS account, use java Hello, like this:

[spis15t7@ieng6-240]:Hello-Java:504$ java Hello 
Hello SPIS
[spis15t7@ieng6-240]:Hello-Java:505$ 

Note that when you RUN a program in Java:

  • you specify the command java which invokes the Java Virtual Machine, and
  • you follow java with the name of the class that contains the main method.

More preciesly, the command java is followed by the name of the class that contains the public static void main(String [] args) { ... } method).

When we say the name of that class, we mean, the name that follows the keyword class, as in class Hello { ... }. You do NOT use the name of a file, so java Hello.class is incorrect.

Learning Java

Here are some resources for learning some Java on your own, either before you get to CSE 8A/11 or in addition to what you learn in CSE 8A/11:

Books:

Learning Vim

Websites:

Books:

Learning Emacs

Or, Reading books in the Safari O'Reilly library from off campus, with your UCSD login.

Above, are various URLs for books in the Safari O'Reilly library. You can read these for free from on campus, (provided no more than 30 users in the entire UC system are accessing the library.)

If you are off campus, though, you either won't be able to see the full content, OR, you might be asked to create a personal account which requires a credit card. You probably don't want to have to pay for this access, since the University of California already paid for it, and its included in your tuition.

The solution is a VPN or Proxy connection. VPN stands for "Virtual Private Network". It is a way of making it "appear" that you are on the UCSD network, when you are in fact, connected to some other network.

A true VPN to the UCSD network requires you to install software on your computer. An easier way is to use a proxy server—that does NOT require you to install anything. You just use an intermediate web site. Here's how:

  • Navigate to: https://vpn-2.ucsd.edu/ and login with your UCSD username and password
  • Paste the URL for the bookabove into the box that looks like this, and click "browse" /images/VPN.url.bar.png

Releases

No releases published

Packages

No packages published

Languages