Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse installation issues(Rusty and confused.)
Eclipse installation issues [message #1836788] Thu, 14 January 2021 03:54 Go to next message
Joshua Jimenez is currently offline Joshua JimenezFriend
Messages: 9
Registered: January 2021
Junior Member
So I haven't coded anything in a long time and decided to pick it back up.

However, I am running into trouble installing a working Eclipse environment, even just for a Hello World example from the tutorial.

My issue is that regardless of how I install Eclipse (from package, from installer ect.) and no matter whether I install the basic version or the modelling version, I always end up with C:\users\(user)\.swt\lib\win32\x86_64\ being completely empty.

I know I need the runtime of the 32-bit eclipse, but that's simply not available for download?

If it helps, the first error thrown is:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-win32-4940r23 in java.library.path: C:\Users\joshu\.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507\jre\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;V:/Software/eclipse-java-2020-12-R-win32-x86_64/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;V:/Software/eclipse-java-2020-12-R-win32-x86_64/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Users\joshu\AppData\Local\Microsoft\WindowsApps;V:\Software\eclipse-java-2020-12-R-win32-x86_64\eclipse;;.
no swt-win32 in java.library.path: C:\Users\joshu\.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507\jre\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;V:/Software/eclipse-java-2020-12-R-win32-x86_64/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;V:/Software/eclipse-java-2020-12-R-win32-x86_64/eclipse//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Users\joshu\AppData\Local\Microsoft\WindowsApps;V:\Software\eclipse-java-2020-12-R-win32-x86_64\eclipse;;.
Can't load library: C:\Users\joshu\.swt\lib\win32\x86_64\swt-win32-4940r23.dll
Can't load library: C:\Users\joshu\.swt\lib\win32\x86_64\swt-win32.dll



P.S.: if you're curious, due to space reasons I am using a workspace on a Drivepool V: which is my RAID5.

oh, and it's WIN 10 64 bit.
Re: Eclipse installation issues [message #1836797 is a reply to message #1836788] Thu, 14 January 2021 07:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Are you saying you can't launch Eclipse nor the Eclipse Installer because of this problem or that you cannot launch some sample application you wrote because of this problem? The paths above I see suggest that you did successfully launch the Eclipse Installer and used it to create an installation.

Whether that's the case or not isn't clear. If you did launch Eclipse and then you had a problem like the above working on sample application in the IDE that's a different story and it would be good if you explained what you did in the IDE to get to the above problem...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse installation issues [message #1836798 is a reply to message #1836797] Thu, 14 January 2021 08:56 Go to previous messageGo to next message
Joshua Jimenez is currently offline Joshua JimenezFriend
Messages: 9
Registered: January 2021
Junior Member
My Appologies, I thought I was clear.

Alright, let me try to clarify:

I can install eclipse and I can launch it. I created the following test application from the tutorial:

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class Main {

	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setText("Hello world!");
		shell.open();
		while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) display.sleep();
		}
		display.dispose();
	}

}


This throws the above exception.

I have worked in this field before so I kinda know how to do the import and other settings so I can confirm those are correct.

However, when I check the paths, the folders are simply empty. I figure this is an installation error, so I tried to resolve it by installing the program in different ways, but it's still happening and just as empty.
Re: Eclipse installation issues [message #1836803 is a reply to message #1836798] Thu, 14 January 2021 10:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Okay, that makes more sense now. So it's not really an installation issue but rather you can't get an SWT application to run.

I'm not sure which tutorial you've followed nor the structure of the Project in which you have placed this code. From Googling the error, it seems like a very old problem related to launching a 32 bit application, but that doesn't really make sense given all the x86_64 (64 bit) stuff I see.

Did you create a Plug-in project? That would seem best (better than a plain Java project in my opinion) because it makes setting up the classpath much easier, i.e., you just edit the MANIFEST.MF and use the Dependencies tab.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse installation issues [message #1836806 is a reply to message #1836803] Thu, 14 January 2021 11:00 Go to previous messageGo to next message
Joshua Jimenez is currently offline Joshua JimenezFriend
Messages: 9
Registered: January 2021
Junior Member
"Create a Hello World SWT application" is the exact title of the tutorial.

These steps have been followed:

Introduction
Open the Java perspective
Import the SWT project from target platform using Plug-In Development Environment
(skiped because it told me to) - Import the SWT project from downloaded SWT archive
Verify the SWT Project in workspace
Create a Java project
Configure the Java project
Create a class
Write the Java Code

-current point- Run your Java application

To me it appears like something in the SWT library that is used in the code uses a 32 bit .DLL which isn't included in the instalation anymore.

When I dive into the error tree, it's this method that throws the exception:

static {
		lpStartupInfo = new STARTUPINFO ();
		lpStartupInfo.cb = STARTUPINFO.sizeof;
		OS.GetStartupInfo (lpStartupInfo);
	}


Found in the (public) Display class (extends Device) from org.eclipse.swt.widgets.

Do you know what that code exactly does? (or do you have a different way to create an application window?)


Edit: Actually, it's loadLibrary(String, boolean) : void in Library from org.eclipse.swt.internal that throws the exception, but it does mark the above as error code... and two other methods in this class.

[Updated on: Thu, 14 January 2021 11:03]

Report message to a moderator

Re: Eclipse installation issues [message #1836808 is a reply to message #1836806] Thu, 14 January 2021 12:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
That makes me quite sad. I would never think to try to import SWT from the target platform using PDE but rather use PDE to specify a dependency on SWT in a plugin project. More like what's here:

https://www.vogella.com/tutorials/SWT/article.html (1.5. Using SWT in an Eclipse plug-in)

But it looks like a JDT tutorial so I would suggest sharing your painful experience on the JDT forum:

https://www.eclipse.org/forums/index.php/f/13/

Be sure to mention the tutorial title so they recognize it as part of their own documentation.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse installation issues [message #1836828 is a reply to message #1836808] Fri, 15 January 2021 02:38 Go to previous messageGo to next message
Joshua Jimenez is currently offline Joshua JimenezFriend
Messages: 9
Registered: January 2021
Junior Member
that code doesn't work either, it still says that the same 32-bit .DLL files are missing.

I just want to know where I can get those .DLL files. It's probably just an old inheritance dependency like in Linux systems.
Re: Eclipse installation issues [message #1836890 is a reply to message #1836828] Mon, 18 January 2021 02:21 Go to previous message
Joshua Jimenez is currently offline Joshua JimenezFriend
Messages: 9
Registered: January 2021
Junior Member
Ok, this shit just got weirder.... After making the default install workspace and doing the tutorial again on there, the code suddenly started to work on my normal workspace too... and I changed absolutely NOTHING!
Previous Topic:Cannot Get Eclipse File To Open As Normal User
Next Topic:Sometimes outline view is not displayed correctly
Goto Forum:
  


Current Time: Fri Apr 26 11:23:39 GMT 2024

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

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

Back to the top