?
Solved

Compiling a java file

Posted on 2003-02-20
12
Medium Priority
?
261 Views
Last Modified: 2010-04-01
I am trying to compile a java file using the javac command in a DOS window. I am having trouble with the line import com.merck.is.jdirectory.*;

How can I get DOS to recognize the location of jdirectory without giving a full filepath ?

import java.io.*;
import java.util.*;
import com.merck.is.jdirectory.*;
0
Comment
Question by:tomhughes
[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
  • 4
  • 3
  • 2
  • +3
12 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 7987404
make sure the jar containing com.merk.is.jdirectory is in your classpath.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 7987449
where is your jdirectory is?
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 7987461
tomhughes, I also notice that you have a similar question at http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20520537.html

what's the situation? please follow up on your old question, thanks.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:cheekycj
ID: 7987951
I agree, this seems to be a duplicate of the original question.

CJ
0
 

Accepted Solution

by:
coolshiu earned 150 total points
ID: 7991747
I think that using ant to compile and deploy your .java files will be more convienent than using javac
you can get some document of using ant from
http://ant.apache.org
0
 

Author Comment

by:tomhughes
ID: 7994704
This question is a subset of the other question.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7996576
I think if you heed the advice of the experts in the other question it will solve this problem too.

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7996582
As far as your question goes:

>How can I get DOS to recognize the location of jdirectory without giving a full filepath ?

if you don't want to manually provide the full path each time you compile, try adding the full path to your default CLASSPATH environment variable.

CJ
0
 

Expert Comment

by:tojiv
ID: 8003803
Question becomes a confusion when you are not describing it fully. There are many ways to make dos find out your packaged classes.
1. Which folder you are compiling from. For that compile from a folder that contains com directory.
2. The classpath variable set and also it should be like this. SET CLASSPATH=.;<YOUR EXISTING PATH>
3. give the full path itself while using javac which you are not prefering.
Check wheather one of the things missing. If not without saying no just describe the question fully.

Toji
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8005938
>> Question becomes a confusion when you are not describing it fully.
Agree, and that's why we ask him to follow up on his old question and provide us with more detail, but looks like asker is not interested.

tomhughes, you got to help us to help you :)
0
 

Author Comment

by:tomhughes
ID: 8008203
I am going to use ant to compile.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8009769
good luck anting :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

752 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