以下代码:
import org.biojava.bio.structure.ResidueNumber;
import org.biojava.bio.structure.Structure;
import org.biojava.bio.structure.io.PDBFileReader;
import org.biojava3.protmod.structure.ProteinModificationIdentifier;
public class Test3 {
public static void main(String[] args) {
try {
PDBFileReader reader = new PDBFileReader();
reader.setAutoFetch(true);
// identify all modifications from PDB:1CAD and print them
String pdbId = "1CAD";
Structure struc = reader.getStructureById(pdbId);
Set<ModifiedCompound> mcs = identifyAllModfications(struc);
for (ModifiedCompound mc : mcs) {
System.out.println(mc.toString());
}
// identify all phosphosites from PDB:3MVJ and print them
pdbId = "3MVJ";
struc = reader.getStructureById(pdbId);
List<ResidueNumber> psites = identifyPhosphosites(struc);
for (ResidueNumber psite : psites) {
System.out.println(psite.toString());
}
} catch(Exception e) {
e.printStackTrace();
}
}
}
...导致以下错误消息流:
C:\Users\CaitlinG>javac Test3.java
Test3.java:1: error: package org.biojava.bio.structure does not exist
import org.biojava.bio.structure.ResidueNumber;
^
Test3.java:2: error: package org.biojava.bio.structure does not exist
import org.biojava.bio.structure.Structure;
^
Test3.java:3: error: package org.biojava.bio.structure.io does not exist
import org.biojava.bio.structure.io.PDBFileReader;
^
Test3.java:4: error: package org.biojava4.protmod.structure does not exist
import org.biojava4.protmod.structure.ProteinModificationIdentifier;
^
Test3.java:9: error: cannot find symbol
PDBFileReader reader = new PDBFileReader();
^
symbol: class PDBFileReader
location: class Test3
Test3.java:9: error: cannot find symbol
PDBFileReader reader = new PDBFileReader();
^
symbol: class PDBFileReader
location: class Test3
Test3.java:14: error: cannot find symbol
Structure struc = reader.getStructureById(pdbId);
^
symbol: class Structure
location: class Test3
Test3.java:15: error: cannot find symbol
Set<ModifiedCompound> mcs = identifyAllModfications(struc)
^
symbol: class Set
location: class Test3
Test3.java:15: error: cannot find symbol
Set<ModifiedCompound> mcs = identifyAllModfications(struc)
^
symbol: class ModifiedCompound
location: class Test3
Test3.java:16: error: cannot find symbol
for (ModifiedCompound mc : mcs) {
^
symbol: class ModifiedCompound
location: class Test3
Test3.java:23: error: cannot find symbol
List<ResidueNumber> psites = identifyPhosphosites(struc);
^
symbol: class List
location: class Test3
Test3.java:23: error: cannot find symbol
List<ResidueNumber> psites = identifyPhosphosites(struc);
^
symbol: class ResidueNumber
location: class Test3
Test3.java:24: error: cannot find symbol
for (ResidueNumber psite : psites) {
^
symbol: class ResidueNumber
location: class Test3
13 errors
我手动下载了Biojava 4.2.4的每个jar文件,并将它们存储在一个桌面文件夹中(包含在我的类路径中),在我的类路径中单独列出,并存储在C:\ program files \ java \中jdk1.8.0_112 \ JRE \ lib中\分机 和C:\ program files \ java \ jdk1.8.0_112 \ jre \ ext但错误仍未解决。
我正在使用Windows 10计算机,Java JDK8_112和BioJava 4.2.4
任何帮助都将不胜感激。
谢谢。