![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Nov 2004
Posts: 115
OS: Win Xp Pro, Mac OS 10
|
problem with writing java in textpad
i am taking a java course in school and i wanted to try it at home so i downloaded texpad since thats what i use in school. i did a very very basic program:
class Prog1 { public static void main(string args[]) { System.out.println("Nerds rule"); } // end of method main } //end of class Prog1 and i get message saying "E:\WINDOWS\system32\javac.exe" in the tab and in the window it says "The system cannot findthe file specified." i want to try the good stuff and i cant do the basics. can anyone help? |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#5 (permalink) |
|
Registered User
Join Date: Nov 2005
Posts: 3
OS: XP
|
Depending on how I interpret your question, there are a few possibilities. First of all, "javac ThisIsMyProgram.java" will not compile if (1) your sourcecode does not have the ending .java and (2) your computer does not recognize the "javac" command.
I am assuming that your computer cannot recognize the javac command. There are a few creative ways to make it do so. On Windows, because I'm a lazy programmer, I just use a bat file. For instance . . . javac.bat might have c:\\java\bin\javac.exe %1 %2 %3 %4 %5 %6 %7 %8 The %1 for instance would pass your first argument on the command line after "javac" to the actual "javac.exe" on your system. You can place javac.bat in your current working directory, which is what I normally do. But it can go in any path that your system routinely checks when it is initializing. Alternatively, if you enjoy living dangerously, you can extend the CLASSPATH in your autoexec.bat. This is assuming your computer runs the autoexec.bat when it starts up. If you have a JRE installed on your computer, the command "java ThisIsMyProgram" would work once it is compiled into ThisIsMyProgram.class. If you only have a JDK, it "might" be necessary repeat what I described for "javac" but this time using "java". Getting over this initial hurdle is probably the most irritating phase for most new Java programmers. |
|
|
|
![]() |
| Thread Tools | |
|
|