About Question enthuware.ocpjp.v11.2.3634 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
olsongrant
Posts: 8
Joined: Mon Nov 02, 2020 10:21 pm
Contact:

About Question enthuware.ocpjp.v11.2.3634 :

Post by olsongrant »

I believe the correct answer is the one that refers to an exception trace being seen from the jdeps command.

The jdeps -summary TestClass.java doesn't work, as it doesn't seem to work with a java (text) file. I tried
jdeps -summary TestClass.java
and received an exception stack trace:
Exception in thread "main" com.sun.tools.classfile.Dependencies$ClassFileError
at jdk.jdeps/com.sun.tools.jdeps.ClassFileReader.scan(ClassFileReader.java:172)
at jdk.jdeps/com.sun.tools.jdeps.ClassFileReader.entries(ClassFileReader.java:121)
at jdk.jdeps/com.sun.tools.jdeps.Archive.contains(Archive.java:92)
at jdk.jdeps/com.sun.tools.jdeps.JdepsConfiguration$Builder.addRoot(JdepsConfiguration.java:510)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.buildConfig(JdepsTask.java:583)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:543)
at jdk.jdeps/com.sun.tools.jdeps.JdepsTask.run(JdepsTask.java:519)
at jdk.jdeps/com.sun.tools.jdeps.Main.main(Main.java:49)
Caused by: com.sun.tools.classfile.ConstantPool$InvalidEntry: unexpected tag at #1: 67
at jdk.jdeps/com.sun.tools.classfile.ConstantPool.<init>(ConstantPool.java:244)
at jdk.jdeps/com.sun.tools.classfile.ClassFile.<init>(ClassFile.java:82)

Then I tried with
jdeps -summary TestClass.class
and got the following result:
TestClass.class -> java.base
TestClass.class -> java.desktop
TestClass.class -> java.sql

Online
admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v11.2.3634 :

Post by admin »

You are right. That should be just TestClass and not TestClass.java
Fixed.
thank you for your feedback!

olsongrant
Posts: 8
Joined: Mon Nov 02, 2020 10:21 pm
Contact:

Re: About Question enthuware.ocpjp.v11.2.3634 :

Post by olsongrant »

Actually, no. Just saying
jdeps -summary TestClass
doesn't work, either. Below is what I experience:

C:\code\java\ocp11\alone>jdeps -summary TestClass
Warning: Path does not exist: TestClass

C:\code\java\ocp11\alone>jdeps -summary TestClass.class
TestClass.class -> java.base
TestClass.class -> java.desktop
TestClass.class -> java.sql

Online
admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v11.2.3634 :

Post by admin »

Right. :oops:

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests