Cool

Compiling and Running Java using Notepad++ on Windows

I spent sometime today trying to compile and then run Java using Notepad++ so I figured that I would write a guide explaining how to do it.

For those of you who don’t know Notepad++ is one of my favorite text editors.

Step 1) Download and install the Java JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html

Step 2) Setup your path variables

Step 2.1) Go to your control panel and search for path

Step 2.2) Click on edit the system environment variables

Step 2.3) Click on environment variables

Step 2.4) Find your path setting

Step 2.5) Click on your path variable and then click on the edit button

Step 2.6) At the end of your path variable add the following: “;C:\Program Files\Java\jdk%JDK-VERSION%\bin” where %JDK-VERSION% is your JDK version number. (You can also find this by browsing to c:/program files/java and looking at the folders there)

Step 3) Log off your computer and then log back in. (You can also reboot if you want, but that is unnecessary)

Step 4) Somewhere on your computer make a new text file and add the following to it:

cd /d “%1″
javac %2 -Xlint:all
if errorlevel 1 goto finish
java %3
:finish
pause

Step 5) Rename this file to CompileJava.bat (if the file name does not end it .txt before you rename you will need to do this first)

Step 6) Copy this file to C:/Program Files/Notepad++

Step 7) Hit the “F5″ key and type the following into the text field $(NPP_DIRECTORY)\CompileJava.bat “$(CURRENT_DIRECTORY)” “$(FILE_NAME)” “$(NAME_PART)”

Step 8 ) Click on save and name the command something like “CompileJava”, you can also set up a key command if you like.

Step 9) You can now access your command from the “Run” menu

Thats it, your now ready to create and run Java code from Notepad++! One important note though, only Java programs with default package will compile and run.

Cried goes to Tech Travel Think for the .bat code.

My Life Is Hopkins

My new website is mylifeishopkins.com (My Life Is Hopkins or MLIH). Its a website that allows students to post small anecdotes about life at Johns Hopkins University. I made the website during finals week when I should probably have been studying. The bulk of the work took 2 hours and I made a few tweaks over break. The site has grown really quickly and has gained over 200 members in the past 3 days!


Funny Keyboard Shortcuts 2

So in 2008 I made a post about funny keyboard shortcuts. Here is an updated version of that post.

Like the old post these will only work on windows (windows 7 to be more specific).

1) “Windows Key” + “+” then “Windows Key” + “-” then “Ctrl” + “Alt” +”I” – This will invert the colors on the screen.

2) “Windows Key” + “+” then “Ctrl” + “Alt” + “F” – This will make it so the screen is magnified.

3) “Left Alt” + “Left Shift” + “Num Lock” – This will make it so the number pad can move the mouse around. It can be fun to enable this and then play around with the number pad when someone else is using the computer to confuse them.

4) “Windows Key” + “R” then type in “shutdown -f -t 0″ – This will enable you to shutdown the computer quickly. It will also make it so windows won’t wait for programs to close, it will shutdown right then and there.

5) “Shift” then “Shift” then “Shift” then “Shift” then “Shift- This will turn on “Sticky Keys” which will make it so when anyone presses the “Shift”, “Ctrl”, “Alt”, or “Windows Key” and then lets go of the key the computer will act as if they are still holding the key down.


Razer L33T Power Suite Giveaway

Razer is having a giveaway because of all of their fans on facebook…

“One lucky fan will get to score the ultimate gaming suite powered by Razer – worth over US$500 – shipped right to your doorstep that will consist of Razer‘s suite of award winning gaming peripherals – A choice of your Professional Gaming Mouse, your ideal Professional Gaming Surface and Gaming Keyboard (just tell us which one you would like to have – it‘s yours), the Razer Megalodon 7.1 Gaming Audio Headset, Razer Armadillo2 Mouse Cable Management System, a Razer Attitude Tee, Razer Messenger Bag, Razer Gear Rack and a Razer l33t Pack.”

If you are interested in entering then go here.


College!

So I’ve been at college for about 2 weeks now (3 if you count pre-orientation) and I’ve yet to blog about it, I figured that I’ll attempt to do so now.

Pre Orientation (August 20th until August 26th):

I did the multi-element pre-orientation trip. It was awesome, we went camping, backbacking, river rafting, and cannoning. I made so many friends on the trip. Two funny stories from the trip:

-On the first day of backpacking when we got to the campsite one of the leaders showed us the water pump and told us to fill our water bottles, she began to use the pump and then someone pointed out the sign that said non-potable water. We ended up using iodine in the water so we could drink it.

-Later that night we were given the option to either sleep in a ten that we had made using a tarp or to sleep in the permanent shelters that were at the campsite. Me and three other students chose to stay in the ten, we asked one of the leaders if we would be okay there at night. He said that we would be fine as long as it did not rain really, really hard. It rained really hard. All of our stuff got wet. (It was still lots and lots of fun)

Finally at Johns Hopkins (August 26th until now):

So from August 26th until August 30th we didn’t have any classes, instead we met people from various departments and learned more about the school. We also participated in some very fun Hopkins orientation traditions. My favorite of these was playfair.

On August 30th classes started. I was quite worried about the transition however once I got into class I realized that my high school (Milken Community High School) did a really good job of preparing me and that I would do fine. All of my professors are really nice and willing to help. My favorite classes are Robots in Science Fiction, Discrete Math, and Intermediate Programming.

The orientation activities continued throughout the week. I really liked first night (it takes place on the first night of classes, the upperclassmen welcome the freshmen) and the trip to the inner harbor/the national aquarium (which was only open for Hopkins students when we went).

Rosh Ha Shanah was cool too, the Hillel here is really nice and the food was good too. I made a bunch of friends at all of the Hillel events.


  • Ads

  • Ads

    Categories

    Copyright © 1996-2010 Nate's blog. All rights reserved.
    Jarrah theme by Templates Next | Powered by WordPress