Skip to main content

Posts

Showing posts from 2019

Tomcat in debug, JPDA in Java 11 and Windows

In the latter versions  of Java you need to specify host. Otherwise it'll be "loopback": only connection from the same host would be possible. If Tomcat is started as Windows service, then change Java options: -Xdebug -Xrunjdwp:transport=dt_socket,address=*:9043,server=y,suspend=n What will happen if to use address=9043 with port only? Open Windows Resource Monitor -> Network tab -> Listening Ports: But when we change it to address=*:9043, Address becomes IPv4 unspecified. How to check from the machine with IDE. You can use the following PowerShell command: Test-NetConnection host.address -Port 9043 The output in case of address=9043 is the following: PS C:\Users\username> Test-NetConnection host.address -Port 9043 WARNING: TCP connect to (host.ip : 9043) failed ComputerName           : host.address RemoteAddress          : host.ip RemotePort            ...

End of line in Git

Initially we had SVN, but then migrated to Git. Actually we had no idea about end of line issue, because we always worked on Windows. After some time we've noticed that specific commits changed the whole file, though some diff tools insisted that there are no differences. First of all, it occurred that the order of revisions in git diff is important. It misled us, we started to think that those commits changed LF -> CRLF. Finally, git diff <parent_commit> <child_commit> --ws-error-highlight=new,old -- FileName.java revealed the truth: Now we are thinking should we stay with "Windows-style everywhere" or migrate to "commit Unix-style". Points to consider: There are tons of holly wars, but I couldn't find recommendation from Git. But it provides a way to change behavior. There is recommendation from GitHub to use LF in repository. Windows for git has three options, but neither one of them enforces CRL...