how to get workspace path in eclipse? [closed] - java

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am doing to study about PDE(Eclipse Plugin Project).
I need to get workspace path.
My text widget(swt) should to be set current workspace path.
How to get workspace path in eclipse?

You want:
ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();

File -> Switch Workspace -> Other
the shown directory is your current workspace

Related

I am getting compilation error while building maven project error: package org.jdom does not exist [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 days ago.
Improve this question
I have updated Maven Dependency org.jdom from version 1.1 to version 2.0.2. in pom.xml. For building my project I am using Jenkins. At the time of compiling my maven project I am getting compilation error mentioned below. If anyone know how to resolve this issue?
error: package org.jdom does not exist

Can't run test on IntelliJ IDEA [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have a Java / maven project in IntelliJ IDEA, but when I try to run a test I got the message Nothing Here
First, try updating all plugins to latest versions and restarting IDEA.
The issue may be related to this YouTrack ticket. Try disabling the Gradle plugin in Settings | Plugins and removing the following lines from CONFIG\disabled_plugins.txt file + restart IDEA:
org.jetbrains.idea.gradle.ext
org.jetbrains.plugins.gradle
org.jetbrains.plugins.gradle.maven
If it doesn't help, attach your idea.log file after reproducing the issue (Help | Show Log in Explorer).
On the latest IDE, this option is more simplified.
right-click on the folder you want to be recognized as a source folder:
Mark Directory As -> Sources Root

Intellj shows a breakpoint is invalid for a jar file I import, anyone know how to make it valid? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
Intellj shows a breakpoint is invalid.
I want to debug into a jar file I include in my project.
With Intellij pre 14.1 you would have to attach a source file of that project, you cannot simply debug a decompiled jar. I'm assuming you are using an older version of Intellij so you have two options:
attach the source code of that jar (Project Structure -> Attach Sources)
upgrade to version 14.1, then you can use your breakpoints as usual without attaching the source code

Eclipse : Jre not found and PATH [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
![][1]
Eclipse couldn't be launched beccaus of JRE or PATH i really need help
I tried to reinstall JDK but nothing changed
Before Installing Eclipse set PATH for your JDk in your computer.
Right click on computer GOTO properties and select Advanced Settings
One pop-up will appear select Environment variables and select new in user variables
Give variable name=PATH and Value=C:\Program Files\Java\jdk1.6.0_45\bin;C:\Program Files (x86)\Java\jdk1.7.0_21\bin;.
Variable value where you installed your JDK select that path and Click OK, OK, Ok
Now yo can install your IDE
Make sure your system environment variable JAVA_HOME has been set.
On windows, set the variable in system properties to some path like:
C:\Program Files\Java\jdk64bit_1.6.0_30
Or, on linux, edit /etc/profile, add the path below:
export JAVA_HOME=/usr/share/jdk1.6.0_30
Then eclipse will find JDK to launch.

How to get workspace path in Eclipse Plugin project? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have an Eclipse plugin project and I'm trying to get the path of the workspace the project is running in. (not the path of the plugin's workspace)
All what I found is the following code which gives the workspace of the plugin:
String url = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();
Is there any way to get the path of the current workspace (and not the workspace of the plugin)?
There is a way to get the path of current running class - and by the way to get the path of the current workspace. (Not the workspace of the plugin)
URL location = Current_class.class.getProtectionDomain().getCodeSource().getLocation();
System.out.println(location.getFile());

Categories