?
Solved

Simple: Using downloaded classes

Posted on 2005-03-06
4
Medium Priority
?
205 Views
Last Modified: 2010-03-31
Hi guys,

I've just downloaded a couple of classes from the internet, and was wondering where I needed to put them/what settings I needed to change so that javac would find them without having to add confusing command line parameters

I'm using Windows 2000 if it makes a difference

_Blue
0
Comment
Question by:eeBlueShadow
[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
4 Comments
 
LVL 14

Accepted Solution

by:
sudhakar_koundinya earned 500 total points
ID: 13470963
1. put those classes in userdefined directory say C:\MyClasses
2. set the classpath to that folder;
c:\>set classpath=%classpath%;c:\MyClasses;.;
3. javac YourClass.java (may use the classes that are saved in C:\MyClasses)
4. Java YourClass
0
 
LVL 5

Assisted Solution

by:ashok3sep
ashok3sep earned 500 total points
ID: 13472029
you can place your class files elsewhere in the computer


then you can do
go to System folder in control Panel and then set the Environment variable

PATH = your JDK bin Directory.....

then thats it you are done

you can place any class or java files else where in the system and then open command prompt go to the reespective class file directory or folder and compile and run..

you dont have to set the path each and every time

regards,

Freedom
0
 
LVL 10

Author Comment

by:eeBlueShadow
ID: 13473255
Thanks guys.

I extract the jar file and set the classpath to the directory containing those extracted folders - couldn't get it to work with the jar file for some reason, oh well.

Cheers :D

_Blue
0
 
LVL 5

Expert Comment

by:ashok3sep
ID: 13474330
thanks for accepting.
:-)

ou can post your problem  we are here to answer
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

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…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 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