Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Java compilation problem

Posted on 2002-03-16
2
Medium Priority
?
206 Views
Last Modified: 2013-11-23
Hi, experts

I am using win2k advance server. I have set the classpath for java. But when I compile java file in some folders, there are many errors. I have to go to Control panel - system - advanced - environment variables, then click OK. It would be ok to compile the java files.

Could you please help me to fix it? thanks.
0
Comment
Question by:jl2001
2 Comments
 

Expert Comment

by:maggari
ID: 6872908
Make sure that all the class files that you use in your java programs are in the classpath ( not just jdk jars). Also, one common mistake we do is, we forget to keep the current folder in classpath. Make sure classpath variable starts something like this:

Classpath=.;

0
 

Accepted Solution

by:
asharma2 earned 150 total points
ID: 6876156
You should put your working directory (i.e. where you java files are) in the class path.Before compilatiotn.
set classpath=%classpath%;. will do .


0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question