I have just completed my first java program. It's sitting in Eclipse pretty as a newborn (which really isn't all that pretty). Anyway, I need to have an icon on the desktop that allows users to click and run the code. I found an example of how to make a .jar from the project in Eclipse, but nothing happens when I click on it. There are a LOT of options in Eclipse so I'm guessing I need to select/deselect something, but the examples online are very few and far between. Since I'm sure I'm not the first person who has done this, I'm assuming I lack the vocabulary to find an answer. Could someone please give me a little direction to find help?
I have tried "compiling" but that's running the code. Anything with .java just tells me how to install Java. There have been too many searches to list them here. Suffice it to say I need a push in the right direction, please.
There isn't realy much to do wrong. Just go to Project -> export and select runnable jar file. Then you just have to pick the right launch configuration and click finish. There is a tutorial with picutres on wikiHow here.
Related
I have this chess engine i wrote in java. Thing is, I need to make a exe application that can take commands following a certain protocol (UCI). Ive had many problems trying to get this to work, but ill keep this brief and share the most important ones.
Other engines pop up cmd when you click on them, mine is just a basic java CLI (Dont know if this is a problem).
My anti virus keeps stopping me from opening the exe. Launch4j gives me a warning telling me I should sign it to prevent this sort of thing, but I dont know what that means.
So heres the deal, I know this post is word vomit, but Im truly at a loss right now. Id like general order advice on how I should approach the problem and maybe some advice on wether i should be using launch4j in the first place.
UPDATE: The reason i wanted to make an exe in the first place is because thats the format that was suggested in the lichess documentation (I wanted to upload my bot to lichess). I wrote a bat file that executes the jar file and it worked fine. Thanks to everyone for the suggestions.
I'm recently working with Eclipse Che and have the task to import a Java Project that opens a GUI in it (like a simple Swing/SWT Calculator).
I am using the Java CentOS Stack, importing the .jar files, etc. is no problem but I get the "No X11 DISPLAY variable was set, but this program performed an operation which requires it." error.
Obviously, I found many threads about that Error, but I just wanted to ask if it is even possible to open a GUI in a web based IDE like Eclipse Che before wasting hours trying to fix that error when it's not even possible.
Maybe some of you already tried that and have a solution/tip or smth for me.
edit: found a video that answered my question. https://www.youtube.com/watch?v=AjgSp0dkxxU
Thanks anyway.
This will help you out - https://eclipse-che.readme.io/docs/che-and-swing
You need to use the right stack
You need to set the display variable. The way I did this was modify the run command to set it just before the other commands.
The command I used is:
export DISPLAY=:0.0
Also note that this worked for a while for me but randomly stop working a few days back so please tell if you manage to get it working.
I'm developing a new plugin/step for my pentaho PDI installation.
The thing is, that i can't start spoon if the step is in the plugin/steps folder, if i take it out, i can start it normally, so, it is deffinitelly a problem with my step, but can't see anything wrong with it, at least not just by reviewing the code...
I have made some others with no problem, but this one doesn't want to let my spoon installation run :/
Can someone give some kind of input? I know there is someone who had to do a plugin at least...
When "filename:line" is displayed in the console, it becomes a link to the appropriate place in the code. I'm trying to duplicate this functionality in an Eclipse plugin and not having much.
I got a bit of help from these sites:
eclipse plugin: How to programmatically select text in editor?
Eclipe PDE: Jump to line X and highlight it
http://www.eclipse-tips.com/tips/9-open-editor-programmatically
But they've all gone a bit over my head (as I rather new to Java and Eclipse). They seem unnecessarily complex for my simple problem. I found another person asking almost the same question at http://www.eclipse.org/forums/index.php/t/560031/, but no one was able to help them.
So, given a file name (such as MyClass.java) and a line number, how do I tell Eclipse to open the file and show the line? If someone could just point me to the place in the Eclipse source that does the same thing, I'm sure that would go a long way towards the solution.
Lately, I've been working on a project in NetBeans using the GUI editor that's built in. Before I noticed that it generated an XML ".form" file that didn't appear in the Project Explorer Pane which makes sense. Earlier I was working on the form in the "Design" tab when it notified me about 15 updates. I just updated without reading anything which was probably a bad idea but when I restarted the IDE, it showed my GUI ".class" file and ".form" file separately in the Project Explorer and I couldn't switch between "Source" and "Design". I also noticed that the generated code that was usually not editable was now editable.
P.S. I'm able to create a new frame just fine and the design editor still works with new frame
I have encounter the same problem and I have solved it.
The key in this problem, I think, is particular plugins for JFrame in Netbeans are not active after updating, so we only need to activate them. The easiest way to achieve this is create a new JFrame class, so in this progress, NetBeans can activate all relevant plugins for us. Finally, restart NetBeans, then everything would be fine.
Thank you very much for all of you that you give me some idea and clues in this situation:)
Work on a similar problem led me to this discussion concerning Guarded blocks inside form Java source file. I'm not sure it's related to your situation, but it may help you recover.
If you are trying to recover the lost state of the backing xml for the form I don't know what to tell you.
This has happened to me, but I tend to highly componentize the forms (break up the forms into little pieces), which makes this not such a big deal. Have you tried the NetBeans forums? You might get better luck there:
http://forums.netbeans.org/
Nevermind, simple solution.
I finally decided that, after plenty of tinkering, to restart the IDE which I should have though of first. The Java SE Plugin must have crashed or something, anyway it's fixed.
Thanks for the help!
Or just right click on the corresponding .form file and select open. The Design tab/editor reestablishes.