Solved

Java compilation problem

Posted on 2002-03-16
2
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.
Suggested Courses

622 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