Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / January 2005

Tip: Looking for answers? Try searching our database.

JCompiler errors on JEdit for JTidy

Thread view: 
thufir - 14 Jan 2005 11:09 GMT
JEdit has the JTidy plug-in, but I must be missing something because
the
JCompiler plug-in gives error messages :(

Why isn't the JTidy plug-in preventing these errors, please?

Source code:  <http://thufir.lecktronix.net/java/Test16.java>, which is
just the sample from the JTidy soureforge doc's page.

/////////////////////////////////////////////////////////////////

JCompiler results:

This is the JCompiler shell.
This shell offers four commands:
* "javac [options] files..." -- invokes the javac compiler (the one
chosen in
the option pane)
* "compile" -- compiles the current file
* "compilepkg" -- determines basedir of current file and compiles all
outdated
files in the basedir tree
* "rebuildpkg" -- determines basedir of current file tree and
recompiles all
files in the basedir tree.

JCompiler ready.
compile
Compiling C:\java\java\jTidy\Test16.java...

Command line:
javac -classpath .;C:\java\java\jTidy -g C:\java\java\jTidy\Test16.java

C:\java\java\jTidy\Test16.java:7: package org.w3c.tidy does not exist
import org.w3c.tidy.Tidy;
^
C:\java\java\jTidy\Test16.java:40: cannot find symbol
symbol  : class Tidy
location: class Test16
Tidy tidy = new Tidy();
^
C:\java\java\jTidy\Test16.java:40: cannot find symbol
symbol  : class Tidy
location: class Test16
Tidy tidy = new Tidy();
^
3 errors
JCompiler done.

JCompiler ready.
///////////////////////////////////////////////////////
thanks,

Thufir Hawat
Andrew Thompson - 14 Jan 2005 11:18 GMT
> javac -classpath .;C:\java\java\jTidy -g C:\java\java\jTidy\Test16.java

Should that be,

javac -classpath .;C:\java\java\jTidy\ -...

?

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

thufir - 14 Jan 2005 11:45 GMT
Sorry, Andrew, I don't follow you.  That looks the same, up to the "-"
as what I have.  Also, my competency with javac itself is mediocre.
-Thufir Hawat
Andrew Thompson - 14 Jan 2005 11:54 GMT
> ..That looks the same, up to the "-" as what I have.  

Let me try that a different way..

You put..

javac -classpath .;C:\java\java\jTidy -g C:\java\java\jTidy\Test16.java

I suggest..

javac -classpath .;C:\java\java\jTidy\ -g C:\java\java\jTidy\Test16.java

Compare the two strings character for character in a text editor,
if need be.  I do not know if it is the source of the problem, but
I guarantee you that they are different.

[ ..and once you have convinced yourself, return to the originals,
just to check if I'm actually going crazy.  ;-) ]

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

thufir - 14 Jan 2005 11:59 GMT
Doh!  Andrew, I *tried* to cancel that post, you weren't supposed to
read it ;)

I'll give it a try.

--
Thufir Hawat
thufir - 14 Jan 2005 12:45 GMT
I did it exactly as you suggested with the same results as before,
errors on the import.  Note that this was from the command line, not
from JEdit as previously.

I've downloaded JTidy, but don't know they syntax to tell javac where
to find the required package.  Neither do I know where the package is.
All I know is that it should be in a .jar file.

--
Thufir Hawat
thufir - 14 Jan 2005 11:53 GMT
I don't know Andrew, does the "\" make a difference?

--Thufir Hawat
Andrew Thompson - 14 Jan 2005 13:04 GMT
> ..does the "\" make a difference?

Sometimes the string will be mistaken for a file with no
extension.  Consider this file structure.

C:dis\
 1st.txt
 2nd.txt
 dat
 dat\
   deuder.txt

How do you distinguish between the file named 'dat', and
the directory named 'dat'?

You end up with file names like..
C:\dis\dat\deuder.txt
C:\dis\dat\
C:\dis\dat

The last would refer to the *file* named 'dat', while the
second refers to the directory.

Back to your problem for a moment, perhaps the '\' need to
be 'escaped', vis..

C:\\dis\\dat\\

( BTW - Personally I always use '/' in Windows.  ..Weren't
you using Linux recently?  The reference to 'C:' drive
suggests you are using Windows now. )

[ But I'm afraid I'm out of ideas for the moment, ..time for bed! ]

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane

thufir - 14 Jan 2005 13:39 GMT
I tried four combos:

/
//
\\
\

For example:

javac -classpath .;C:/java/java/jTidy/ -g
C:/java/java/jTidy/Test16.java

What does the .; indicate? . means current directory, as in compile
.class files to current directory? The ; is a seperator of some kind?

Each variation gave the same errors on the import, BTW.

(Yes, on win2k exclusively since it wrote over my MBR.  Grub4Dos should
make a floppy to boot into the grub shell, etc, etc)
thanks,

Thufir Hawat


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.