In the control panel under Java, there is an Advanced option to Show console... With this enabled, an additional window launches when my app launches. The window is titled Java Console - MyApp Name.
Is there a way to launch this console window programmatically? Rather than require the user to enable this feature, I would like to make the window available on request from the application.
Is the console a feature of Java WebStart? I do not see an API call for the console in the webstart API. If I look elsewhere, I just see many references to the System console object which has nothing to do with the console window.
No, there is no such default 'application console' attached to JWS apps.
Related
Here is an "Hello World" applet is given on Oracle's it works online. Oracle has also provided these tutorial as offline version. In download files of same website applets are not working rather these are being blocked by Java setting. There was also message that I can change security settings from Java Control Panel. I changed settings from high to medium but applet is sill being blocked by Java.
Click on the Start button and then click on the Control Panel option.
In the Control Panel Search enter Java Control Panel.
Click on the Java icon to open the Java Control Panel.
In the Java Control Panel, under the General tab, click Settings under the Temporary Internet Files section. The Temporary Files Settings dialog box appears.
Click Delete Files on the Temporary Files Settings dialog. The Delete Files and Applications dialog box appears.
Click OK on the Delete Files and Applications dialog. This deletes all the Downloaded Applications and Applets from the cache.
Click OK on the Temporary Files Settings dialog. If you want to delete a specific application and applet from the cache, click on View Application and View Applet options respectively.
Now try to run your applet again and it should work.
In a Java application (JRE 1.7.0_21) on Windows XP, I call a native method:
public native String getImage(...);
...which is in a Visual C++ 10.0 dll. This displays a modal dialog box. Before displaying the dialog box I am properly setting the dialog box's parent handle to be java application window on top of which this dialog box will popup.
Problem is my application crashes as soon as the call to DoModal() in this function. If I leave the handle to parent window to be null then the dialog box coming fine with no crash. Only when setting handle to parent window to java application its crashing.
Please let me know if I am missing something in dll part/jni.
You normally can't use "MFC extension DLL" in a non MFC executable.
Read Extension DLLs, especially:
The client executable must be an MFC application compiled with _AFXDLL
defined.
and
Only MFC executables (either applications or regular DLLs) that are
built with the shared version of MFC can use an extension DLL.
Set up a new project, choosing "Regular DLL" for the MFC DLL type.
I am writing a web app with java. I am curious to know if there is a way that I can switch between the browser window (running the web app) and a local Java client application window (standard Java window). The Java Window is Oracle Forms.
For example, when i'm running the web app in my internet browser and I click a button. I want the button to execute process to switch from the internet browser window to the local java/forms window. Thus I would need something to execute on the OS level to switch my window.
How could I do this? I'm interested in any idea that would make that usecase work. For example, I probably need to introduce and integrate new technologies with my app? Probably a Java Applet?
Thank you,
Gavin
On Windows 7 an application can control how to group their Windows on the taskbar. Windows has some default settings related to the executable, how the shortcut was created, the name of the program, etc. to apply some default grouping. The problem with host based applications like Java, is that the same executable is used by many programs so Windows has some registry settings to set that javaw.exe is a host app. When this happens, applications must configure at runtime how to group Windows and enable pin to taskbar. I am already setting Application User Model IDs in order to group Windows as needed.
The problem that I haven't found solution is that for a multi window application: how to set a stable icon to be used on the taskbar?. The default Windows behavior for an application, say for example with two windows, where each windows has his own icon, the task bar icon shows the icon of the first opened window, if that window is closed it changes to the other one, and the process is repeated every time windows are opened and closed.
There is some API to set the icon when the user pin an application to the taskbar setting System.AppUserModel.RelaunchIconResource window property, but the documentation says that this icon is used when the app is being pinned, so according to that it only is used if the application is running from that pinned applications, leaving the problem open for applications that are not able to be pinned (or that the developer do not want to allow pinning).
There are options like generating a new executable with the icon (launching the JVM from that application), creating a shortcut with the correct AppUserModelID. Those aren't solutions for me because the application is distributed using Java WebStart/JNLP, so the application shortcut is created by Java and the launcher is a marked as a host application (as it should)
the other solution is to set the same icon to each window when running on Windows 7, that icon, with the exception of the taskbar one, is not very prominent on Windows 7 on Aero mode, but with Aero disabled it is, it is the icon used on the Alt+tab switcher without windows previews, something I want to leave looking different for each windows
Note: This is a tagged Java but really is a question for any platform that use a host executable (javaw.exe, python.exe ...)
I am using the Java Robot class to take screenshots, my problem is that in W7 when the UAC dialog is shown (I right click on any application and select run as Admin) it will not appear in the screen shot or the whole screen is just black. Running my application with admin rights or as a service does not solve the problem.
Does any one know what to do so that I will be able to capture the screen even when the UAC is showing?
For security, normal programs cannot interact with the UAC dialog.
You can manually disable that security feature named "Secure Desktop" and instead have the dialog displayed on the normal desktop (so other programs can see it), but this is not recommended. The following explanation is for Vista, but Win7 should work similar: http://www.vistax64.com/tutorials/117448-user-account-control-uac-blacking-out-screen.html