Not able to open iReport Designer in mac - macos

I'm new to Jasper reports and Mac. I have downloaded iReport-5.6.0.dmg. It got saved in downloads. Later I moved to applications. The .dmg didnt install and when I just open the .dmg and right click to open for Jaspersoft report designer, it didnt open.
I just saw some questions, but nothing helped.
I'm using mac os Sierra 10.12.2
My java version is
Alis-MacBook-Air:~ Shah$ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Alis-MacBook-Air:~ Shah$
JDK location
Alis-MacBook-Air:~ Shah$ /usr/libexec/java_home -V
Matching Java Virtual Machines (2):
1.8.0_101, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
1.7.0_79, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
iReport.conf
# ${HOME} will be replaced by user home directory according to platform
default_userdir="${HOME}/.${APPNAME}/5.6.0"
default_mac_userdir="${HOME}/Library/Application Support/${APPNAME}/5.6.0"
# options used by the launcher by default, can be overridden by explicit
# command line switches
default_options="-J-Xms256m -J-Xmx512m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=512m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dnetbeans.exception.report.min.level=99999 "
# for development purposes you may wish to append: -J-Dnetbeans.logger.console=true -J-ea
# default location of JDK/JRE, can be overridden by using --jdkhome <dir> switch
#jdkhome="/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home"
# clusters' paths separated by path.separator (semicolon on Windows, colon on Unices)
#extra_clusters=

You should setup JDK 1.7s as JAVA_HOME otherwise you'll see like this error
"The current path is: C: \ Java \ jdk1.8.0The current path is: C: \ Java \ jdk1.8.0Java HotSpot (TM) 64-Bit Server VM warning: ignoring option MaxPermSize = 512m; support was removed in 8.0" and you can setup jaspersoft studio community its working.

Issue was with the JDK version.
If the JDK version is 1.8, Jasperstudio has to be installed. It worked fine.

Related

Error installing eclipse (jvm.dll load error) - how to fix?

I am trying to install Eclipse inside a virtual machine running Windows 7 64-bit.
When I launch eclipse-inst-win64.exe, I get the following error: Failed to load the JNI shared library "C:\Program Files\Java\jdk-12.0.2\bin\server\jvm.dll.
Both eclipse and JDK are 64-bit.
The DLL is there:
c:\>dir "c:\Program Files\Java\jdk-12.0.2\bin\server\jvm.dll"
Volume in drive C has no label.
Volume Serial Number is 8E3B-94B
Directory of c:\Program Files\Java\jdk-12.0.2\bin\server
07/27/2019 04:47 PM 11,538,912 jvm.dll
Java is 64-bit:
c:\>"c:\Program Files\Java\
jdk-12.0.2\bin\java.exe" -version
java version "12.0.2" 2019-07-16
Java(TM) SE Runtime Environment (build 12.0.2+10)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)
No other JDK or JRE versions are installed.
Java itself works just fine - I compiled and ran few Spring samples, installed and used Maven, everything works.
Any idea what can be wrong here? Is there any way to force Eclipse to output more info about the error (e.g. the value returned by GetLastError() in the Windows API after loading the library failed).
Thanks!
I solved the problem by downloading and installing the Visual C++ 2015 runtime from Microsoft.
Apparently it's needed for that specific jvm.dll and isn't installed automatically by the JDK installer.

Java version shows 7 and Java version shows 8 in windows?

I am really frustrated to see following behavior and not sure yet after research how to fixed this. I've two separate projects one works only on Java 7 (can't update to Java 8) and another project works on Java 8 (can't downgrade to 7). So I've both Java 7 and 8 installed on my windows machine.
So, I am seeing following behavior constantly. Currently I am on Java 8 and would like switch back Java 7, so I changed environment variable JAVA_HOME and PATH to point to Java 7, but when I verify through CMD, it shows me following.
C:\>java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
C:\>javac -version
javac 1.7.0_71
I can't use above combination, neither projects works for me. So I always need to uninstalled Java 8 and then only I can point to Java 7.
Also if I want to move back to Java 8 (again installed Java 8), then it shows me following combination. How to fixed this error on Windows? As uninstalling the JDK every time is not the solution. Please help me.
C:\>java -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
C:\>javac -version
javac 1.8.0_45
java.exe, the Java runtime, also installs in c:\windows or c:\windows\system32 (can't remember, I'm on a Mac now).
So even if your PATH contains the bin directory of JDK, if c:\windows (or c:\windows\system32) comes before JDK\bin in the PATH, the version in c:\windows (or c:\windows\system32) is the one that is used.
Just make sure the JDK is first in the PATH, or at least before c:\windows (or c:\windows\system32).

set mac jdk version to 1.8

I have searched several ways to change JDK version on mac.
$/usr/libexec/java_home
And I got
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
I tried
$export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
also tried
/usr/libexec/java_home 1.8.0_31 --exec javac -version
then I run
$echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
then I re-check java -version
$java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
How I can really change java -version on my mac.
To set Java to 1.8 for your shell environment, put this in your ~/.bash_profile:
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
Solution without 3rd party tools:
leave all JDKs at their default location, under /Library/Java/JavaVirtualMachines. The system will pick the highest version by default.
To exclude a JDK from being picked by default, rename its Contents/Info.plist to Info.plist.disabled. That JDK can still be used when $JAVA_HOME points to it, or explicitly referenced in a script or configuration. It will simply be ignored by system's java command.
System launcher will use the JDK with highest version among those that have an Info.plist file.
When working in a shell with alternate JDK, pick your method among existing answers (jenv, or custom aliases/scripts around /usr/libexec/java_home, etc).

How to change JRE for PhpStorm on MacOs

It seems, with the latest MAcOs updates, that Java was also updated, which influenced PhpStorm performance very badly.
Anyway, I decided to update my Java.
Was
$ java -version
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)
After downloading Java SDK from Oracle and installing:
$ java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
But in PhpStorm it still shows the old JRE:
I also restarted my computer, but still the old JRE is shown.
Please help, how to make PHPStorm use a new JRE?
Quoting from the "Selecting the JDK version the IDE will run under" article in the Knowledge Base
posted on March 27, 2013
Mac OS X
At the moment all our products require Apple JDK 1.6 to be installed in order to run on Mac. JDK 1.7 from Oracle is not officially supported yet and has known problems that stop us from using it by default. Oracle JDK 1.7.0_40 has added support for Retina and works much better than previous versions on Mac. You are welcome to give it a try in case you have any problems with Apple JDK.
To force running under JDK 1.7 edit /Applications/.app/Contents/Info.plist file, change JVMVersion from 1.6* to 1.7* :
<key>JVMVersion</key>
<string>1.7*</string>
See this answer for the known problems with JDK 1.7.
IDEA_JDK environment variable can be used to override the selected JDK, you may need to run the product from the Terminal so that it sees your environment variables (Mac OS limitation): open -a /Applications/.app/ .
Application About dialog will show the actual JDK version.

How to run Eclipse Indigo on JDK 1.7 OSX

With the recently OSX JDK 7 ea release from Oracle. How to run Eclipse Indigo ?
I get the following error msg:
$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/JDK 1.7.0 Developer Preview.jdk/Contents/Home
$ java -version
openjdk version "1.7.0-ea"
OpenJDK Runtime Environment (build 1.7.0-ea-b211)
OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)
$ /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse
JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
JavaVM FATAL: Failed to load the jvm library.
I just tried this myself and had some complications so I thought I would share what ended up working for me:
Download and install Mac OSX version of Java SE Development Kit 7
Under Eclipse -> Preferences -> Java -> Installed JREs, click Add, select Mac OS X VM, then click Next.
Enter "/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home" as the JRE home directory, enter something reasonable like "Java SE 7" as the JRE name, and then click Finish. (Note that you won't be able to navigate to the "../Contents/Home" folder. You will have to type it in manually.)
After adding the new JRE to the list of Eclipse installed JREs, check the box next to the new JRE that you just added and then click OK.
Now under Eclipse -> Preferences -> Java -> Compiler, select 1.7 from the "Compiler compliance level" dropdown and click Ok.
Hope this helps someone who has problems figuring this out. The confusing part for me was selecting the JRE home directory in Eclipse, since I wasn't able to navigate to it.
The Eclipse bug is resolve in the last Eclipse 3.8 Milestone.
It's work for me.
Try this: http://twitter.com/#!/cimnine/status/126219234203271168/photo/1
Worked for me.
This is an old solution and has no relevance anymore.

Resources