i am creating a java application and want to provide a functionality of it in mouse right click menu on windows os
like if we have notepad++ installed then if we right click on some file then it shows an option "edit with notepad++"
i want to do similar kind of thing but with selected text
You'll have to add to your program a functionality to insert your program path into the registry. Check adding program to windows right click option menu for help.
Related
I had install netbeans 8.2 version the problem is for example imagine that we have cord like
String name = "thilina";
when I press ctrl+ mouse click on String word it will view a String class but, codes in side the functions not showing instead of code it shows enter image description here// compiled code like fallowing image
You just need to add the Sources for your JDK 8 entry in NetBeans:
Select Tools > Java Platforms to open the Java Platform Manager window, then select the entry in the Platforms panel for JDK 1.8.
Click the Sources tab, then click the Add JAR/folder... button.
Navigate to your installation directory for JDK 8, select the file named src.zip, then click the Add JAR/Folder button.
This should create an entry in the Platform Sources panel:
Click the Close button to close the Java Platform Manager window.
Now if you press ctrl + Mouse click on String in your source you should see the source code for String.java.
I have a really annoying problem in Eclipse java neon, when i do a right click on a package in order to create a new class or in any area, Eclipse don't show me proposition like class, package or even project but only a incomplete menu unusable
I have already launch eclipse with -clean but not help
An illustration of the problem, I also notice that Eclipse is in... debug mode ? (upper left corner)
Select menu Window -> Perspective -> Customize Perspective....
Select Menu Visibility tab.
Select tree node File -> New.
Toggle check box of menu items as you like.
You are in the Debug Perspective (see What is a Perspective?). You can switch back to the Java or JEE perspective (where most development activities are typically performed) by using the perspective switcher toolbar in the upper-right corner of the Eclipse window.
I suggest you learn about the use of Perspectives in Eclipse.
Try
File --> New --> (Then choose what you want)
Specify the Source folder and package.
When I don't find something in the menu there, I just click on Other... and search for whatever I want to create. Regardless of the Perspective.
Of course it could more practical to customize the Perspective to include the frequently used items as mentioned.
I am trying to learn Java Swing and Windows Builder by creating a personal project. I added a menu bar File, Edit, View, Help etc. When I click on 'File' I get Open,Save,Save As. This is also correct. But using the default options in Windows Builder, Gives me a sub menu under 'Open' indicated by an arrow but I don't want this all I want is:
File
- Open
- Save
- Save As
And I want to get rid of
File
- Open ->NULL (this is what comes as default in Windows builder)
You probably added an "Open" JMenu, instead of adding an "Open" JMenuItem. The source code would confirm it.
JMenuItem is a leaf in the menu tree. JMenu is a container for other JMenus and JMenuItems.
How can I switch to a new java project after using New... and close the remaining windows from the previous project automatically? I have to close each individual window every time, and tell Eclipse that now I want to use the new project.
use cntrl+Shift+W this short key will close the all window in eclipse
Not a direct answer, but when you right click on a window, you have an option to close all other windows.
If you want to close the opened classes from one project, press Ctrl+Shift +E to view the opened editors. Then, press the header for the column "Path" to sort them. Now select the ones from the ones from the previous project(holding the Shift key, as they are contiguous), and click on button "Close selected editors"
In Eclipse, running a project is as simple as clicking the run button.
In NetBeans, I'm totally confused. How do I run the program? If I print something, where does it go (e.g. the console in Eclipse)?
Thanks!
EDIT: Solved it. For some reason it was running a different application than the one I had selected. Anyone know why?
It's the same in NetBeans, just klick the "Run" button (you need to have a main class defined though)
The output goes into the "Output" window which is displayed at the bottom of the editor by default.
If you don't see the output window, you can display it using the menu "Window -> Output -> Output"
In the menu, see Run > Run to run a project.
On the bottom right, find the output windows, that's where the print will appear.