[Biojava-l] It's me once again

jon portuondo murguiondo jon portuondo murguiondo <jon.portuondo01@campus.upf.es>
Tue, 10 Dec 2002 12:14:42


Mensaje con FORMATO mime.
-------21896-----INFOMAIL-----
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

Hi! I Haven't solved the problem. I remember you what problem I am refering to:
[jon@diana ~]$ java PdbToXMLConverter 1FS1.pdb
Exception in thread "main" java.lang.NoClassDefFoundError: PdbToXMLConverter (wrong name: org/biojava/bio/program/PdbToXMLConverter)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)

I tried to put the .class in this directory (relative to my CLASSPATH) :/org/biojava/bio/program/PdbToXMLConverter.class
But it does'nt solve the problem.
If I put the .class in the directory where I run the program, the error is the same.
On the other hand, if the .class is ONLY in the package directory (the org/biojava....), I mean if I remove the .class from the current directory, the problem is: 

[jon@diana ~]$ java PdbToXMLConverter 1FS1.pdb
Exception in thread "main" java.lang.NoClassDefFoundError: PdbToXMLConverter
[jon@diana ~]$

I tried removing the package line "package org.biojava.bio.program" but the following error ocurred while compiling:

[jon@diana ~]$ javac PdbToXMLConverter2.java
PdbToXMLConverter2.java:69: invalid method declaration; return type required
    public PdbToXMLConverter(String poInput) {
           ^
1 error

Thanks for all, spetially to Mattew that suggest me to do this modifications I've explained. In the case you want to see the source code, it is attached.

-------21896-----INFOMAIL-----
Content-Type: application/octet-stream; name="PdbToXMLConverter.java"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="PdbToXMLConverter.java"

LyoKICogICAgICAgICAgICAgICAgICAgIEJpb0phdmEgZGV2ZWxvcG1lbnQg
Y29kZQogKgogKiBUaGlzIGNvZGUgbWF5IGJlIGZyZWVseSBkaXN0cmlidXRl
ZCBhbmQgbW9kaWZpZWQgdW5kZXIgdGhlCiAqIHRlcm1zIG9mIHRoZSBHTlUg
TGVzc2VyIEdlbmVyYWwgUHVibGljIExpY2VuY2UuICBUaGlzIHNob3VsZAog
KiBiZSBkaXN0cmlidXRlZCB3aXRoIHRoZSBjb2RlLiAgSWYgeW91IGRvIG5v
dCBoYXZlIGEgY29weSwKICogc2VlOgogKgogKiAgICAgIGh0dHA6Ly93d3cu
Z251Lm9yZy9jb3B5bGVmdC9sZXNzZXIuaHRtbAogKgogKiBDb3B5cmlnaHQg
Zm9yIHRoaXMgY29kZSBpcyBoZWxkIGpvaW50bHkgYnkgdGhlIGluZGl2aWR1
YWwKICogYXV0aG9ycy4gIFRoZXNlIHNob3VsZCBiZSBsaXN0ZWQgaW4gQGF1
dGhvciBkb2MgY29tbWVudHMuCiAqCiAqIEZvciBtb3JlIGluZm9ybWF0aW9u
IG9uIHRoZSBCaW9KYXZhIHByb2plY3QgYW5kIGl0cyBhaW1zLAogKiBvciB0
byBqb2luIHRoZSBiaW9qYXZhLWwgbWFpbGluZyBsaXN0LCB2aXNpdCB0aGUg
aG9tZSBwYWdlCiAqIGF0OgogKgogKiAgICAgIGh0dHA6Ly93d3cuYmlvamF2
YS5vcmcvCiAqCiAqLwpwYWNrYWdlIG9yZy5iaW9qYXZhLmJpby5wcm9ncmFt
OwoKaW1wb3J0IG9yZy54bWwuc2F4LkNvbnRlbnRIYW5kbGVyOwppbXBvcnQg
b3JnLnhtbC5zYXguWE1MUmVhZGVyOwppbXBvcnQgb3JnLnhtbC5zYXguU0FY
RXhjZXB0aW9uOwppbXBvc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