0

I am learning ucb course CS61b Spring 2014. I'm trying to finish the lab7.

In this lab, it introduces us to GJDB, a Java debugger. After I downloaded the lasted version of GJDB (from here), planned to build and install it by following the readme file given, I got an error.

INSTALLATION

To configure, use

DIR/configure OPTIONS

in the directory in which you want to build, where DIR designates the directory in which you have unpacked the source (can be .). Use

DIR/configure --help

to see the options. Next, you can simply type

make

to build,

make install

to install, and

make install-doc

to compile and install the documentation file gjdb.pdf.

To use gjdb from Emacs, arrange to load it in your initialization (.emacs) file with the command

(load "DIR/gjdb")

where DIR is the directory in which 'make install' put gjdb.el (see the output of configure --help), or just

(load "gjdb")

if you have put DIR on Emacs's load path.

Everything is fine before I try to do sudo make, then I get an error in given code files.

/gjdb-6.4.1/src/ucb/gjdb/Env.java:15: error: package com.sun.tools.jdi is not visible
import com.sun.tools.jdi.*;
                    ^
(package com.sun.tools.jdi is declared in module jdk.jdi, which does not export it)
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
make: *** [src/gjdb.jar] Error 1

Here is a screenshopt of the place the error happens:

Image

Has anyone had the same problem or have any suggestions to make make here run successfully? Or, is there an another way or any links to introduce about running gjdb correctly?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Yongyan
  • 1
  • 2
  • Hi, everyone. I think [here](https://stackoverflow.com/questions/30295882/how-to-install-java-debugger-for-emacs-on-mac?rq=1) is a relevant question. However, it seems the question owner didn't meet the problem I have. – Yongyan Jun 28 '18 at 06:28
  • Oh, I forgot to say. My env is macOS Version 10.13.5. I try the jdk9.0.1, jdk1.8 and jdk1.7. They all give me the same error. – Yongyan Jun 28 '18 at 06:33
  • Try to use Java 8 or earlier, the error means that the source tries to use internal classes not accessible in Java 9 (or 10). It is not possible that Java 8 and 7 give the same error, given modules where only introduced in Java 9, so earlier versions don't have that error; that would mean you are still compiling with Java 9. In any case, ask your professor or tutor for support. – Mark Rotteveel Jun 28 '18 at 06:46
  • Thanks, that's a good point. But I think I have already used the Java 8 and 7 because if I use the Java 9, when I `configure`, it will give me some errors: `Error: Unrecognized Java version: "java version "9.0.1" Java(TM) SE Runtime Environment (build 9.0.1+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)"`. I was using Java 8 when did `make`. – Yongyan Jun 28 '18 at 21:38

0 Answers0