Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Cannot connect to socket - new to java/eclipse(Problem debugging )
Cannot connect to socket - new to java/eclipse [message #1810071] Tue, 30 July 2019 09:37 Go to next message
Haraldur Kristjanson is currently offline Haraldur KristjansonFriend
Messages: 1
Registered: July 2019
Junior Member
Hello

I am totally new to programming and I using a tutorial Eclipse and Java for Total Beginners by Mark Dexter.
I am working on Ubuntu 18.04.2 LTS, using Eclipse IDE for Java Developers Version: 2019-06 (4.12.0) and openjdk version "11.0.3" 2019-04-16.

Just beginning and when I was going to try out debugging, just 2+2, inspect following error occurred: unable to lunch scrapbook VM (details : cannot connect to VM. Socket closed).

In console below is : Error occurred during initialization of boot layer
java.lang.module.FindException: Module totalBeginner not found

Can anyone help me and am I in the right place for questions like this ?

Best regards,
Haraldur
Re: Cannot connect to socket - new to java/eclipse [message #1810918 is a reply to message #1810071] Thu, 22 August 2019 03:42 Go to previous messageGo to next message
Jay Arthanareeswaran is currently offline Jay ArthanareeswaranFriend
Messages: 128
Registered: July 2009
Senior Member
Some questions to understand your problem more:
1. Do you have modules in your project? When you create a project with compliance 9 and above, the wizard offers to create a module in your project (look for a module-info.java in the root of source folder). If you have, share that here.
2. When you run the program, what are the JVM arguments you use.
Re: Cannot connect to socket - new to java/eclipse [message #1817285 is a reply to message #1810918] Wed, 20 November 2019 00:22 Go to previous messageGo to next message
Sylvain Nadeau is currently offline Sylvain NadeauFriend
Messages: 3
Registered: November 2019
Junior Member
Same problem for me!

Steps to reproduce:
Preference>Java>Compiler: JDK compliance = 10
Create a new Java Project
Open a new scrapbook,
Enter "2+2"
Select it
Right click, Display
BOOM!!!

This result in the following bugs:

In popup:
Unable to launch scrapbook VM
Cannot connect to VM
Socket operation on nonsocket: configureBlocking

In console:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module testingjshell not found

In CMD window (lauched on Eclipse opening):
Exception in thread "Listening Connector" java.lang.NullPointerException
at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:97)
at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:63)
at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:167)
at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:116)
at java.base/java.lang.Thread.run(Thread.java:834)

-=-=-

1. Do you have modules in your project?
Yes!

BTW, here is a layout of the "entire" Java Project:

Project (Compiler set to comply to JRE Sys Lib [JavaSE-10])
- src
- module-info.java (module test {})
- myScrap.jpage (2+2)

2. JVM arguments you use?
No argument but the defaults for a new Java project.
(I do not see the point of this question since I there is no way to set a run configuration for the Scrapbook)
We are not even trying to call a module method, just a basic "2+2".

Please note:
When I set the project to Java 8, everything works fine. (But need to restart Eclipse first)
When I set the project to Java 9 or 10, I get the error.
So it really looks like it's related to modules (or something else related to these release anyway).
I have looked on Stack Overflow but there is no good answer yet to this question.

Java -version
openjdk version "11.0.1" 2018-10-16
OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)

Any idea?
Re: Cannot connect to socket - new to java/eclipse [message #1817410 is a reply to message #1810071] Thu, 21 November 2019 17:41 Go to previous messageGo to next message
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 139
Registered: October 2018
Senior Member
No problem here !

Thank for the the knowledge....

System: windows 10
Java: openjdk 13.0.1
Eclipse 2019-09 R (4.13.0)

index.php/fa/36803/0/


Re: Cannot connect to socket - new to java/eclipse [message #1817625 is a reply to message #1817410] Tue, 26 November 2019 21:30 Go to previous message
Sylvain Nadeau is currently offline Sylvain NadeauFriend
Messages: 3
Registered: November 2019
Junior Member
index.php/fa/36825/0/Ok, just updated my OpenJDK t& Eclipse

openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment (build 13.0.1+9)
OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
Eclipse IDE for Enterprise Java Developers.
Version: 2019-09 R (4.13.0)
Build id: 20190917-1200

And still have the same issue...
index.php/fa/36825/0/

[Updated on: Tue, 26 November 2019 22:54]

Report message to a moderator

Previous Topic:Problem about plugin supports search feature In eclipse
Next Topic:Breakpoints in Eclipse 4.14M3
Goto Forum:
  


Current Time: Fri Mar 29 12:02:40 GMT 2024

Powered by FUDForum. Page generated in 0.05910 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top