Eclipse IDE on Mac? - java

I'm trying to get Eclipse 4.5.2 running on Macs with OS X 10.10.5 and Oracle Java 8u73 I got to the point where trying to start Eclipse results in
The JVM shared library "$JAVA_HOME/bin../jre/lib/server/libjvm.dylib" does not contain the JNI_CreateJavaVM symbol.
Googling this returns a whole bunch of suggestions, none of which work. Some say you absolutely MUST have the JDK (I'm using the JRE). Others emphatically say the JRE is all you need. Some suggest editing an Info.plist or another, with people responding "Yeah that worked!" right along with "That didn't work"
How do I get past this message?

You need the JDK because, well, to be honest Apple hates Java and has done a thorough job of screwing up what used to be the best OS for Java development.
The "you need legacy Java" message was from OS X, not Eclipse. The advice to download and install it is bad advice, but sadly nothing that Eclipse can remedy. Installing "legacy Java" just reverts your system to a VERY outdated JRE and renders much Java-based software, including Eclipse, broken.
Eclipse requires Java 7 or above (this year's release of Eclipse packages in June will require Java 8 ), so the best thing is to download JDK 1.8 (not just the JRE), install that, then point your eclipse.ini file to it's exact location per the instructions at the eclipse.ini wiki page.
Oracle JDK download links change often, so it's best to Google for "JDK 8 download" and you'll find it. Here's the page as it stands at the time I'm writing this.
[quoted from this Eclipse forums message]

Related

Running ECLIPSE on a memory stick

I'm trying to run Eclipse (Neon 1) on a memory stick. In a first time, the problem was the JVM 1.6 installed on the machine which is too old. To use a compatible JVM, I created a jre directory in Eclipse's directory and placed in it a JVM 1.8 (the last one found on ORACLE's web site).
Now, when I try to run Eclipse, nothing happens. I got the splash screen with "Eclipse Neon 1" then, nothing, not even an error message.
What is the problem and what can I do ?
Important note : I can't install a JVM on the "native machine" as I'm not administrator.
Than, you for all your answers. Have a good day.
When you need programs to run off a USB, always search if a portable version exists first. This is a working portable version of Eclipse Neon but it is another version though.
Finally, I found (one of) my mistake.
I used a jre(...).exe. It's the problem. I downloaded the tar.gz file of the jre and unpacked it. Then, I used the jre of this unpacked version and everything was ok except a problem with an "access restriction" to some libraries.
I fixed that last problem with that question on StackOverFlow. And now, everything is ok !
Great ! Thank you to everyone for your help.

Java application not working on other systems

I've made a word-processor named StoryTeller in Java (a first - beta version, which I'm still working on improving) and put it online for others to test out and use.
I've gotten a response saying they were unable to open it. I've built and run StoryTeller on Windows 10 OS and it works fine. After generating the jar file, I used Inno setup to generate an installer for the program. You can find the file I've uploaded here. Here's the message I got about it:
Hello! I was going to try out StoryTeller on my Macbook today, but unfortunately it didn't work. The file automatically gets opened in
"Text Editor" where encrypted text shows up along with the error
message "this program must be run under Win32".
I downloaded it on my old computer earlier this week (it has windows
7) and the download process and installation worked perfectly fine,
but I was unable to open the program when the installation was done.
It appeared on my desk as a Java-symbol (the icon) and nothing
happened when I clicked on it. Both my OS are quite old (Macbook from
2010 and the other computer from 2012), but I've still updated them as
much as possible and installed all the latest versions available of
necessary programs, so I'm not sure whether the problem lies within my
computers or StoryTeller itself.
Do you have any ideas how I can fix this? I would really like to try
StoryTeller since it seems to be a great concept that could really
come in handy when I work on my novel.
Could anyone help, please, understand what may be the issue here? Thanks.
First, check if your JDK is 32-bits and make sure to advice your future users have a 32-bit JRE installed. This way, it may work properly. I think 64-bit Java apps can't run atop a 32-bit JRE;
You can bundle a proper JRE/JVM with your software;
Make sure you are referencing ANYTHING with absolute paths inside your code. This could make your software throw several exceptions when running somewhere else;
For instance, Inno-setup commonly generates Windows-only .exe setups. Installing your software in a Mac would require you to generate a .dmg or .pkg (this one you could create through PackageMaker extension from XCode here (require registration, more info here
Kappy on Jul 5, 2012 6:28 PM says: Go to connect.apple.com and search for "packagemaker." Of course you must first be logged into your developer account.
))
For Linux, you can provide a simple shellscript bundled with your .jar (even with a discrete JVM) in a .zip or .tar.gz file, and ask your future users to run the provided shellscript.
Good luck!

Error could not find Java SE Runtime Environment / Start from scratch

I wanted to develop an android app a few months ago, so I followed all the steps from here-> https://developer.android.com/training/basics/firstapp/index.html?hl=p and I believe I downloaded all the tools I needed. I never got around to developing anything, so I tried starting again a few days ago. When I went to the above mentioned website, it said download the new versions of this and that, so I did. I tried following the steps, but now when I try to open eclipse, I get an error saying:
"Error could not find Java SE Runtime Environment".
My questions are:
How do I delete everything and start from scratch? I wan't to delete eclipse, sdk manager, sdk folder, everything. I want to follow the download instructions all over again and see what happens because it did seem to work the first time i tried a few months back.
Do I just delete some programs from control panel?
If this is not easy, how can I fix the error I'm getting when trying to open eclipse?
Edit: windows 7, 64-bit OS, if that helps
That sounds more like a problem of a corrupted Java installation. Check the JAVA_HOME environment variable. If this is empty fix this and try again.
To delete eclipse and the sdk just delete them from where you installed them.
SUGGESTIONS:
0) I assume you're running Windows. Please specify if you're on a different platform.
1) Delete Eclipse.
If you're not using Eclipse for anything else yet, I would strongly encourage you to delete it.
2) Uninstall your Java JDK (from Control Panel).
Download and install the JDK from Oracle: http://java.oracle.com.
3) Download and install the "ADT Bundle for Windows": https://developer.android.com/sdk/
In earlier versions of Android, you had to install Eclipse, the Android Plugins, and the Android SDK separately. I believe this is the procedure your link describes.
The newer "ADT Bundle" saves you this trouble. If Android is the only thing you're using Eclipse for (at least for now), you definitely want the ADT bundle. And you can probably ignore most of the instructions in your link.
'Hope that helps..

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

Location of 1.5.x JDK source code

I have installed Eclipse 3.3 on Mac OS X and it does not contain the src.zip file I am used to seeing with Windows and Linux installations. Where can I download the complete source code for the Java 1.5 JDK (must be specific versions).
I have been able to locate the full source code, however it contained the ungenerated Buffer implementations and so navigating NIO code was not possible.
Looking for the Java source typically found in the JDK src.zip, not the VM source.
You can get the Developer Documentation, which includes the source. The download requires you to have an ADC account.
Brian Clapper has already mentioned it in a comment, but the JDK downloads from Sun include src.zip. I don't know if there's any way to get it other than installing on a target platform, but you can install it on a Windows or Linux (virtual) machine and get src.zip from there.
Specifically for Java 1.5, the downloads are here
[Update]
Also, source distributions of the JDK are available from Sun from here. It seems that SCSL link is messed up and throws you for a loop, but JRL still works (if you don't mind going through it).
It is located in
/System/Library/Frameworks/JavaVM.framework/Versions.1.5.0/Home/src.jar
I do have the XCode stuff installed found on the installation disks that come with a Mac, so I don't know if the source code appears on a standard Mac installation of OSX.
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/src.jar
More details on:
http://confluence.concord.org/display/CCTR/Get+local+copies+of+Mac+OS+X+Java+source+code+and+Javadoc
Unclear if that is even possible since the Mac JDK is not, to my knowledge, open source. It was created by Apple not Sun.

Categories

Resources