About Question enthuware.ocpjp.v11.2.3634 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

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

admin
Site Admin
Posts: 9174
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!
If you like our products and services, please help us by posting your review here.

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

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

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

Post by admin »

Right. :oops:
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests