Error compiling Flash in IntelliJ IDEA 13.x - linux

I just added the newest SDK of Apache Flex (4.12.1), as3corelib, OSMF and playerglobal14_0 to my library and and setup a simple Flash "Hello World"-project (default). The code inspection shows no errors whatsoever.
I am working with IntelliJ IDEA 13.1.3 on Ubuntu 14.04 LTS
However, compiling with the built-in shell fails with
Error:[TestFlex]: java.net.SocketTimeoutException: Accept timed out
Error:[TestFlex]: Exception in thread "main"
Error:[TestFlex]: java.lang.NoClassDefFoundError: flex2/tools/VersionInfo
at com.intellij.flex.compiler.FlexCompiler.<clinit>(FlexCompiler.java:19)
Caused by: java.lang.ClassNotFoundException: flex2.tools.VersionInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 1 more
Compiling with Mxml/compc fails with
Error:[TestFlex]: Could not find or load main class flex2.tools.Mxmlc
Any ideas?

I can give you some information about where to start looking for the problem, which is possibly an incomplete installation of the SDK on your system.
Both of the missing classes you mention are in mxmlc.jar, and IntelliJ IDEA expects to find mxmlc.jar in the sdk/lib folder. If mxmlc.jar is missing, you would see this error:
java.lang.NoClassDefFoundError: flex2/tools/VersionInfo
Using the Apache Flex SDK Installer, you can be assured of a complete copy of the SDK:
http://flex.apache.org/installer.html
IntelliJ IDEA looks in the Flex/AIR SDK home path you have specified under Platform Settings-->SDKs in your Project Structure. The Project Structure UI is under the File menu in IntelliJ IDEA.
IntelliJ documentation site regarding project SDKs:
https://www.jetbrains.com/idea/help/configuring-global-project-and-module-sdks.html

I just encountered the same error, when trying to compile with
AIR 16 Beta in this configuration:
IDEA 14 64 Bit
apache Flex 4.13
AIR 16 Beta.
Windows 7, 64 Bit
AIR 15
I had different problems with AIR15; most probably a heap size issue that I could not fix yet.
The error is:
Failed to package AIR application xxxxx.ipa:
Undefined symbols for architecture armv7
AIR 14
No problems with AIR 14 (same Flex and IDEA version)
Any idea??

Related

Epson JavaPOS ADK for linux gives error while using with eclipse and java code

I have an Epson TM-T88V printer and want to print a receipt with my own java code using eclipse. Have done the installation of javapos adk for Linux, set the /opt/EpsonJavaPos/bin to /root/.bash_profile, and of course java. Installed the tmt-cups driver as well and set up the printer using the PPD file. But after all these setups, I am getting the below error every time while trying to run my java code using eclipse. All the required javapos jars are present in jre/lib/ext folder and even set the native JNI library from /opt/EpsonJavaPos/bin to my java code using eclipse. Used SetupPOS to get the jpos.xml and dumped into the eclipse as well. Used check health test and getting the same below error as from eclipse while running my code-:
jpos.JposException: Failed to load the JNI.
at jp.co.epson.upos.T88V.pntr.T88VService.initializeUsingCommand(Unknown Source)
at jp.co.epson.upos.core.v1_13_0001.pntr.CommonPrinterService.open(Unknown Source)
at jpos.BaseJposControl.open(Unknown Source)
at Step1Frame.processWindowEvent(Step1Frame.java:81)
at java.awt.Window.processEvent(Window.java:2009)
at java.awt.Component.dispatchEventImpl(Component.java:4872)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:720)
at java.awt.EventQueue$4.run(EventQueue.java:718)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
I am stuck here for a long time and have no clue. Any help will be very appreciated.
Finally error gone after adding the following lines to ~/.profile and ~/.bashrc.
LD_LIBRARY_PATH=/opt/EpsonJavaPOS/bin:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

Issue when launching DevCenter on Windows 8.1.

I cannot launch DevCenter as I am getting the following error message when I try to launch DevCenter.exe on my laptop running Windows 8.1 .
!ENTRY org.eclipse.osgi 4 0 2015-10-22 19:45:14.680
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "com.datastax.devcenter.rcp.application" could not be found in the registry. The applications available are: org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.emf.codegen.ecore.Generator, org.eclipse.emf.mwe.core.WorkflowRunner, org.eclipse.equinox.app.error, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
When I launched it from a desktop computer (Windows 7), it worked fine. But, I'm trying to make it work on my laptop, but couldn't manage to do it so far. Any ideas on how to solve this ?
One thing to check is if your Windows 32-bit or 64-bit and that your Java version is the same 32/64-bit version? Looking at the error message it looks like a 64-bit version of DevCenter. Please verify that both Windows and Java are also 64bit.
Was this a new install or an upgrade? Be careful not to extract archive files into any existing DevCenter folder as this will result in a mix of old and new files. Download and extract a fresh copy to be certain.
I've also read about pre-release versions of Windows causing similar looking errors because they did not properly identify their os version and the eclipse osgi layer (equinox) is unable to resolve dependencies.

Android Studio crashes on startup

First time to Android Studio. I installed JDK and set up the environment variables. When running studio.exe or studio64.exe on the first time, the first screen flashes for a second and then I get the following error:
/*
Internal error. Please report to http://code.google.com/p/android/issues
com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.reflect.InvocationTargetException
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:93)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:90)
... 1 more
Caused by: java.lang.ExceptionInInitializerError
at com.intellij.openapi.application.impl.ApplicationInfoImpl.getBuild(ApplicationInfoImpl.java:189)
at com.intellij.idea.StartupUtil.startLogging(StartupUtil.java:300)
at com.intellij.idea.StartupUtil.prepareAndStart(StartupUtil.java:106)
at com.intellij.idea.MainImpl.start(MainImpl.java:33)
... 6 more
Caused by: java.lang.RuntimeException: Invalid version number: PK
*/
As per the comment here by Studio's team member, It happens because of corrupted Installation
https://code.google.com/p/android/issues/detail?id=60178
Comment by Android Studio's Team Member
I think it's coincidence that it started working again -- nothing
you're doing in your code should cause this sort of crash in Studio.
It still feels like a corrupted install or something strange going on
in your environment. That magic number exception means a jar that's
part of Android Studio is getting scrambled.
I suggest you to try fresh Installation or, As it happens because of some internal Intellij's libraries problem.

Android Studio won't start on Linux - complaining about libcups

My system is Gentoo Linux 64bit, and I have get the latest Android Studio for Linux. When I try to start it, I got this error message. Looking through the message, it looks like the reason is that I do not have the libcups.so library.
Caused by: java.lang.UnsatisfiedLinkError: /opt/icedtea-bin-7.2.4.3/jre/lib/amd64/headless/libmawt.so: libcups.so.2: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
Indeed, I do not have cups installed. But I don't understand why the Studio needs this library. Is there any way I can avoid installing this library and still get the Studio work?
Haven't used Android Studio, but I guess Android Studio uses CUPS for printing. Making it not need CUPS would require the removal of the printing code.

How to make jar file from javaFX project

I have javaFX project, with which i'm working on Eclipse IDE. This is Maven project with using of Spring.
My goal is to make runable jar file (dekstop application) from this project.
If i export my application to jar file like any other java project, then i recieve this on error:
C:\eclipse\projjars>java -jar EqMan.jar
Exception in thread "main" java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: Can't load library: C:\eclipse\bin\glass.dll
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:276)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:122)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:163)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:47)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: C:\eclipse\bin\glass.dll
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.sun.glass.utils.NativeLibLoader.loadLibraryFullPath(NativeLibLoader.java:143)
at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:56)
at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:31)
at com.sun.glass.ui.Application$1.run(Application.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.glass.ui.Application.loadNativeLibrary(Application.java:73)
at com.sun.glass.ui.Application.loadNativeLibrary(Application.java:85)
at com.sun.glass.ui.win.WinApplication.<clinit>(WinApplication.java:33)
at com.sun.glass.ui.win.WinPlatformFactory.createApplication(WinPlatformFactory.java:20)
at com.sun.glass.ui.win.WinPlatformFactory.createApplication(WinPlatformFactory.java:17)
at com.sun.glass.ui.Application.Run(Application.java:108)
at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:266)
... 5 more
If i'm trying to make jar file with javafxpackager, i recieve this one error:
C:\eclipse\workspace\equification>javafxpackager -makeall -appclass ru.igs.ava.equification.EquificationFX -name "Equification" -width 800 -height 600
warning: [options] bootstrap class path not set in conjunction with -source 1.5
C:\eclipse\workspace\equification\src\main\java\ru\igs\ava\equification\EqConfigureRole.java:5: error: package org.springframework.context does not exist
import org.springframework.context.ApplicationContext;
C:\eclipse\workspace\equification\src\test\java\ru\igs\ava\equification\AppTest.java:11: error: cannot find symbol
extends TestCase
^
//and the same error for every class, which is added to my project as maven dependency.
So, how can i make runable jar file without converting my project to NetBeans project?
Seeing as you are using Maven for your builds, you can also use Maven to initiate the JavaFX packaging. To do this use the Maven antrun plugin to invoke the JavaFX ant tasks to generate a jar for your application with an embedded JavaFX launcher. Here is a sample maven pom to do this.
Your errors in running the javafx packager are due to not appropriately setting the classpath for the packager. An example of how to set the classpath for the javafx packager to package an application which relies on dependent lib jars is in this build script.
The unsatisfied link errors are because you are not including the required lib dll's in a ../bin directory relative to the runtime location of jfxrt.jar when you run your app. You also might not be correctly packaging your application with a JavaFX launcher (via executing the recommended javafx ant tasks or javafxpackager commands to generate your JavaFX application jar).
Update
For Maven based builds of JavaFX applications, you can now use a Maven JavaFX plugin.
Going from the suspicion that the underlying problem is due to an incompatibility between jfxrt.jar and the version of Java installed worked for me. The jfxrt.jar the application was using was compatible with jdk-7u71, yet the application was on a machine where JAVA_HOME was set to 7.0.05. So I installed jdk-7u71 on the problem machine and updated JAVA_HOME.

Resources