Classpath not referenced by TextPad

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
creilly
Posts: 2
Joined: Fri May 09, 2003 5:26 pm
Location: WJH Tech Center Atlantic City Int'l Arpt
Contact:

Classpath not referenced by TextPad

Post by creilly »

Greetings,

I am interested in purchasing TextPad (probably 3 copies) but before I do I want to know how to force TextPad to see the Classpath modifications in DOS. PROBLEM: I installed TP and was running and compiling simple programs as I am trying to learn JAVA from the Sun's Core Java Book. I installed TP from the CD that came with the book and then downloaded the latest upgrade (v. 4.6.2) from your website. I got to the section on Packages and had a real bugger of a time figuring out why at compile time (compiled from TP tools menu) the package was not known. I played around with that for quite a while until I tried and successfully compiled from the JRE in Dos. That made me suspicious about the nature of TP and question it's overall value. I could at this point rather use notepad and compile in DOS but I would like to see what the problem is. So please respond to this post with some positive feedback.

Thanks,
From the Desk of Chris Reilly
schnitzi
Posts: 19
Joined: Mon May 12, 2003 8:36 am

Post by schnitzi »

I believe what happens is this. When TextPad starts, it loads and stores the environment variables. This is what nearly every application I've ever seen does. Changes made to the environment variables after starting TP will not be picked up, unless you restart TP. This is because there is no system-wide notification for the TP to notice when an env. variable changes.

There is a simple workaround; specify the classpath when you compile by adding a "-classpath /your/classpath/here" parameter to the javac command in your tools menu.
creilly
Posts: 2
Joined: Fri May 09, 2003 5:26 pm
Location: WJH Tech Center Atlantic City Int'l Arpt
Contact:

Thanks for the advice!...I have more info please read on

Post by creilly »

I found from another FAQ on this site and in it was specified that you need to declare the classpath as a parameter for TP by using the "Configure" menu

select: Preferences; Tools; Compile Java;navigate to the "Parameters" window and type: "-classpath drive letter:\Root Directory of java compiler\ " (for example: -classpath c:\j2sdk1.4.1_02).

This is the same thing mentioned in the response to my earlier post only it in that reply to my original question was at the dos command prompt and not for TP. Thanks mucho!
From the Desk of Chris Reilly
Post Reply