473,378 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

new: problem compiling java programs

hi, i am basically a beginner, trying to find my way in java. i downloaded the jdk1.4. i tried to write a sample program and compile/run it with javac in commnad prompt. i made sure i set the path correctly. cant figure out why it shows this problem.
my sample program is:


public class hellouser{)
public static void main(string[] arguments) {
string username = system.getproperty( "user.name");
system.out.println( "hello, " + username);
}
}

the error on compilation is:
javac hellouser.java
'JAVAC' is not recognized as an internal or external command, operable program or batch file.

what is wrong???? i did set the path to my current program .
Feb 14 '07 #1
3 1460
r035198x
13,262 8TB
hi, i am basically a beginner, trying to find my way in java. i downloaded the jdk1.4. i tried to write a sample program and compile/run it with javac in commnad prompt. i made sure i set the path correctly. cant figure out why it shows this problem.
my sample program is:


public class hellouser{)
public static void main(string[] arguments) {
string username = system.getproperty( "user.name");
system.out.println( "hello, " + username);
}
}

the error on compilation is:
javac hellouser.java
'JAVAC' is not recognized as an internal or external command, operable program or batch file.

what is wrong???? i did set the path to my current program .
You nead to set the PATH of Java on your sytem. But first, I suggest you unistall the 1.4, go back to the sun and download jdk 1.5 or higher and install that.
Feb 14 '07 #2
hirak1984
316 100+
this problem occurs when path is not set properly.make sure you are compiling the code fron inside bin of jdk.

if you want to compile and run from anywhere,then set environment variable of windows.
if the probl;em persistes even after doing these let us know.
hi, i am basically a beginner, trying to find my way in java. i downloaded the jdk1.4. i tried to write a sample program and compile/run it with javac in commnad prompt. i made sure i set the path correctly. cant figure out why it shows this problem.
my sample program is:


public class hellouser{)
public static void main(string[] arguments) {
string username = system.getproperty( "user.name");
system.out.println( "hello, " + username);
}
}

the error on compilation is:
javac hellouser.java
'JAVAC' is not recognized as an internal or external command, operable program or batch file.

what is wrong???? i did set the path to my current program .
Feb 14 '07 #3
If you are using Windows, try this site: http://support.microsoft.com/kb/310519
You may also find this page helpful: http://www.wilsonmar.com/1envvars.htm
Feb 14 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: BlackHawke | last post by:
Our program, game program Andromeda Online (www.andromedaonline.net) uses two programs- one to play the game, another to patch the game as updates come out. Players actually launch the updater...
3
by: Francis M | last post by:
Nowadays when you obtain the SDK form java.com you get a new interactive programming environemt much like the Borland C++ IDE. Up to now I've been developing applications "the old way" using...
5
by: Jo Vermeulen | last post by:
Hello, I was wondering if Java supports a feature of C# (or .NET in general), namely compiling code at runtime. This is nice for scripting purposes. Users can script the application in real...
1
by: Tony | last post by:
I have written a basic program with 2 source code files demonstrating the new operator and basic method calls. On my computer at school, I receive an error on line 7 of the TestPizza.java file...
29
by: Maurice LING | last post by:
Hi, I remembered reading a MSc thesis about compiling Perl to Java bytecodes (as in java class files). At least, it seems that someone had compiled scheme to java class files quite successfully....
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
4
by: betalpha | last post by:
I'm having trouble compiling my program in Unix. I initially developed it on Windows in Eclipse. I have two files: Tokenizer.java and TokenizerMain.java. They are both in a directory called...
20
by: cowboyrocks2009 | last post by:
Hi, I need help to automate my code to take data from input file. Also I need to create it as a function so that I can pass it to some other program. I am new to Java so having a bit limitation to...
4
by: anon538 | last post by:
I have been interested in switching from Java to C# for a long time now. I typically write small, stand alone programs for contests. Each program is completely self contained. I am used to, in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.