I cannot find SpringToolSuite4.ini file in the new version of SpringToolSuite4(4.1.2). It seems be changed to manage .ini.file. Where can I find it? - spring-tool-suite

I need to change some configuration information to use SpringToolSuite4. But when I downloaded SpringToolSuite4 4.1.2 and unziped, there isn't SpringToolSuite4.ini file. So I created one, but SpringToolSuite4 didn't reference to SpringToolSuite4.ini file when starting.

I solved the problem with these steps:
Open the commad terminal;
go to the location where you put the jar file;
Run "java -jar [****.jar]";
PS: Make sure you have java runtime installed in you machine and you have the correct environment settings.
Hope this could help you.

I guess this is an admin rights problem:
I have downloaded the self extracting .jar file:
spring-tool-suite-4-4.8.1.RELEASE-e4.17.0-win32.win32.x86_64.self-extracting.jar
I saved it in c:\Program Files (needs admin rights).
Double-clicked it (not as admin) -> Same error (cannot find the SpringToolSuite4.ini file).
I have started TotalCommander (you may use a differnt explorer) with admin rights -> Problem fixed.

Open jar with winrar. Open the "contents.zip". Move to "sts-4.8.0.RELEASE" folder in documents. After, we run the program.
jar:spring-tool-suite-4-4.8.0.RELEASE-e4.17.0-win32.win32.x86_64.self-extracting
You can solve the problem like this.

When I downloaded it for the second time. I also got this error(SpringToolSuite4.ini). That's how I passed. instead of downloading it again. Downloading it again didn't work.

right click on the sts icon inside the extracted sts-bundle package and select show content.

Related

How to configure Open JDK 11 in STS?

How to configure Open JDK-11 in STS(3.5)? When i go to window > Preferences > Java > Installed JRE's and provide OPENJDKHomeFolder\bin, i get a message "Target is not a JDK root. javaexecutable not found".
I could not find any references/documentation to this problem. Any suggestions please.
Apologies. I used sts-4.8.0.RELEASE. #MartinLippert - I had to do the below as well to make it work -
In sts-4.8.0.RELEASE\SpringToolSuite4.ini file, i had to add the below in the very first line in addition to pointing to home folder as mentioned by #Kris
-vm
OpenJDK11\openjdk-11.0.2_windows-x64_bin\jdk-11.0.2\bin\javaw.exe (absolute path)
Note: Adding the above anywhere else in ini file will not work. Why? Note sure!
Ironical that, i could not find any refences to this problem. Had to spent 1 day to figure out this. Anyways got it working and hope it will be useful for others.
Basically, I think are doing it almost correctly. Instead of pointing to the 'bin' folder instead point it to the 'root' folder of the JVM installation, as the message suggests.
So in other words do not point at the 'bin' folder but at the parent of that folder.

'${workspaceFolder}' can not be resolved. Please open a folder.' on Visual Studio Code

wondering if you could assist. Really challenging in determining a solution to this from my research.
Ive downloaded Visual Studio code two weeks ago and has come across an error once I try to debug a file. The file appears to open but once I run the debugger it shows accordingly:
'${workspaceFolder}' can not be resolved. Please open a folder.
Can't seem to find or replicate a similar solution. I've also tried to reinstall Visual Studio code (no easy feat). I'm trying to at least understand the problem and its source.
The file is a .js file that I've been working on, running a simple function. It is not meant to operate in tandem with a larger workspace/program.
In VScode go to file --> Add folder to workspace and select the folder where the program files are located.
If you are using the latest Visual Studio 1.44, make sure to upgrade to 1.44.2.
The issue microsoft/vscode issue 94725 has been resolved.
It featured the same error message:
After some investigation the problem is the following for the workspace configuration our debug extensions appends the following attribute
__workspaceFolder:'${workspaceFolder}'
And the configuration resolver properly tries to resolve this and complains because the scope of the folder is not specified.
In a multi root workspace scope has to be specified, otherwise the resolver does not know against which folder to resolve the variables.
Proposed fix: the node extension which adds this attribute should scope it if it sees that we are in a multi root folder.
So instead of ${workspaceFolder} use ${FOLDER_NAME:workspaceFolder}.
This is fixed in commit ae97613.
Replace ${workspaceFolder} with ${FOLDER_NAME:workspaceFolder} in your *.code-workspace file. (from [here][1])
By the way, same goes to ${workspaceRoot}, you can replace it with ${FOLDER_NAME:workspaceRoot}.
Any more folder variables ca be fixed with this FOLDER_NAME: prefix? My workspaces did not use them so far.
Worked for me in Version: 1.44.2.
I know this question is very old already and the answers may have been correct but none worked for me on vscode v1.57.1 at the time of this comment on 30.06.2021
I had to replace ${workspaceFolder} with ${workspaceFolder:my-folder-name} in my *.code-workspace file
Ref: Variables scoped per workspace folder
I recently had this problem and so did I read the answers above but being a beginner I was unable to solve it .In my answer I don't have exactly what you should do but I will show what worked for me.
Go to the explorer and you will see there is no folder added.
Browse for .vscode folder and select it.
Issue solved {this atleast worked for me.It**(.vscode)** had .json extension file in it}.
I was having the same issue, but I solved it this way:
1- open VS Code as administrator
2- open the sheet
3- debugging with no problem :)
enter image description here
I just create a file.json that they can debug.

Visual Studio Code (VSCode) - how to update the standalone (.zip) version?

There is no "check for updates" when using the standalone/no install version.
What is best way to update a standalone version without losing settings etc.?
According to my experience (VSCode in a standalone .zip file uncompressed in D:\ using Win7 OS) you just need to download and uncompress the archive containing the new version (v 1.41.1).
When you run Code.exe in the new folder, your settings file is used and everithing is OK. (then, when you are really really sure that it is everithing OK, you could delete the old version).
If you changed the default settings file location, take a look at https://code.visualstudio.com/docs/getstarted/settings#_settings-file-locations
From the official doc it says when downloaded through zip file, one has download the release manually for each update and place the unzip version inside the Program files (Windows).
According to the special portable page all the settings, plugins, etc. of the standalone version
are stored in the data-folder. So assuming you called your vscode-folder vscode:
download the new version
unpack to vscode2 folder adjacent to current vscode
move data folder from vscode to vscode2
delete old vscode-folder
rename vscode2 to vscode
done
P.S.: Current portable versions notify about new version, but clicking on it leads to download, so above list still applies.
Edit 2020/08/04: To make a "normal" install portable one just needs to create the data folder inside the installation/unpack directory of VSC.
To download the old archive, replace user|system with archive in the URL.
Before:
https://update.code.visualstudio.com/1.69.2/win32-x64-user/stable
After:
https://update.code.visualstudio.com/1.69.2/win32-x64-archive/stable

Error running Go program

i'm trying to run a Go program and it always gives me this error i tried googling it but nothing can't see what's the problem! ScreenShot
Executable file (C:/Users!/ABDELLATIF-PC/Desktop/SimpleComputerRemote/Host/bin/server.exe) doesn't exist
Its a build issue. Check your bin folder
Whether program has access to the folder
Check preferences and missing references for the golang project.
The setup process should be driven by Host/install/windows/innosetup-x64.iss for InnoSetup:
You need to check if the setup properly installed the exe, and why it looks for C:/Users!/... instead of C:/Users/...
I managed to find the issue, It is no configuration issue or anything. You have to do 3 things as follows,
1) Make sure GOPATH value is different from GOROOT.
2) Make sure GOBIN value is empty.
3) Your package name on the go file in eclipse should be main and not the package name "hello". This should be the case for at least the file that has main function. To do this, File->New go file->Source file type should be -> Command source file-> Empty main function. Then type your code after which you can build to see the the .exe file in GOPATH/bin and the program run.
Worked for me.

Eclipse says: “Workspace in use or cannot be created, chose a different one.” How do I unlock a workspace?

When I start, Eclipse says "Workspace Cannot Be Locked"
"Could not launch the product because the associated workspace is currently in use by another Eclipse application." or “Workspace in use or cannot be created, chose a different one.”
But I know it isn't.
How do I "unlock" it?
Just delete the .lock file in the .metadata directory in your eclipse workspace directory.
Precaution - If you delete the .metadata folder all preference will be deleted.
I've seen 3 other fixes so far:
in .metadata/, rm .lock file
if #1 doesn't work, try killing the process javaw.exe etc. then rm .lock file
if #1 and #2 don't work, try rm .log file in .metadata/, and double check .plugin/.
This has always worked for me: relocate .metadata/, open and close eclipse, then overwrite .metadata back
The solution boils down to cleaning up the .metadata folder.
Go to TaskManager(Right Click in the Task Bar) and select Processess menu bar and select eclipse.exe and Click EndProcess
Another possible cause of the “Workspace in use or cannot be created, chose a different one” issue is that the real path to your workspace may have changed.
In my case, the real location of the workspace had changed, but I had used a symlink to make it look like it was in the same location. I saw errors in logs indicating that eclipse was looking at the previous "real" location, as opposed to following the symlink, and this was causing the errors.
In my case, I just moved the workspace back to its old location.
There is another case where the path to the workspace may not exist, e.g., if you have imported preferences from another workspace, then some imported workspace addresses may appear in your "open workspace" dialog; then if you didn't pay attention to those addresses, you would get the exact same error once you tried to open them.
Running eclipse in Administrator Mode fixed it for me. You can do this by [Right Click] -> Run as Administrator on the eclipse.exe from your install dir.
I was on a working environment with win7 machine having restrictive permission. I also did remove the .lock and .log files but that did not help. It can be a combination of all as well that made it work.
deleting logs and .lock didn't work but
-clean option fixed it for me.
At times, if you are on Windows, you may not see all the processes - or the culprit process in Task manager. I had to click 'Show process from all users' and there was this java.exe that I had to kill in order to get back my workspace.
Another possible case if none works is to see that there is a running Java application . may be your previous open and close has left unkilled java instances.
Do look for any java instance is running if there are two at least you need to kill one.But ,most of the time i kill any java running :) because that java is using the work space earlier and still will if don't kill it.
Change another work space in case if you want a multiple IDE to use and work on diffrent or same project , but you should import project form workspace after you open your IDE.
i was faced this issue when ever the eclipse is not closed (kill eclipse process the from task manager or computer power off), i was tried below steps, it worked for me.
1) Remove the file names start with ".fileTable" from this folder
C:\eclipse\configuration\org.eclipse.osgi.manager
2) Remove the log files like text files start with numeric names from this folder
C:\eclipse\configuration
3) Open Command prompt(cmd) navigate to this folder
C:\eclipse
type below command
eclipse clean start
For Mac Users:
It could be that another instance of eclipse is running in the background. If so, use either Force Quit eclipse or
ps -ef |grep eclipse
kill -9 pid
to all the eclipse instances, and start the new workspace
Start Eclipse with the option -Dosgi.locking=none.
I got the trick here and it works.
Don't do this unless you know nobody can work on the same file at the same time.
PLease try to end task Eclipse from taskbar. It works for me.
The answer #Boris gave is correct 99% of the time, however it can also happen if you open the workspace in an older version of Eclipse. A workspace imported into/created with Juno will throw this error when opened in Galileo.
Another all-too-common reason for this problem is if you attempt to load a directory on a drive that is no longer connected. For example, Say you program in C:\Code\Java, but occasionally work off of a flash drive, H:\Code\Java. If you do not have the drive connected it can be easy to believe you are trying to load a valid directory without noticing your typo.
Another problem is when eclipse doesn't have write access to your src folder. Change the security permission and make sure "Authenticated Users" are added with all permissions checked but Full Control & Special Permissions.
I had this error after I restarted the system (after a long time. Normally I just make it sleep).
Found out that once I mounted the drives (by clicking and opening it) where project folder is located, and relaunching eclipse, solved the issue for me.
PS: I'm an ubuntu user.
Here are a few steps to solve it the no. 4 step is works for me.
Delete .log files along .metadata folder.
Check the current user permission make sure to check the full control checkbox click apply then OK.
If you run system drive defragmentation or maintenance before you run eclipse editor sometimes original file path are not in their respective path to make sure run "previous version" time before your system maintenance of your drive where the eclipse workbench or something similar to this was saved.
This last option is works for me.
Check the drive letter of your current drive where the code editor was saved. If something unusual e.g before your maintenance your drive letter is K then after defragment or maintenance.
The drive letter is now L hence you should change the drive letter to its original one that is K.
to do this click the ff:
Open control panel
System & security
Administrative tools
Computer management
Disk management
in disk mngt choose the Drive example L
then right click > change drive letter & path > click remove > then ok, open it again then > click add and > choose your original drive letter for that drive then click ok. If you use your computer for a long period of time do restart first to refresh everything.
Choosing a "different one" is actually a pretty easy solution.
I had been running Eclipse as an administrator (sudo eclipse from the command line) because the "workspace" folder was throwing the Workspace in use or cannot be created… error (and running as administrator seemed to be the only solution that fixed it).
A coworker (working on this same issue with me) wanted to run Eclipse by clicking on an icon. So when he ran Eclipse, and the dialogue box came up with the choose your workspace, he just added a "2" to the end of "workspace".
This created a new folder: "workspace2". Eclipse ran fine with that; and I haven’t had any of the locking problems since.
It will occur when you not closed eclipse.exe correctly.
*Open Task manager->End task your eclipse->Now open eclipse.exe it will work.
Hope its help someone.
I have observed one case when eclipse when in forced quit, or Alt-f2 xkilled in linux, an attempt to immediately open eclipse shows that error. Even the metadat/.lock file is not present in that case.
However it starts working after a span of about two minutes
I don't know what's the wrong but I solved by creating a directory directly in c drive(c:\dev) instead of from my home folder (c:\users\me\dev). But I don't have to thinks about it. In my case, it is fresh eclipse unziped instance. I am not able to see .matadata folder in eclipse folder. By God grace, I solved.
The reason this was happening to me (with Photon) was easily fixed by changing an Eclipse general preference:
Window -> Preferences -> General: Uncheck: "Always run in background"
Once you make that change, whenever you shutdown Eclipse, it will no longer leave the javaw.exe process running in the background. I’m guessing this is a bug in Photon (or a bug with using the Amazon Corretto OpenJDK version of Java with Eclipse) that will one day be fixed.
I faced the same problem, but for some reasons the .lock file in workspace was not getting deleted. Even creating a new workspace was also getting locked.
So what I did was cleaning the windows temp folder, the %PREFETCH% folder and %TEMP% locations. Restart the system and then it allowed to delete the .lock file.
Maybe it will help someone.
It seems your workspace is used in Java TM, Open task manager and close eclipse.exe and java TM process.
What worked in my case was restarting the system. (ubuntu 20.04)
If anyone have come here with a STM32Cube related issue, which apparently is based on Eclipse and has the same problem, none of the above suggestions worked for me, and here is how I fixed it, for Linux, although I suppose you can find the corresponding paths in Windows as well.
In the $HOME directory, go to .eclipse/com.st.stm32cube.ide.../configuration/settings
The file org.eclipse.ui.ide.prefs contains few options including the recent workspace path, and whether it will prompt you to select a workspace at the startup. Either modify the path for RECENT_WORKSPACES, or enable SHOW_WORKSPACE_SELECTION_DIALOG.
In my case, there was a space right before the workspace's location C:\. I removed that space and it was enough :)