I just checked out an svn project in eclipse as a java project. There is are couple of run launch files in it that i want to reuse but dont know how to point 'Run' to see those launch files or use it. Any tip? thanks
Usually these are automatically picked up by the project and placed in the run menu. If they are not, Right click on the .launch file then choose 'Run As' and select the first option. This will run using that run configuration.
Related
I need some help with IntelliJ. I am fairly new to programming, and I have some experience with the IDE but I am by no means a know-it-all when it comes to IntelliJ.
I have 3 Java files (without their respective class files). When I open intelliJ it asks me:
Create New Project
Import Project
Open
Check out from Version Control
I click on open, IntelliJ opens up a file location, I click on one of the three Java files to open, and I drag the other two one by one (they open in their separate tab).
I cannot figure out how to run them. It is likely that I need to create run configuration and I don't know how to do it. I know how to create a new project and get everything working, but I don't know how I can get the files working if I just open them. Can someone tell me how to create the run configurations to run the files? Please and thank you.
IntelliJ IDEA is a great IDE!
This is what I would do:
Select File/New/Project... in the menu. You will get a new modal window.
Then select Java on the left, make sure that you have your JDK selected (top right), it not there, create it right from the window. Click 'Next'.
Just go 'Next' on the 'create project from template' step.
Then type your project name and select a folder for it. It will create a new project.
After that, copy your java files into /src folder using drag-and-drop in IDEA or just a file manager you like.
Now you have an IDEA project with your source code in it. You might need to sync your IDEA project, use File/Synchronize for that.
Finally, you can right click on you java file and 'Run' it from IDEA.
It the project fails on compilation you might need to add required imports and libraries, but that depends on your code. IDEA will highlight all the errors.
I'm trying to add another class to an IntelliJ project I created. I already have one program in the project and it is running perfectly. I tried to add another program to the same project's src folder but cannot Run this file. The s/w allows me to build and compile the file but I'm only able to Run the first program I created in the project.
I could do this in Pycharm but not in IntelliJ. Am I missing something? Is there a different method to achieve this in IntelliJ?
You should press shortcut :Alt+Shift+F10.Then you could choose which program you wanna run.
If you click on main method not found, it should bring you to the page where you can add the configuration.
I set a lookAndFeel synthetica theme for the project.After that it is not working(jar file in the dist).
Again I removed it and tried.Then it worked. I did clean and build.
Tried several themes. They all workedd in the project. But did not run in the dist.
What should I do? Please help me..
I have experienced this before in my projects. Most of the time it happen because of using icons and images.
When /Icons/calculator.png image in your package, it is not wrong in netbeans like this getClass().getResource("/Icons/Calculator.png").
this is working on netbeans. but not in jar file. you need to rename Calculator.png.
use jar file in console (CMD in windows , shell in linux) with this command
java -jar adress-jar-file/jarfileName.jar
then see error in console.
Just Right click on yoru projet in netbeans and select Set Configuration then Customize in the window that appears provide your Main Class by clicking the browse button or writing it manually and Clean and Built again
Plz make sure some points.
1) You have set main class properly.
Right click on Project-> project properties-> Run-> set Main-Class
2) You have set theme path properly.
3) Your themes are not corrupted.
4) You have build your jar properly.
Right click on project-> clean and build(Note: Do nothing while it finish building jar)
5) Your lib folder not corrupted (if it is present).
It looks like there maybe something wrong with your setup. In your project properties, under libraries have you by chance added synthetica.jar as a required jar. but m not sure try it
but you can simply do,
you could create lib folder manually in your project folder and then paste that jar in that folder then through netbeans go to your project then right click on libraries and then browse to find your project folder open that then click on lib folder that you have created open it then click on jar that you have pasted and that jar file will be added to your project.
I could resolve my problem.I'm sorry that I was used trial version Synthetica.jar. after I bought it and done every thing from the beginning. I resolved it. Thank you for your contribution to resolve it.thank you
In Netbeans a simple click to clean/build creates a nice folder called dist/ in the project workspace and contains a runnable .jar, all in the background no repetitive popup menu.
Is there some sort of setting in Eclipse to make this same process faster and easier, even a hotkey to direct export using previously set settings would work?
It's not particularly hard in eclipse.
Right click on the project name and select export.
Open the Java section and select "Runnable Jar File", click "Next"
Fill out the supplied form with the appropriate options.
That's about it.
I'm looking for a file where Eclipse stores its launch configurations. I'm doing some Java development in Ubuntu.
One of the executables i'm developing requires an output from another executable as a argument to it. So say, the output of 'B' needs to be passed as a commandline argument to 'A'. In the Eclipse, I don't want to manually change the "Run Configuration" every time. Where does Eclipse store these configurations esp the arguments?
I found a "eclipseArguments.txt" in the extras folder of the project but this isn't the same as the arguments I'm passing into the Run Configurations. The ".project" file doesn't contain it either. I'm confused.
Thanks for the help.
You can find the configuration files in :
<workspace>/.metadata/.plugins/org.eclipse.debug.core/.launches
There should be a *.launch file for every configuration you have in this workspace stored there.
I'm not certain where Eclipse stores the 'local' run configurations (likely somewhere under the workspace .metadata directory), but under the 'common' tab of the Run Configurations dialog, there's an option to save it as a 'Shared file' within a project, in which case it will show up in your project directory.
I found it in Debug config. Once I run module, in the debug window I can right click an go to Properties or some similar option and then there is a full path with all arguments.