Solved

Java compilation problem

Posted on 2002-03-16
2
194 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 50 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Weekend adv creator 3 51
custom annotations 9 42
even odd program using while loop 3 60
Why doesn't this text field show up on my Applet frame? 2 19
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

808 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