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:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* 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
Go Back   Tech Support Forum > The IT Pro > Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Programming A discussion forum for programs and programming used in tech-related businesses.

Reply
 
LinkBack Thread Tools
Old 11-07-2005, 06:58 PM   #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?
dav2b3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
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

Old 11-07-2005, 09:17 PM   #2 (permalink)
Be Free
 
LoneWolf071's Avatar
 
Join Date: Nov 2004
Location: Texas
Posts: 840
OS: Windows XP, Linux


Send a message via AIM to LoneWolf071
you need to save it as javac.exe, cause you need to save it as javac.java then compile it into a .class file
__________________
Suicide Command in Linux : rm -rf / ;)
AIM:TheLoneWolf071@aim.com--If You Need Help, Don't Hesitate...
LoneWolf071 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 11-08-2005, 02:35 PM   #3 (permalink)
Registered User
 
Join Date: Nov 2004
Posts: 115
OS: Win Xp Pro, Mac OS 10


i saved it as an .exe but dont know what to do now.

Last edited by dav2b3; 11-08-2005 at 02:51 PM.
dav2b3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 11-08-2005, 07:22 PM   #4 (permalink)
Be Free
 
LoneWolf071's Avatar
 
Join Date: Nov 2004
Location: Texas
Posts: 840
OS: Windows XP, Linux


Send a message via AIM to LoneWolf071
sorry, my bad, don't save it as javac.exe, but as javac.java
__________________
Suicide Command in Linux : rm -rf / ;)
AIM:TheLoneWolf071@aim.com--If You Need Help, Don't Hesitate...
LoneWolf071 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 11-09-2005, 10:49 AM   #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.
impact is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 04:16 AM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85