javac -g option Create a class file with debug information in a java file. (* The class file is stored under the test directory.)
For that class file
A class file with the jdb main class
↓
Execute the command with run.
Then
] (3e909b4d989ea06006fa73f4aa419321.png)
If i search for "ERROR: transport error 202: gethostbyname: unknown host",
Link content
[Excerpt from the above site]
The jvm is trying to open the dt_socket at host Patricks-iMac.local, port 50547 but needs first to resolve that host name to an IP address. DNS lookup will fail since it's a dummy hostname assigned to a private address and DNS servers usually don 't know about them unless a sysadmin has configured them (companies use to do that). There are two solutions for this:
* I do not understand the meaning of the above English sentences. (Because the basic knowledge of DNS etc. is lacking in the first place.)
dt_socket/Patricks-Where is the file that specifies iMac.local/port 50547?
→ I checked it but it didn't come out.
● There are two methods presented as Answer. ↓
1) Add the hostname mapping on hosts file keeping other names configured for that IP
127.0.0.1 localhost Patricks-iMac.local
* By the way, the contents of the/etc/hosts file on my PC are as follows.
2) Configure the dt_socket by IP address without touching hosts file (recommended)
-Xrunjdwp: transport = dt_socket, address = 127.0.0.1:50547
2) Recommended for those who are supported. (Because I didn't want to mess with the files in the root directory.)
→ An error will occur.
In the first place, when debugging
java -Xrunjdwp: transport = dt_socket, address = 127.0.0.1:50547 Main
Is it executed by java command?
I'm not sure if it will be executed in the flow of jdb → run.
Is it feasible with either method?
[My environment]
macOS Big Sur version 11.0.1
Macbook pro 16 inch
[Java/javac version]
If anyone has any knowledge,
Could you please teach me?
-
Answer # 1
Related articles
- about compiling class files in java dynamic web projects
- java - i can't understand the transition relationship of html files in spring boot
- java - unable to draw class diagram on amateursuml in eclipse
- java - i would like to know how to combine two csv files in batch and narrow down where and output
- java - how to pass values by class
- java - i want to get the date and time continuously by calculation without using sleep or timer
- i want to create a game in java that can be created without programming knowledge
- java - i want to know the correct way to access a class from multiple classes
- java - to create a method and call it from another class
- java class inheritance
- java - please tell me what is the import of the class with an underscore at the end
- java - i want to send files from the application to the connected pc
- [java] i don't understand that upcasts are automatically cast without explicit casts
- java - i want to put two methods in the graphics class, can anyone please tell me how
- java - method using graphics class created in another file cannot be used in main method of main class
- i want to store image files (path) in db and image folder with java spring framework
- java - instant and class
- how to generate a class and use coroutines without using unity (c#) addcomponent
- java - introduction of jdbc driver and class path
- python - you may need to restart the kernel to use updated packages error
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- javascript - how to check if an element exists in puppeteer
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file
- i want to check the type of a shell script variable
- i want to call a child component method from a parent in vuejs
I think it is necessary to pass the address as a compiler argument when RUN with jdb.
I don't know what the program is doing in the first place, so I think it's hard to comment if you don't post the source code.
If you are running a program without source code, you should compile it with jad.