I'm trying to bundle a JavaFX application adding a JVMOption to able virtual keyboard in my software, adding the "VM options" in the "Run/Debug Configurations" form works perfect in a test context, but when I build a DMG bundle and then run the app the keyboard is not shown. When I inspect the package content directly from the Application folder I found that the file "Content/Java/project.cfg" doesn't have JVM options
[Application]
app.name=Project
app.mainjar=Project.jar
app.version=0.6.1
app.preferences.id=Project_id
app.mainclass=co/Main
app.classpath=
app.runtime=$APPDIR/PlugIns/Java.runtime
app.identifier=Project_id
[JVMOptions]
[JVMUserOptions]
[ArgOptions]
If I add the option manually and save the file, the application works well showing the virtual keyboard.
[Application]
app.name=Project
app.mainjar=Project.jar
app.version=0.6.1
app.preferences.id=Project_id
app.mainclass=co/Main
app.classpath=
app.runtime=$APPDIR/PlugIns/Java.runtime
app.identifier=Project_id
[JVMOptions]
-Dcom.sun.javafx.isEmbedded=true
-Dcom.sun.javafx.touch=true
-Dcom.sun.javafx.virtualKeyboard=javafx
[JVMUserOptions]
[ArgOptions]
Does somebody know how to add these options without hacking any file? just adding it to a configuration file inside the project.
My project was created using Java 8, JavaFX, IntelliJ Idea CE (2019), Gradle 4.8
Add the following to your build.xml file:
<fx:platform basedir="${JAVA_HOME}">
<fx:property name="com.sun.javafx.isEmbedded" value="true"/>
<fx:property name="com.sun.javafx.touch" value="true"/>
<fx:property name="com.sun.javafx.virtualKeyboard" value="javafx"/>
</fx:platform>
Related
I am using IDEA for my Playframework development. However, I don't seem to be able to run/debug my application anymore I was able to do two months ago. I haven't done any active development on this project, and there have been updates to IDEA.
When I now debug my application it doesn't not load the 'dev' configuration file.
This is specified as -Dconfig.resource=application.dev.conf under JVM options on the Run/Debug configurations.
This used to work fine, but it now loads the application.conf which contains the default db parameters to connect to a MySQL server and not the mem server. I don't think I have changed anything. A ny pointers what can be wrong?
I am still on sbt-plugin 2.5.16.
[Edit]
Loading config from properties {jline.esc.timeout=0, config.resource=application.dev.conf, java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib, java.vm.version=25.25-b02, user.country.format=IE, gopherProxySet=false, java.vm.vendor=Oracle Corporation, java.vendor.url=http://java.oracle.com/, path.separator=:, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=GB, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=unknown, java.vm.specification.name=Java Virtual Machine Specification, user.dir=/Users/xxx/Documents/Java/Y2kBooking, java.runtime.version=1.8.0_25-b17, java.awt.graphicsenv=sun.awt.CGraphicsEnvironment, java.endorsed.dirs=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/endorsed, os.arch=x86_64, java.io.tmpdir=/var/folders/6g/mllv8zcn73v3p9mgt8f78jd80000gn/T/, line.separator=
, java.vm.specification.vendor=Oracle Corporation, os.name=Mac OS X, sun.jnu.encoding=UTF-8, java.library.path=/Users/xxx/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:., jboss.modules.system.pkgs=com.intellij.rt, java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=10.13.2, http.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, user.home=/Users/xxx, user.timezone=Europe/Dublin, java.awt.printerjob=sun.lwawt.macosx.CPrinterJob, java.specification.version=1.8, file.encoding=UTF-8, user.name=xxx, java.class.path=/Users/xxx/Library/Application Support/IntelliJIdea2017.3/Scala/launcher/sbt-launch.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Users/xxx/Library/Caches/IntelliJIdea2017.3/captureAgent/debugger-agent.jar, jline.shutdownhook=false, java.vm.specification.version=1.8, sun.arch.data.model=64, java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre, sun.java.command=xsbt.boot.Boot run, java.specification.vendor=Oracle Corporation, user.language=en, awt.toolkit=sun.lwawt.macosx.LWCToolkit, config.trace=loads, java.vm.info=mixed mode, java.version=1.8.0_25, java.ext.dirs=/Users/xxx/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java, sun.boot.class.path=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/classes:/Users/xxx/Library/Caches/IntelliJIdea2017.3/captureAgent/debugger-agent-storage.jar, java.vendor=Oracle Corporation, file.separator=/, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeBig, socksNonProxyHosts=local|*.local|169.254/16|*.169.254/16, ftp.nonProxyHosts=local|*.local|169.254/16|*.169.254/16, sun.cpu.isalist=}
Loading config from class loader sbt.PluginManagement$PluginClassLoader#4cc89246 but there were no resources called application.dev.conf
exception loading application.dev.conf: java.io.IOException: resource not found on classpath: application.dev.conf
Loading config from a String akka {
log-dead-letters = 0
log-dead-letters-during-shutdown = off
}
Loading config from resource 'reference.conf' URL jar:file:/Users/xxx/.ivy2/cache/scala_2.10/sbt_0.13/com.typesafe.sbt/sbt-js-engine/jars/sbt-js-engine-1.1.3.jar!/reference.conf from class loader sbt.PluginManagement$PluginClassLoader#4cc89246
Loading config from a URL: jar:file:/Users/xxx/.ivy2/cache/scala_2.10/sbt_0.13/com.typesafe.sbt/sbt-js-engine/jars/sbt-js-engine-1.1.3.jar!/reference.conf
Try debugging the configuration loading with -Dconfig.trace=loads as described here.
The -Dconfig.resource option loads a file from the classpath so make sure that file is in your IntelliJ classpath. I assume you put the file in the usual conf directory? You may need to check the IntelliJ Project Structure settings to make sure it includes that directory as a Resource Folder.
Finally, you may wish to check that the application works correctly when run using sbt run or sbt start.
In my Event Log in Intellij IDEA 2016, I used to see this message:
Unlinked Gradle project?
Import Gradle project, this will also enable Gradle Tool Window.
Don't want to see the message for the project again: press here.
At some point, I clicked on the "press here" link indicating that I don't want to see the message again. Since then, I have decided that I'd like to see it again.
How do I start seeing this Event Log message that I chose to not see again?
You can re-enable notifications balloon popups and logs from the (obviously) Notifications settings window, which you can open in (at least) 2 ways:
1) From the Event log window click on the settings button
2) File -> Settings -> Appearance & behaviour -> Notifications
I just tried the specific notification that has been asked about (Unlinked Gradle Project?). The only way that I found to re-enable the notification was to delete the .idea folder inside the project and re-open the project in Intellij.
Other notifications, such as Maven: non-managed pom.xml work as expected so this bug is specific to the Unlinked Gradle Project? notification.
This appears to be a bug in Intellij Idea as of this build:
IntelliJ IDEA 2016.2.5
Build #IU-162.2228.15, built on October 14, 2016
JRE: 1.8.0_112-release-287-b2 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
I have raised an issue for this : https://youtrack.jetbrains.com/issue/IDEA-162936
Also, I found that these notification settings are not stored in a project specific file. This file, on OSX, is ~/Library/Preferences/IntelliJIdea2016.2/options/notifications.xml, on Windows it would reside in a folder according to this.
These were the contents of the file for me, when I was testing this notification:
<application>
<component name="NotificationConfiguration">
<notification groupId="Gradle Notification Group" shouldReadAloud="true" />
<notification groupId="Maven: non-managed pom.xml" displayType="STICKY_BALLOON" shouldLog="false" />
<notification groupId="Project Startup Tasks Messages" displayType="STICKY_BALLOON" />
</component>
</application>
I noticed that changing the Popup Type for 'Gradle Notification Group' correctly updates ~/Library/Preferences/IntelliJIdea2016.2/options/notifications.xml, however even when the Popup type is 'BALLOON' or 'STICKY_BALLOON', it does not result in Intellij re-notifying the user about the Unlinked gradle project.
I'm using specflow v1.9.0 Baseclass.Contrib.SpecFlow.Selenium.NUnit v1.3.1 and when I try to build the project, I'm seeing the below error
`#error Generation error: Unable to find plugin in the plugin search path: Baseclass.Contrib.SpecFlow.Selenium.NUnit. Please check http://go.specflow.org/doc-plugins for details.`
And in the App.config I got the below code
<specFlow>
<unitTestProvider name="SeleniumNUnit" />
<plugins>
<add name="Baseclass.Contrib.SpecFlow.Selenium.NUnit" path="..\packages\Baseclass.Contrib.SpecFlow.Selenium.NUnit.1.3.1\tools" />
</plugins>
<stepAssemblies>
<stepAssembly assembly="Baseclass.Contrib.SpecFlow.Selenium.NUnit.Bindings" />
</stepAssemblies>
</specFlow>
I encountered a similar error but with a different plugin and the steps outlined in Unable to find plugin in the plugin search path: SpecRun when saving / generating feature files resolved it for me:
1. Make sure the NuGet folders are properly restored.
2. Close Visual Studio.
3. Delete the bin\Debug folder from your project(s).
4. Reopen your solution in Visual Studio.
Make sure that in the given path the file "Baseclass.Contrib.SpecFlow.Selenium.NUnit.SpecFlowPlugin.dll" exists.
When are your *.feature.cs files generated? When you save the file or at build?
If it is at saving, regenerate the code behind file.
The solution above didnt work for me. The issue was only resolved when I've tried the following:
Go to VS->Tools->Options
Go to SpecFlow
Go to Test Execution
Change Test Runner Tool to something else than SpecRun and Auto (NUnit, MS...)
Build the project. This time it should work.
Change the Test Runner Tool back to SpecRun
Enjoy :)
Test Runner Tool option in Tools->Options
Still if you are facing same issue uninstall the plugin Baseclass.Contrib.SpecFlow.Selenium.NUnit and install it again
I am using IntelliJ IDEA 13.1.4 and also tried the latest release 14.
Running SBT I get the following error:
Error:Cannot determine Java VM executable in selected JDK
I have JDK 1.7 installed on my machine and on PATH.
In the logs (~/Library/Logs/IntelliJIdea14/idea.log on MacOS) there's the following stack trace:
2014-11-03 11:22:05,054 [4896641] WARN - nal.AbstractExternalSystemTask - Cannot determine Java VM executable in selected JDK
com.intellij.openapi.externalSystem.model.ExternalSystemException: Cannot determine Java VM executable in selected JDK
at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$10.apply(SbtExternalSystemManager.scala:97)
at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$10.apply(SbtExternalSystemManager.scala:97)
at scala.Option.getOrElse(Option.scala:120)
at org.jetbrains.sbt.project.SbtExternalSystemManager$.executionSettingsFor(SbtExternalSystemManager.scala:96)
at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$getExecutionSettingsProvider$1.apply(SbtExternalSystemManager.scala:54)
at org.jetbrains.sbt.project.SbtExternalSystemManager$$anonfun$getExecutionSettingsProvider$1.apply(SbtExternalSystemManager.scala:54)
at org.jetbrains.sbt.package$$anon$3.fun(package.scala:29)
at org.jetbrains.sbt.package$$anon$3.fun(package.scala:28)
at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:590)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.a(ExternalSystemFacadeManager.java:201)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.a(ExternalSystemFacadeManager.java:178)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:133)
at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:270)
at com.sun.proxy.$Proxy57.getResolver(Unknown Source)
at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:137)
at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:475)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3$1.run(ExternalSystemUtil.java:543)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:609)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$7.run(ProgressManagerImpl.java:410)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:194)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.a(ProgressManagerImpl.java:281)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:181)
at com.intellij.openapi.application.impl.ApplicationImpl$10$1.run(ApplicationImpl.java:640)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
What can be the reason for this?
You should be able to work it around by setting the jdk from the settings not from the open/import project dialog.
From the welcome screen, go to Configure -> Project defaults -> Project structure and add the jdk.
Opening the sbt project should work well then.
Found solution from here
Another way to set JDK is from your current module/project settings (for your current project)
PickOpen Module Settings from project context menu (or default hit F4), then from left tab select Project and point correct Project SDK on dropdown.
The issue is usually caused by a wrong JDK version in ".idea/sbt.xml", e.g.:
<option name="jdk" value="1.7" />
This option is not updated accordingly when the Project SDK is changed, see SCL-10085. If you have the other JDK (1.7 in my example) generally configured, no error will occur, but the Project SDK will silently be changed back. Otherwise, this error occurs.
The problem can easily be resolved by manually editing the value in ".idea/sbt.xml" to the right JDK version.
Same error also occurs when you try to do a refresh in "SBT tasks".
Open
Preferences -> Language & Frameworks -> Scala Compiler Server
Turn on
Run compile server (in external build mode)
Once you done with refreshing the project, turn it off again to enable hotswapping back when you change your code in the editor.
I had to open Settings -> Language & Frameworks -> Scala Compiler Server
Then set the JVM SDK there, which was <No SDK>.
This was in addition to setting the Project SDK in Project Structure -> Project.
See the screenshot here.
IntelliJ 13.1.6 > File > Project Structure > set Project SDK
I got the same problem after I delete Java1.6 and Java1.7 from Project Settings(with Java8 as default).
Finally I solve the problem by change SBT JVM config to Custom Java(Settings -> Build, Execution, Deployment -> Build Tools -> SBT).
For me the above suggestions did not help for some reason. However, I did figure out that under Project Defaults > Project Structure (Welcome screen) my default Project SDK was set to the Go SDK.
What worked for me was setting this default SDK to the Java JDK.
For me, I had selected the JDK in "Open Module Settings" > Module > Dependencies > Module SDK.
However, SBT was looking for JDK at project level which is set in "Open Module Settings" > Project > Project SDK as #michasm has pointed out above
The latest Nightlies of the Scala plugin change how the project JDK is set, which should solve this in most cases. Let me know if it still breaks on some cases.
This happened to me in a multi-language project when my primary module's Project SDK was Python and I was trying to add a secondary module that was JDK (importing an sbt project).
I had to temporarily switch the primary module's Project SDK to JDK in order to add the sbt module. I then had the ability to go back and change each module to the correct SDK.
I am new to Sencha Touch and working on Ubuntu. Till now i followed the instructions from the Sencha Doc and successfully installed Touch 2.2.1 and SenchaCmd. I have created a sample project "MyApp" and its in the directory "/var/www/MyApp".The sdk "touch 2.2.1" is in the same directory "/var/www/touch 2.2.1" I am having problem running the code from Webstorm directly in the browser. Can anyone tell the configuration i need to make.
Open your MyApp folder in Webstorm
create a new JavaScript Debug run configuration like the following:
set URL to 'http://localhost/MyApp/index.html'
in the 'Remote URLs of local files' field, click twice on 'Remote URL' filed of the topmost tree node (your project root), enter the following URL: 'http://localhost/MyApp'
that's all... Now on pressing Debug the start page of your application will be loaded into Chrome