I've been using jedit for a few years. I installed it (not recently) with server mode so that jedit-server starts each time my OS starts.
I'm using windows 7 and java 1.8.0_111 and I recently noticed the random lack of jedit system tray icon. By random I mean from time to time (maybe one out of ten times, no obvious periodicity), after windows starts, the system tray icon is not visible.
I usually click on the system tray icon to open a new jedit window. As the system tray icon was missing I tried to launch it manually: programs > jedit > jedit and no window was displayed.
I checked processes and found that the jvm is actually launched but no window is displayed, very odd.
Is there someone with the same issue, a fix or a workaround?
FYI, I did not change jedit or java version recently.
If jEdit does not come up you maybe have a stale server file in your settings directory that points to a port that some process listens on but does not respond how jEdit expects. Unfortunatley up-to-now this situation is not handled too nice by jEdit, as it can end in waiting for an answer forever. So if you find jEdit not coming up, have a look at activity.log in the settings directory to see whether some error is logged, and try deleting the server file from the settings directory after killing the jEdit process and before restarting it.
Actually, I found a workaround, if you start jedit manually from command line using the "noserver" option, the jedit window is displayed as expected:
C:\Program Files\jEdit>java -jar jedit.jar -noserver
It probably means there is something wrong with jedit-server start process or at least with the communication between jedit client and server. I did not found what yet, but at least it gives a workaround!
Related
I have Java version 8 Update 261 on a 64 bit Windows 10 system.
What I did:
downloaded and executed a jnlp file
the application was installed in the Java cache and a desktop icon was created
the application was starting
So far, so good.
Now, after closing the app and double clicking that desktop icon - nothing happens.
However, in the Task-Manager I see that the Java Web Launcher is running. And every further double click starts another instance of it, but on the screen I see nothing.
To get the application running properly again, I can either
clear the Java cache with hook at "installed applications and applets" set:
The desktop icon is removed, the above procedure can then be repeated and works like a charm.
or show the Java console
In this case double clicking the desktop icon works! The Java console opens and after some seconds the application is starting.There's no need to clear the cache anymore.
I understand that clearing the cache can solve manifold issues, but what effect has the simple "show console" here?
I'm developing a swing based Java application (Java 8) for Mac and Windows. Some users have set the mac system preference under "General" "Prefer Tabs when opening documents" to "Always" or "Full screen". When the setting is set to "Never" it works without problems.
This setting causes some weird state in which the window opens a new tab which results in a frozen application which can only be force quitted. I cannot assume that users know about this hidden setting in the Mac OS system preferences.
Three solutions would work for me:
Find any workaround to prevent the window from opening other windows as tabs?
Launching our bundled Java app with some -flag that disables this behaviour for the entire application
Detecting if this mac system setting is enabled and then warn the user and quit the application (not really a good solution)
This change in Big Sur is causing a bug in Java https://bugs.openjdk.java.net/browse/JDK-8256465
There is a workaround from MacOS terminal window you can run
defaults write net.java.openjdk.cmd "AppleWindowTabbingMode" manual
or if you have java bundled within your own application use the value of CFBundleIdentifier in the applications Info.plist file
e.g
defaults write net.myapp.com "AppleWindowTabbingMode" manual
I am writing Java application, which is totally GUI-less. It runs in terminal through command line and everything is fine. But now I need to add system tray's icon to it in order to provide some notifications to the user. I tried to use java.awt.SystemTray and java.awt.TrayIcon for that. Although icon almost works (leaving look and feel problem aside), my Mac OS puts new application window to the Dock, as if whole Swing application was run.
So, the question: can my GUI-less java application remain totally invisible but for the tray icon? In Mac OS, Windows and Linux.
Edit: I have tried
System.setProperty("apple.awt.UIElement", "true");
This helped me getting rid of Dock icon, but now
trayIcon.displayMessage("Run!", null, TrayIcon.MessageType.ERROR);
does not display message window.
If it doesn't work with Swing maybe you could try
SWT: Tray Icons and Tooltips.
I have developed a Java aplication that is currently being run by double-clicking on a ".bat" file that does something like "java -jar proy.jar". This application just listens on a port and writes to a database, so it does not have any user interface (such as a window). I need this application to run as in background mode, or as it were a service, but I don't really anything more than that. It's enough if the application is run in a way that is not noticeable by the user, so that the user is not bothered and so the application can not be mistakenly closed. By the way, this will be run on an specific computer so it's okay if I have to do any manual configuration ir order to make this work. Also, I need this application to run on startup.
Any help/tips regarding this?
In advance, thank you very much for your help!
Regards,
Pedro
use javaw.exe instead of java.exe and you will not get a console window.
from the java.sun.com:
The javaw command is identical to java, except that with javaw there is no associated console window. Use javaw when you don't want a command prompt window to appear. The javaw launcher will, however, display a dialog box with error information if a launch fails for some reason.
EDIT:
A .bat will start a console. If you can live with a console up for a fraction of a second, you can preface your call to javaw with start. This will spawn another console-less process for javaw and allow the console-ful bat to exit.
You can run your application as a System Tray icon (Java 1.6) if you are targeting Windows environment. Allow a context-sensitive menu trigger when clicking on the System Tray icon for the user to select a few options.
OK, maybe I'm dumb/blind, but in the docs it says "rebuild and restart the server." But I don't see a button to do this anywhere. Or from any contextual menu. And I can't find anything in their docs explaining how to do it. If I just try to start the app again, it gets angry because I already have App Engine running on the needed port.
Only solution I've found is to restart Eclipse... any other ideas? A screenshot of a button would help if possible. :)
In eclipse, there is a view that contains your Console. If you click on that, you will see the STDOUT and STDERR output of your running application. In the upper right, there should be a red box that will terminate the currently running program.
I have a different and possibly more productive solution for you. Like with most web development environments you probably want to change your source code and have Google Appengine server reload the new code for you.
You need some version of the traditional "touch" unix command (if you work on windows you can download a version from here).
Then go to you project properties, Builders and add a new build step as a "Program". Under "Location" enter the path to your "touch" command ("D:\bin\UnxUtils\usr\local\wbin\touch.exe" for example - on Posix systems just "touch" should be enough since it's already in your PATH) and in "Arguments" put something like "${project_loc}/war/WEB-INF/appengine-web.xml".
Also go to the "Build Options" tab and check "During auto builds".
"touch" will update the timestamp in you appengine-web.xml. When the App Engine server detects changes to you appengine-web.xml it will reload the app automatically. The load process is very fast so it can be done whenever you change any file in your project (which normally triggers the auto-build in Eclipse) - you can tweak the builder to only run when you change certain types of files.
I might add that the "little red box" is not always visible. It drove me crazy reading that same instruction but not seeing the terminate button until I discovered that the Console windows has "layers" that you can select from using the drop-down button on the far right of the controls for the Console view. You just need to go "back" to the console screen that says the server is running and you will see the little red terminate button.
The previous answer wasn't cutting the cheese for me. Upon first starting App Engine, the red square would be available above the text entry area. If I then clicked the run button again, then red square would go away and the console for the previous launch would be replaced by the console for the new launch. To manually stop the App Engine server, you can kill it from the terminal:
http://geekbrigade.wordpress.com/2009/02/26/how-to-find-and-kill-a-process-that-is-using-a-particular-port-in-ubuntu/
In short, "sudo netstat -lpn |grep :8888" and kill the service by process ID.
Strangely, adding Google Web Toolkit to the project made my App Engine launch show up in the Development Mode pane, where it could be easily be killed or restarted.
Just Click on Debug perspective (should be on upper right panel), select the instance of web application on Debug panel (if you don't show it, you could enable by menu Window->show view->Debug) and click on red box of view menu.
The best I've found is to setup the keyboard shortcuts for the console's terminate button, and the run/debug start/restart command. By default, you can enable Command-F2 to terminate, and Command-F11 to restart, its fairly painless. Make sure to enable the full debug menu group (click on main toolbar -> customize, etc)
If you include the gwt SDK in your project, the gwt development mode box contains a reload server button that will work just fine.