Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Viveka Fischer   on Feb 22 In Java Category.

  
Question Answered By: Murad Bashara   on Feb 22

I had a similar problem. This is how I fixed it.

I set my path  with this command:

export PATH=$PATH:/usr/local/jdk1.3/bin

It sounds like you did this already.

Then, I had to set the CLASSPATH.

CLASSPATH is specific to java  and is meant to allow the Java
Virtual Machine (the "java" command is the JVM) to find the
classes needed by your Java program. It already knows about the
API's classes; it needs to know about any others that you use.
With simple Java programs, all you need to do is tell it to use the
current directory:

export CLASSPATH=.:$CLASSPATH

I used the current directory "." first to make sure it resolves
classes
from my current directory first.

You can also specify classpaths on the java command line:

java -classpath .:$CLASSPATH myapp

Share: 

 
 
Didn't find what you were looking for? Find more on Running JAVA on linux Or get search suggestion and latest updates.


Tagged: