File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difficulty in setting the class path variable

 
prachi mishra
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends

I am trying to complie a java program in textpad, but the compiler cannot find the file specified. I have set the enviornmental variable. Could you please help me out on this?
[ September 23, 2008: Message edited by: prachi mishra ]
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can't compile the program, how are you running the program???

Henry
 
prachi mishra
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ohh im sorry. Actually at that time i ran a previously compiled program.
[ September 23, 2008: Message edited by: prachi mishra ]
 
Henry Wong
author
Marshal
Pie
Posts: 20836
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, we definitely need more details... What is the classpath? What is the command that you are using to compile? Command to run? The exact error message? etc.

Henry
 
prachi mishra
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have followed the following steps -

1- In Control Panel click on System.
2- Click on the advanced tab.
3- Click on Environmental variables
4- Create a new user Environmental variable
5- I have set the variable name as classpath and variable values as .;%CLASSPATH%.
6- Apply the changes and exit the dialog boxes.
7- In textpad go to Configure-Preferences-Tools- Complie java
8- In compile java set the parameter as -classpath . $FILE and initial folder as $FileDir.
9- In compile java set the parameter as -classpath . $BaseName and initial folder as $FileDir.


I am getting the error as " The system cannot find the file specified."
[ September 23, 2008: Message edited by: prachi mishra ]
 
Leonid Shchervinsky
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prachi:

Is there a reason you are using TextPad and not a full featured IDE like NetBeans 6.1? There are differences between the two, including price...

Leonid
 
prachi mishra
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used textpad previously and iam comfortbale with that. I have never used netbeans 6.1
 
Leonid Shchervinsky
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by prachi mishra:
I have followed the following steps -

1- In Control Panel click on System.
2- Click on the advanced tab.
3- Click on Environmental variables
4- Create a new user Environmental variable
5- I have set the variable name as classpath and variable values as .;%CLASSPATH%.
6- Apply the changes and exit the dialog boxes.
7- In textpad go to Configure-Preferences-Tools- Complie java
8- In compile java set the parameter as -classpath . $FILE and initial folder as $FileDir.
9- In compile java set the parameter as -classpath . $BaseName and initial folder as $FileDir.


I am getting the error as " The system cannot find the file specified."

[ September 23, 2008: Message edited by: prachi mishra ]


Here are some of the changes for your process:

> environment variable name: CLASSPATH
> must contain: ;.
> keep all the default in TextPad
> Ctrl+1 to compile
> Ctrl+2 to run

Hope this helps.
Leonid
 
prachi mishra
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys ..its working now
 
Ankit Garg
Sheriff
Posts: 9497
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shouldn't this be in the Beginner Section???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic