I am developing a java server in eclipse which don't have any visible output.
I hit ctrl+F11 to start my java server software, and then it starts fine, but if I then edit the source code and start it again eclipse starts a second copy, and I don't want there to be 2 versions of my server running at the same time while I am doing development.
Is there a way to get eclipse to kill the old version, so there always only is one version of my server running.
Related
I have a javafx application which i launch with the help of a .app bundle (created with install4j). The .jar launch perfectly in command line or in eclipse but when i use the .app, it hangs for at least 1 minute (the computer freeze) and finaly finish booting after many other hangs. My app require to be added in Security->Accessibility (assistive device). If the app is not added, it will boot perfectly until it ask for the security clearance. Once i add it, it hangs at the very start even before the splashscreen. Any ideas?
Edit : It works when i launch the javaApplicationStub directly.
If you haven't already resolved this, this will probably have happened due to Java (FX) bugs with Mac OS 10.14 Mojave: https://bugs.openjdk.java.net/browse/JDK-8213793
There were 2 or 3 related bugs and they affected all Java versions up to 11.0.2, which was finally released in February 2019.
Upgrading to 11.0.2 or higher or downgrading to Mac OS 10.13 would probably solve this issue. It is not an install4j issue or related to anything other than the use of Java FX on Mojave.
I am new to Intellij ide and i'm having issues running Glassfish 5 or any previous version on Intellij 2017 2.4.
After selecting New Project > Java Enterprise > Web Application i had to specify the application server, to which i selected the folder of glassfish 5, jdk is set to 1.8 and java ee to 7. So far so good, no errors and the project gets created. Then i have a greyed "play" icon next to GlassFish 5.0.0 in the upper right of the corner that says that i have to configure it, i click Edit Configurations and the Run/Debug Configurations opens up
Everything seems fine and when i click the "play" green button to start the server and run the project i have projectName:war exploded under Deployment and
[2017-09-26 08:47:57,836] Artifact testfornew:war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
Exception in thread "main" java.lang.NullPointerException
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.initializeServiceLocator(AbstractModulesRegistryImpl.java:152)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.newServiceLocator(AbstractModulesRegistryImpl.java:144)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:218)
at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.createServiceLocator(AbstractModulesRegistryImpl.java:224)
at com.sun.enterprise.module.single.StaticModulesRegistry.createServiceLocator(StaticModulesRegistry.java:88)
at com.sun.enterprise.admin.cli.CLIContainer.getServiceLocator(CLIContainer.java:217)
at com.sun.enterprise.admin.cli.CLIContainer.getLocalCommand(CLIContainer.java:255)
at com.sun.enterprise.admin.cli.CLICommand.getCommand(CLICommand.java:231)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:371)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)
Under output. Coming from Netbeans setting glassfish up was pretty straightforward, i've checked a couple of solutions online including this but they don't seem to work for me.
I was having the same problem and I found that it is caused by an issue with the JDK software. So the NullPointerException thrown at AsadminMain.java:57 can be solved by checking your system variables (PATH, JAVA_HOME). Be sure that they reference to an acceptable JDK supported by your GlassFish version. GlassFish 5.0 is certified to work with java sdk 8u144 as mentioned HERE: https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf.
Be aware, the path may also contain a reference to an old SDK directory.
If you need more help, please post the results of calling echo %PATH% on your cmd.
In my case JDK 1.8.0_152 must be installed, path and java_home variables have to be configured AND JDK 9.X must be uninstalled. Without uninstall, the error persist.
Uninstall Java 9, stay with the version 8 update 162 and the jdk8. When you unistall the Java 9 your system variables (PATH, JAVA_HOME=C:\ProgramData\Oracle\Java\javapath) will update the 3 jar (java, javaw, javaws) in this path to Java version 8.
war exploded: Waiting for server connection to start artifact deployment...
Detected server admin port: 4848
Detected server http port: 8080
....
Assuming that you are certain that JDK has set well in your environment variables and you are using jdk 8 or lower-Well I read somewhere that java9 has issues with such configurations, maybe the issue has been solve but for my case I chose to avoid for now.
Download and extract GlassFish of your version. For my case I'm
using GlassFish 5.181.O on Intellij 2018.1 ultimate version
Start Intellij, and before opening any project, or rather close all projects that are open.
Click on configure, then settings. A new window will appear as shown below. I have marked the steps you need to follow in the image. I will also add some explanation here.
Under Application Servers, click on the + shown as step 2 on the image, here you need to specify you glassfish server, the folder where you extracted to.
Next, click on + shown in step 3 on the image to add the server modules.
Assuming all is a success upto this point, select all choices of as shown in step 4 on the image, apply changes and Ok.
I will explain about creating a new project because I'm not sure how you would handle an existing project but I guess you can use concepts here to figure out what you need to tweak.Create your new java ee or whatever application you are working on,
As shown on figure 2, assuming you are creating a Java EE app, Click on Java Enterprise, then check/tick Web Application and JSF
Under libraries, use library from Glassfish ... Installation didn't help much because I got null pointer exceptions., so I used Download as shown in figure 2. Click next and finish.
Automatically you will see GlassFish added to the project, run it from the IDE.
Edit
If you had done all of the above and still get some error like Null Pointer Exceptions. Do what #Jailson Evora says: Clear your systems from java 9 and install java 8 and make sure when you issue java -version on command line, the output is java 8
I had to uninstall both jdk9 and jdk10 and set my java_home back to jdk8_181
I'm used to run (for testing purposed) java applications from IDE. Start, verify, stop execution in output window in Netbeans. This works flawlessly under linux and windows but under mac osx for reasons beyond me the despite execution being stopped (red stop button greyed out, etc.) the java process persists in the background.
It this some inherent property of mac osx? (most of the applications stay running but I would assume that when I stop java from IDE it should basically kill it)
It is a bug in NetBeans way of launching apps - https://netbeans.org/bugzilla/show_bug.cgi?id=232322
When I run my java web application from eclipse using tomcat server, system gets restart. Its not even showing any exception or errors.
My system Configuration is,
window xp sp3 32-bit
JDK1.5.0
eclipse helios
tomcat server 6.0
Please help me to solve this problem.
The problem may be either with your eclipse version or with the server or any code fragment which you are using. Try with fresh version of eclipse and server, if the problem still exists, check the system for any virus. If that also give negative check recently added code fragments..
On my Windows 7 x64 machine, I'm having problems launching my remotely deployed Web Start app (the Web Start app launches correctly on another PC as expected). In IE or FF, I click on the web start launch link, the JNLP is downloaded, it seems to get executed and nothing happens. I see javaws.exe processes running. I don't see a java.exe running.
I don't know if it's related but I also can't get the java console to run. In the Control Panel Java applet settings, I have have enabled "Show console" and "place Java icon in the system tray". I don't see the Java icon in the system tray either.
I'm running Java 1.6.0_21 (32 bit). I'm able to run Netbeans so the it appears as if Java is installed correctly on my machine. Why isn't web start working?
A firewall on my corporate joined domain was the problem. It was preventing web start as well as other types of apps from working correctly or even launching. Opening ports resolved it.
Are you absolutely certain that your Windows browser is binding the JNLP suffix to the javaws executable?
If you download the file, and double click, does it open correctly? If not, then right click, and investigate what is presented under Open With...
I had the same symptoms when I switched JNLP specifiction to 6.0. So I simply solved it by going back to 1.5, which I think is default in NetBeans, at least up til 6.7.
<jnlp spec="6.0+"...