So I have created an application using javaFX in Eclipse. I packaged an executable jar using Maven, with the zenjava javafx-maven-plugin version 2.0. I package in the command line using mvn clean jfx:jar. This creates a javafx/app subfolder in my target, which includes a lib folder and the executable jar.
When I run this executable jar on my Ubuntu or Windows machine, everything seems to work fine. On Mac however, I am having trouble. I have a welcome page that shows up first. It has a small description of the application and a button for users to push to continue on to the application. For some reason the button doesnt do anything on Mac. It works fine on Windows and Ubuntu. Any ideas why this is happening? Do I have to include anything extra for Mac?
There was an issue on Jira (JavaFX Bugtracker) concerning Mouse events on buttons disapearing. It was not exactly your MAC version (in the issue they named 10.8.2) but the issue has been fixed for the JavaFX 8 release (codename lombard). You might want to try the JavaFX 8 beta and see whether your bug has been fixed.
In case you'd like to see the issue: https://javafx-jira.kenai.com/browse/RT-26395
Related
Having trouble getting a android compile of a libgdx project to see classes in a .jar file of mine.
From reading around it seems(?) all I should have to do is put them in the /libs directory and ensure the gradle build file has been set to pick them up.
This doesn't seem to be working for me.
See screenshot of mysetup:
Notes;
SSS.jar is file containing my classes
I have configured everything to use Java 1.7 (this needs to be done each gradle refresh, as gradle insists on setting it to 1.8 for some reason)
Android 4.4 for export, the device testing uses 6.0
I have refreshed/cleaned/built more times then I can count ;)
Desktop compile of the project works fine
The error I get when running as android application is as follows;
04-29 19:58:10.462: E/AndroidRuntime(9306): java.lang.NoClassDefFoundError: com.darkflame.client.semantic.SSSIndex$1
04-29 19:58:10.462: E/AndroidRuntime(9306): at com.darkflame.client.semantic.SSSIndex.<clinit>(SSSIndex.java:504)
....(can post more if needed, but I think thats the relevant bit)
(I also tried exporting a .apk and looking inside with 7zip to try to see if the SSS.jar was exported, but to be honest I don't know what I am looking at. How would I tell ?)
Any pointers on how this setup should work would be appreciated.
I have a brand new installation of Eclipse with BlackBerry Plugin for mac.
The Java SDK 6.0.0 is already installed, the only thing now is that I want to compile for minor version, like 4.5.0
I have tried :
Help -> Install New Sotftware... -> http://www.blackberry.com/go/eclipseUpdate/3.5/java
But it gives me an error.
"No repository found at http://www.blackberry.com/go/eclipseUpdate/3.5/java"
anyone had the same issue ?
It seems that it worked for some people.
I don't know if what you're trying is possible, I also couldn't get it to work. According to the RIM site, they don't support building apps on OS X for non-6.0 right now, and based on the workaround below, I think it might not be as simple as installing the packages from the Eclipse installer.
However, I found a great post on building BlackBerry apps on OS X, and since then I've been working on my MBP, and can't say I would turn back. Here's a summary of how I got it set up:
Install Eclipse (I am using 3.5, but it may not matter) and VirtualBox.
Create a new VM and install Windows (tested with XP SP3). This
would probably work using VMWare Fusion or Parallels too.
On the VM, install Java 6 and the version of the BlackBerry JDE
that matches your target OS.
In OS X, download
bb-ant-tools.jar and move it
to ~/.ant/lib.
Get an OS X version of preverify, which is included in the Sun
J2ME SDK 3.0 for OS
X.
Install it and either copy
/Applications/Java_ME_SDK_3.0.app/Contents/Resources/bin/preverify to
somewhere in your PATH or just add that directory to your PATH.
If you don't have one already, create the file ~/.MacOSX/environment.plist.
Edit this file with /Developer/Applications/Utilities/Property\
List\ Editor.app/.
Create a new variable called PATH and set it to the value of your
shell PATH, making sure that the directory containing preverify is
included. This allows Ant, via Eclipse, to see the preverify command
when Eclipse is launched from Eclipse.app and not from the command
line. See this
for more details.
In OS X, create a directory for the BlackBerry components
(something like "bb-components").
From the BlackBerry JDE installation in the VM, copy both "lib" and
"bin" directories to this directory.
In Eclipse, create a new Java project.
Choose "Use an execution environment JRE:" and select Java 1.3.
Right click the project in the "Package Explorer" and select "Build
Path" and then "Configure Build Path."
Add bb-components/lib/net_rim_api.jar as an "External JAR."
Remove the "JRE System Library." This is so that only BlackBerry
supported classes will be offered via autocompletion etc.
Copy the attached minimal
build.xml into the project.
Edit the build.xml to suit your environment (specifically the
jde.home property) and anything else you want to customise.
Right click and select "Run as" and then "Ant Build" (the first
one). You can also build using Ant on the command line, of course.
These were adapted from https://spin.atomicobject.com/2010/11/04/our-blackberry-development-environment
Good luck!
I develop all of my BB apps on Mac hardware but I'm running Windows through Parallels. Not better than having native Mac tools, but it works!
Has anyone successfully installed and run the Blackberry Eclipse plugin for MacOS?
Apparently, BB has not improved their Mac support much in the last year, since there was a question here about it last year.
I've followed their instructions to the letter, but they seem to assume that all you'll ever do in Eclipse is use their plugin. I want to move their plugin into an existing Eclipse installation.
I've copied the net.rim.* files from their Eclipse installation in to my /plugins folder, restarted, they show up in the list of installed plugins, but building an app always yields this error:
"Failed importing native project for BlackBerry. Missing Blackberry plugin. For more details see http://na.blackberry.com/eng/developers/javaappdev/javaupdate.jsp"
Thanks.
Mike
Here's the secret:
point Eclipse 3.6 Hellios to the following plug-in URL: http://www.blackberry.com/go/eclipseUpdate/3.6/web
Eclipse/Help/Install New Software... Add, enter some name and the URL above, and it works.
I have recently moved to a MacBook Pro, which has meant leaving my beloved JBuilder 2005 behind. Since there is no such thing any more (AFAIK) as a free JBuilder, I'm having to choose a new IDE.
I can't live with the code-formatting of Eclipse (yes, I know, it can be customised up the wazoo, but the fact that it will NOT respect my inserted returns means I can't live with it) so I'm seriously considering NetBeans.
However, I can't find any way of getting it to build a double-clickable Mac application! (I used to use XCode for this step, but it seems that XCode no longer wants to know about Java...) I cannot be the first person who's wanted to do this...can anyone help me with advice as to how to go about it?
Grateful thanks in advance
I had a similar issue and have moved to using Netbeans with the AppBuilder tool. Of course you need to make sure you install the latest version of the Java SDK.
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html
I also did some tweaking to the Ant build.xml file so I never have to modify it and can just copy it between projects. A nice modification I added also auto builds the .app file from within the IDE during a clean compile.
<target depends="wine-version" name="-post-jar" description="Run OSX AppBundler.">
<bundleapp
name="${application.title}"
displayname="${application.title}"
identifier="net.sourceforge.darwine.x86"
icon="winehq.icns"
shortversion="WineApp-1.0 | ${wine.version}"
copyright="${wine.license}"
applicationCategory="public.app-category.utility"
outputdirectory="${dist.dir}"
mainclassname="${main.class}">
<classpath file="${dist.jar}" />
<option value="-Dapple.laf.useScreenMenuBar=true"/>
</bundleapp>
</target>
If what you want to do is create a java application that the user can launch by double clicking on a Mac, all you have to do is package the app in a jar and ensure that the jar's manifest (META-INF/MANIFEST.MF) includes a line like Main-Class: MyStartClass, giving the class of your app that contains the main method that launches the app.
For more details, see:
Bringing your Java Application to Mac OS X Part Three
Today I had a problem with my old Eclipse 3.4 installation and I had to re-download the entire package. However, I don't think that I got the exact package as before, and I'm having some problems.
The problem can be summarized as follows: when developing a plug-in, I cannot resolve dependencies towards 'org.eclipse.jdt.ui'. When trying to add the missing plugin, in the dialog the closest match is 'org.eclipse.jdt.ui**.source**'. A similar thing happens with other core plugins.
In order to test, I created a new plug-in using the wizard and I obtained a non-compiling plugin: one of the classes uses the class org.eclipse.jdt.ui.JavaUI and it cannot be resolved. Similarly, the MANIFEST.MF includes a dependency towards 'org.eclipse.jdt.ui', but the 'Bundle 'org.eclipse.jdt.ui' cannot be resolved'.
Now a summary of my platform:
I'm running Mac OS X 10.4 Tiger and Java 1.5.0_19-138
I'm running Eclipse Version: 3.4.1 Build id: M20080911-1700
I downloaded the modeling package, which comes in a file called 'eclipse-modeling-ganymede-SR1-incubation-macosx-carbon.tar.gz'
I've performed a fresh installation, in a new folder and using a new workspace.
If I look at the Plug-in Registry view, I can find the 'org.eclipse.jdt.ui' plugin in there, and it appears to be running. By the way, if it is disabled, then the workbench breaks and stops working.
I cannot understand what is happening. Is my installation broken? I wonder if the Eclipse package that I downloaded has an error and they included the sources instead of the compiled files. But in that case, the plug-in shouldn't be working in the workbench, isn't it?
In any case, why I cannot find the plug-in when I'm adding the dependencies, even if I see it in the Plug-in Registry?
Thanks for your help!
Problem solved: just restart the computer.
I don't restart my computer very frequently, so it took me a lot of time to find out that this was the solution. After I restarted it, everything started to work perfectly again. It seems that either Eclipse leaves something in the memory after running, or that some of my initial failures had left something nasty behind. In any case, I had checked and there were no Eclipse related processes running .... weird, but at least now it's fixed!