Use BlackBerry JRE 5.0.0 or previous on MacOS - java

I have my Windows work computer set up with JDE 5, but the plugin for the Mac OSX Eclipse on my home computer is JDE 6 and I can't seem to find a source to download it from.
I found a blog post about MacOS BlackBerry development, but it is from before the official MacOS plugin was released. Anything new on this front?

Just in case it saves anyone else wasting half a day, "FYI: Blackberry JDE 4.6 setup on Mac" on the BlackBerry support forums explains how to use the older Blackberry JREs with Eclipse on the Mac.

Were you still looking for an answer to this question? RIM has released the update for the Mac Eclipse v 1.1.2 Plugin. You have to go to "Help > Install New Software ..." and type the url: http://www.blackberry.com/go/eclipseUpdate/3.5/java . It should come up with options for the BlackBerry Java Plug-in Category. Clicking the arrow will reveal the other OS component packs (4.5 - 6.0). Install these (will take a while).
After this, go to the folder where your Eclipse plugins are located. You'll see the folders for the component packs (e.g. "net.rim.ejde.componentpack"). Copy the net.../components/bin folder from the 6.0 component pack to the other versions' components folder (backup the old one first).
In the components folder, there will be a BlackBerry.ee file. Copy the one from the 6.0 component pack into the other versions' components folder (again, backup the original). Open the new .ee file in a WYSIWYG text editor and change the version information to be accurate to the current component pack's version (e.g. 6.0.0.29 changes to 5.0.0.25).
In Eclipse, you need to add a system library. Open the Preferences and go to the Java > Installed JREs menu and click "Add...". When the window pops up, click "BlackBerry Execution Environment VM." For definition file, this is the BlackBerry.ee file for the version of the JRE you are adding. Name the JRE appropriately (e.g. BlackBerry 5.0). Next, click "Add External JARs..." and navigate to the net.../components/lib folder. Select the net_rim_api.jar file. Click finish and you should be good to go. (Repeat for other versions as necessary).
All that's left to do is to specify the correct JRE in your project properties (Java Compiler > {Click} Installed JREs link). Then, make sure the correct version is selected. Also, make sure there is only one JRE listed in the Project Explorer (newbie lesson learned).
Hope that helps if you still needed it to.
I should also add that I'm running my simulators on Windows via Parallels.

RIM has only released an Eclipse Plugin on OS X. The JDE is Windows-only and probably will always be Windows-only (RIM is trying to phase out the JDE and is encouraging all developers to move to the Eclipse platform).
Keep in mind that the Eclipse plugin for OS X is still VERY new and still has some rough edges - I tried it out and it crashed on more than one occasion! Also, there is no simulator available on OS X yet so you'll need a physical device to deploy and test on (I think it has to be a 9800 but I could be wrong). RIM has promised a simulator on OS X but probably not for another 6 months or so.

For Eclipse 3.6 you must use this url: http://www.blackberry.com/developers/jar/3.6/java/
If after downloading have error because too much authentication error, i'm suggesting you must re-create bb developer zone account & login using it (Kind of annoying, coz at my country bandwidth is limited & after waiting 3 hour, the installation is failed).
Also, in copying file don't forget copy fledge from net.rim.ejde.componentpack6.0.0_6.0.0.30/components/. If not when i try to add the definition file JRE i got this kind of error
"Execution Environment File Property-Dee.executable must point to a valid copy offledge.exe"
Hope this is can help.

Ahh. Seems like Apple removed java 5 and below from Snow Leopard (10.6). Leopard (10.5) still supports 1.4.2 and 5.0 and 6.0. You can find them in "/Applications/Utilities/Java Preferences.app".

Related

How to install an old version of JDK in windows 7?

I already have some version installed on the machine, 1.7 and 1.6.
Now I have the need to install version 1.5, but when I try to install an error occurs, speaking to uninstall the versions that I have the Java (JDK).
I have no chance because I have other applications using these versions, is there any possibility to do this without uninstalling these versions I already have ?
Thank in advance !
Bypassing the installer is bit of work, but doable. How to extract Java from the EXE installer is described in this answer: https://stackoverflow.com/a/6571736/73652
The JDK is a package of tools for developing Java-based software.
Check your system architecture in the control panel, i.e. 32 or 64-bit.
Click on C → program folder → java folder.
If there is no JDK folder present, then follow the below steps:
Search in Google JDK download.
Scroll to bottom, and check for the system architecture of your system.
Click the download link and wait till the download is finished.
In downloads click on show in folder.
Click on the JDK icon and click on next until the setup process is completed.
Please find this video along with steps for JDK Install.

Building aapt from Android source on Mac 10.9 Mavericks segfaults or gives "Illegal Instruction 4" on 10.8 Mountain Lion

This is a pretty specific question, but I've run out of ideas and I'm hoping for some new directions.
I've downloaded the Android source from the Android Open Source Project, following the instructions here:
http://source.android.com/source/building.html
I followed all of the steps specific to Mac (case sensitive disk image, make v3.81, file descriptors set to 1024) and have set the build to be 'lunch full-eng' as suggested on the site. I have the entire tree and with these settings I can build it and I have no problems with it on my machine.
Specifically, I have made some changes to aapt (in frameworks/base/tools/aapt) which I then clean (make clean-aapt) and then rebuild (make aapt). It builds without a problem. When I run aapt from the command line, it runs fine and does not crash. I am doing all of this checkout/build on Mac 10.9 Mavericks.
Next, I sent my newly-built aapt binary to a colleague running Mac 10.8 Mountain Lion and it segfaults immediately upon execution.
I thought maybe it was my changes, so I removed everything I had added. Clean and rebuild. Same problem. It is definitely not my changes.
My guess is that I need to set it to build with some compatibility flag enabled, but I'm not sure what to set or where to set it. Does anyone have any ideas where I could look?
Ok, I figured it out, so I will post my solution here for the sake of posterity.
Between the time the AOSP was established and Mavericks was released, the location of the Mac OSX SDKs has changed. It used to be located here:
/Developer/SDKs/MacOSX10.x.sdk where x is the version you want to use.
But recent changes to XCode have moved the newer SDKs (10.8 and 10.9) to within the XCode.app package, and eliminated the older ones. However, I found and downloaded the set of prior SDKs in case I need them, from here:
http://aaronwallace.github.io/MacOSX_SDKs/
I copied them into /Developer/SDKs, set an environment variable called MAC_SDK_VERSION to the version I want to build, and did this:
mbpr15:Android awt$ export MAC_SDK_VERSION=10.6
mbpr15:Android awt$ lunch sdk-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.3.2.1.000.000
TARGET_PRODUCT=sdk
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-13.0.0-x86_64-i386-64bit
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
OUT_DIR=out
============================================
mbpr15:Android awt$ make -j8 sdk
Works perfectly. This built a custom set of the sdk tools that is compatible with older versions of Mac OSX.

Unable to install Android SDK

I had a Windows XP. I also had JDK6. I downloaded "Android installer r11" for windows. When I click the installer, the error message is displayed as alert Java SE development kit is not found, Then the installation cannot happen.
But in my system I had a Java SE 6. I cannot find why it is not take the Java.
Try this step it may help you:
Installation sequence: JDK, Eclipse, ADT, Android SDK
1. JDK
First, head over to Oracle Web site to download and install the latest Java Development Kit.
Ensure that the environment variables look something like this:
CLASSPATH
C:\Program Files\Java\jdk1.6.0_10\lib;C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar;
C:\Program Files\Java\jdk1.6.0_10\lib\dt.jar;
PATH:
C:\Program Files\Java\jdk1.6.0_10\bin;C:\Program Files\Java\jdk1.6.0_10\jre\bin;
At the command prompt type java-version to view the current system has been installed Java version.
2. Eclipse IDE
Next, from the Eclipse Web site Download the latest Java Eclipse Classic as our development environment, select here eclipse-jee-helios-SR1-win32 version, download the Eclipse is not good need to install, unzip to the right place to use.
3. ADT (Android Development Tools plugin, Android Development Kit)
ADT is an Eclipse plug-in, due to the use of the Eclipse version, the installation process referred to in the following menus and options may vary.
Then, start Eclipse, choose Help-> Install New Software ..., pop-up "Install" dialog box.
Click the Add ... button, pop-up "Add Site" dialog box:
Enter the Android update site here: Location: http://dl-ssl.google.com/android/eclipse// When you're finished, click "OK", back to "Install" dialog box.
In the "Install" dialog box, select just added the update site, waiting to find the appropriate version of Eclipse Select ... "Develpoer Tools" of all items, all the way to click "Next", accept the agreement, click "Install" start the installation.
After the installation is complete, restart Eclipse.
4. Android SDK
Next, from the Google website download the latest android-sdk. Extract the zip file to appropriate directory, remember the absolute path. Run the SDK Manager installation.
In Eclipse, select Windows -> Preference -> Android, enter the directory on the step down the path, click "OK".
The latest SDK, only tools, but no longer contains the platform or the Google add-on, we need to use the "Android SDK and AVD Manager" to install and update, such as platforms, tools, add-ons, and documentation of these SDK components.
%JAVA_HOME% should be in your path. Half of the time you can have an SDK and be missing that variable.
Get thee to a command line and type echo %JAVA_HOME%, or simply see if you get any output from javac -version. The exact variable for Java home is probably not quite right, but the second step should work. If javac fails you, you either never installed Java SDK (aka JDK) and instead got the SE, or you still haven't set the java binary folder into your path. Use your Windows search and look for javac.exe.
If nothing else works, go to java.sun.com and re-download and install a new SDK. The annoying part is that Glassfish and other things tend to complicate the java setup because they too must be set up during install or shortly thereafter.

JDK documentation in IntelliJ IDEA on Mac OS X

I'd like to know how to setup IntelliJ to point to the JDK documentation so the documentation popups that display during code completion will show me what the function I'm looking at is going to do. For some reason IntelliJ isn't able to find the JavaDocs by default.
I'm also not 100% sure that the documentation is installed with the JDK that's installed with the OS. I don't see them in /System/Library/Frameworks/JavaVM.framework/ but I may be looking in the wrong place. If it's not included, I'd also like to know what needs to be downloaded and where it needs to be installed to get the JavaDocs for the JDK to show up in IntelliJ.
I had to combine the responses I got to this point and add a few extra details so I'm answering my own question.
Search for "Java developer" from Downloads for Apple Developers
Download and install "Java for Mac OS X 10.6 Update 9 Developer Package" (or later).
In IntelliJ, open File -> Project Structure.
Click on "SDKs" under "Platform Settings".
Add the following paths under the "Documentation Paths" tab (the paths may be different based on which JDK you're using):
/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/docs.jar!/docs/api
/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/appledocs.jar!/appledoc/api
Add the following path under the Sourcepath tab:
/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home/src.jar!/src
Thanks, #Yishai for the download location and #Gareth Davis for the location of the documentation after installing.
Update for 10.7/10.8 [Mountain] Lion:
Steps are the same except for these changes:
In step 2, download "Java for OS X 2012-005 Developer Package" (or later).
Use these paths instead in step 5.
/Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home/docs.jar!/docs/api
/Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home/appledocs.jar!/appledoc/api
Use these paths instead in step 7.
/Library/Java/JavaVirtualMachines/1.6.0_35-b10-428.jdk/Contents/Home/src.jar!/src
Quick (and dirty?) solution: Point IntelliJ to http://download.oracle.com/javase/6/docs/api/
have you installed the Apple Java Developer package?
It provides src.jar and docs.jar in /Library/Java/JavaVirtualMachines/1.6.0_22-b04-307.jdk/Contents/Home
Note this is since update 3. If these are present Intellij will just find them, or at least mine did.
details are in the Java update release notes
This should tell you what you need to know: Get local copies of Mac OS X Java source code and Javadoc – Concord Consortium wiki.
That page recommends going to https://connect.apple.com and downloading and installing “Java for Mac OS X 10.5 Update 2 Developer Documentation (Disk Image)” or the equivalent newer release. It describes a few ways to view the documentation, based on the Java jar file being located at a path like this:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/src.jar

Intellij IDEA setup on OS X

What's the accepted procedure and paths to configure jdk and global library source code for Intellij IDEA on OS X?
As of the latest releases:
Java for Mac OS X 10.6 Update 3
Java for Mac OS X 10.5 Update 8
Apple has moved things around a bit.
To quote the Apple Java guy on the java-dev mailing list:
System JVMs live under /System/Library/...
These JVMs are only provided by Apple, and there is only 1 major
platform version at a time.
The one version is always upgraded, and only by Apple Software Updates.
It should always be GM version, that developers can revert back to, despite
any developer previews or 3rd party
JVMs they have installed.
Like everything else in /System, it's owned by root r-x, so don't mess
with it!
Developer JVMs live under /Library/Java/JavaVirtualMachines
Apple Java Developer Previews install under /Library.
The Developer .jdk bundles contain everything a developer could need
(src.jar, docs.jar, etc), but are too
big to ship to the tens of millions of
Mac customers.
3rd party JVMs should install here.
Developers working on the JVM itself can use
~/Library/Java/JavaVirtualMachines
It's handy to symlink to your current build product from this
directory, and not impact other users
Java IDEs should probably bias to using /Library or ~/Library detected
JVMs, but should be able to fallback
to using /System/Library JVMs if
that's the only one installed (but
don't expect src or JavaDoc).
This allows Java developers the
maximum flexibility to install
multiple version of the JVM to regress
bugs and even develop a JVM on the Mac
themselves. It also ensures that all
Mac customers have one safe, slim,
secure version of the JVM, and that we
don't endlessly eat their disk space
every time we Software Update them a
JVM.
So, instead of pointing Intellij at /System/Library/Frameworks/JavaVM.framework, you should point to a JDK in either /Library/Java/JavaVirtualMachines or /System/Library/Java/JavaVirtualMachines
In the 'Project Settings' window, go to 'JDKs' section that you see under'Platform Settings'. Click the little plus sign and choose 'JSDK'. A file chooser should open in the /System/Library/Frameworks/JavaVM.framework/Versions directory. If not then just navigate to it. There you can choose the version you would like to add.
IntelliJ should detect your installed JDK's, as they are in a standard location that Apple provides. If you want source code for the JDK, you can download that from Apple as well. Sign up for a free ADC account and then you can get access.
For global libraries, I've been enjoying the Maven integration in the recent release. It alleviates the need to setup global libraries by pulling things from the Maven repository. It will download source and javadoc jars as well.
the JDK that comes with osx doens't include the source. you need to log into the apple developer site with your apple account to find the developer version of the SDK which includes src.jar.
http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wo/5.1.17.2.1.3.3.1.0.1.1.0.3.1.3.3.1
The post from intellij support page explains how to configure the JDK which Intellij uses to run itself.
https://intellij-support.jetbrains.com/entries/23455956-Selecting-the-JDK-version-the-IDE-will-run-under

Categories

Resources