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());
Related
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 2 years ago.
Improve this question
While creating a Maven Project in Eclipse version 2020-06, I'm facing three problems:-
Not getting the Maven Project option under File->New, but it is present under Project Section. No Maven Project Option Present in File->New
Not getting any .java file under src/main/java.
No .java file under src/main/java
Not getting any custom Archetype.
No custom Archetype present
NOTE:- I am using JDK 1.8 and JRE 1.8 in Windows 7.
How to add all this for the Maven Project? Please suggest.
It just works like this. What is wrong with it?
Just add your .java file. Right click -> new -> class/interface/whatever
I think you have to wait. In the bottom-right corner we can see "Retrieving archetypes". It can take a few minutes to download everything
You can use 'Window > Perspective > Customize Perspective' to customize the current perspective. Choose 'Shortcuts' and then 'Maven > Maven Project' to add that to 'File > New'.
It is up to you to create new Java files.
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
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
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
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 making an application which has dependencies to several files and I would like to be able to include them within the applications file instead of getting the user to manually download them or have a downloader built in.
The IDE I am using is Eclipse and I would rather do this without Maven(I believe this is the kind of thing Maven does but have not looked into this yet).
Thank you for reading.
After adding your jars to your build path, you can export your project as a 'Runnable jar' with the option to package all dependencies into the generated jar. Thus, preventing the user from needing to download the external dependencies. This is the option to select:
Open the project properties and go to the Build path settings. There should be an option that says something like include external jars
Right click your Project and select Properties.
Select "Java Build Path".
Select the "Libraries" tab.
Click "Add JARS..." or "Add External JARS..." depending on your application.