Classpath w/ Textpad
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Classpath w/ Textpad
After setting the classpath in a command window, I can compile my .java application. When attempting to compile the same file in TextPad I get errors that are obviously related to an unset classpath. Does anyone know how to point TextPad to the right/latest classpath?
Re: Classpath w/ Textpad
Set your classpath systemwide.
Control Panel -> System, last tab page, Button Environment..., then set or create a variable CLASSPATH with whatever your classpath is (including the swing jar!).
It might be necessary to boot the system to activate the environment variable, but afterwards each program gets the CLASSPATH
Control Panel -> System, last tab page, Button Environment..., then set or create a variable CLASSPATH with whatever your classpath is (including the swing jar!).
It might be necessary to boot the system to activate the environment variable, but afterwards each program gets the CLASSPATH
Re: Classpath w/ Textpad
ok... i've got Win XP.... i'm trying to get Java to compile. i get this---> " Cannot find File 'system32/javac.exe' "
i this something i need to do with Classpath?? what is the Value i need to put in there???
Thanks,
i this something i need to do with Classpath?? what is the Value i need to put in there???
Thanks,
Re: Classpath w/ Textpad
Jason,
no. Classpath is used by java to find classes and jar files.
You need to set your PATH to the directory where javac.exe is located.
Just follow the directions Andreas gave for setting the CLASSPATH and
substitute CLASSPATH with PATH.
mvh / regards
Henrik Skafsgaard Larsen
no. Classpath is used by java to find classes and jar files.
You need to set your PATH to the directory where javac.exe is located.
Just follow the directions Andreas gave for setting the CLASSPATH and
substitute CLASSPATH with PATH.
mvh / regards
Henrik Skafsgaard Larsen
Re: Classpath w/ Textpad
to be honest I think the latest version of textpad is fu***d up. i'M GETTING THE SAME PROBLEMS AND IT'S GOT NOTHING TO DO WITH SETTING THE CLASS PATH. WHEN YOU USE TEXTPAD TO OPEN A JAVA FILE AND THE COMPILE THAT FILE IT WILL SAVE THE CLASS FILE TO THE ORIGINAL DIRECTORY. I'VE BEING TRYING TO GET THIS CRAP WORKING FOR 3 DAYS!!!
Re: Classpath w/ Textpad
Are you setting the javac -D command line option when you compile?
Let's see the full set of parameters you are using to compile.
Let's see the full set of parameters you are using to compile.
Re: Classpath w/ Textpad
Try using the Ant build tool from Apache at:
http://jakarta.apache.org/builds/jakart ... 1.4.1/bin/
You invoke Ant with an ant.bat file that can include your classpath and compilation target directories. The ant.bat file can be configured as a "DOS Command..." tool in TextPad and it can "prompt for parameters". This compilation approach has been working flawlessly for me.
http://jakarta.apache.org/builds/jakart ... 1.4.1/bin/
You invoke Ant with an ant.bat file that can include your classpath and compilation target directories. The ant.bat file can be configured as a "DOS Command..." tool in TextPad and it can "prompt for parameters". This compilation approach has been working flawlessly for me.
Re: Classpath w/ Textpad
I use this technique (Textpad plus Ant) also and it works great.
Some hints: make sure you can get Ant to build your project without Textpad first. Use the command line ant.bat with a valid build.xml. http://jakarta.apache.org/ant for more information.
Once you have this working, Configure->Preferences->Tools->Add->Dos Command. Enter runant.pl, runant.py, or ant.bat.
Then, Configure->Preferences->Tools->ant.bat.
Uncheck capture output so you get a viewable Dos window.
Check prompt for parameters, so you can modify command line options.
Uncheck close DOS window on exit so you can see any compile errors.
More Ant articles are available here: http://jakarta.apache.org/ant/resources.html
Good luck,
Ben
Some hints: make sure you can get Ant to build your project without Textpad first. Use the command line ant.bat with a valid build.xml. http://jakarta.apache.org/ant for more information.
Once you have this working, Configure->Preferences->Tools->Add->Dos Command. Enter runant.pl, runant.py, or ant.bat.
Then, Configure->Preferences->Tools->ant.bat.
Uncheck capture output so you get a viewable Dos window.
Check prompt for parameters, so you can modify command line options.
Uncheck close DOS window on exit so you can see any compile errors.
More Ant articles are available here: http://jakarta.apache.org/ant/resources.html
Good luck,
Ben
Re: Classpath w/ Textpad
I am trying to add the keyboard class and I have to set it with -classpath but I cant get it to work. Does anyone know how.