| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Java Code; confused | |
|---|---|
| Topic Started: Aug 30 2011, 07:31 PM (1,466 Views) | |
| gamesir | Aug 30 2011, 07:31 PM Post #1 |
![]()
Member
![]() ![]() ![]() ![]()
|
Okay, so I'm taking this introductory class for computer programming, and for some reason I can't run this file or whatever. Pretty sure I downloaded both JDK and JRE, so I don't know what to do.
|
![]() |
|
| lightsilver | Aug 31 2011, 05:02 PM Post #2 |
![]()
this || that
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
If you downloaded and installed the JDK, then all you should have to do is point your IDE to the JDK. You know you have it, but your computer doesn't. It's annoying when that happens. To confirm the problem, open up command prompt/ terminal, navigate to the directory with the java file, and type "javac Computation.java". I just tested it myself, and it compiles no-problem. Then to run the program, you just need to enter "java Computation", and it will run. What IDE are you using? I'd recommend either JCreator, BlueJ, or eclipse. Although straight up command line wouldn't hurt (although I'd use Notepad++ (Windows) or TextWrangler or XCode (Mac), or whatever for Linux. I'm sure, however that the issue is your IDE not knowing about the JDK. |
![]() |
|
| Karkuta | Oct 3 2011, 09:58 PM Post #3 |
|
Let's get dangerous!
![]() ![]() ![]() ![]()
|
Also make sure that the JDK directory is properly set in the system PATH variable. http://www.java.com/en/download/help/path.xml |
![]() |
|
| bapezilla | May 7 2012, 01:34 AM Post #4 |
|
Member
![]() ![]() ![]()
|
i've found that working in a simple text editor like jEdit for pc or textwrangler for mac and then compiling and running the programs from the terminal works best when you're only writing simple code like this.
Edited by bapezilla, May 7 2012, 01:34 AM.
|
![]() |
|
| Charlo | May 21 2012, 08:13 PM Post #5 |
![]()
1337er than j00
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
YES! jEdit is my text editor of choice. It works on Macs too.
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Programming and Scripting Chat · Next Topic » |






![]](http://z1.ifrm.com/static/1/pip_r.png)





5:21 AM May 22