Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个监听 UDP 端口的应用程序。
当我执行打包在 JAR 文件中的应用程序时javaw -jar myjar.jar,它可以接收数据包。
javaw -jar myjar.jar
奇怪的是,如果我用 执行它java -jar myjar.jar,它不会收到任何数据包。
java -jar myjar.jar
我的应用程序不使用任何控制台。除了省略文档中提到的控制台之外,这两个命令不应该相同吗?
由于 java 和 javaw 是不同的程序,例如它们在 Windows 中可以有不同的设置。
Windows 对每个可执行文件有不同的限制。