I'm trying to tweak the performance of Netbeans on a rather old PC I am using. I've followed some of the suggestions here but the one regarding
sun.java2d.opengl=true
fails, giving
Unknown option -Dsun.java2d.opengl=true
I'm using Linux WattOS distro version 5, Java 1.7 and Netbeans 7.1.2. Has this option become obsolete now as the above page seems to refer to Java 5?
Are there additional steps I need to do to enable Netbeans to use openGL?
** Additional Info **
I realised that I should have used the option as
-J-Dsun.java2d.opengl=true
Although now I get a crash when I try starting Netbeans now. I've submitted a crash report so I'll wait and see what happens and post the result here.
Check with
java -version
what version of java you're using. This extension is only supported in the Sun JVM, and quite a few distros come with OpenJDK by default.
Related
From eclipse, I created a Google App Engine Standard project and tried to Run it on local App Engine. It is not starting and throwing the below errors -
java.lang.NullPointerException
at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at java.base/java.util.Properties.put(Properties.java:1316)
at java.base/java.util.Collections$CheckedMap.put(Collections.java:3636)
at com.google.appengine.tools.development.SharedMain.setTimeZone(SharedMain.java:219)
at com.google.appengine.tools.development.SharedMain.postServerActions(SharedMain.java:188)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:398)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:257)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:248)
Also note that I haven't made any changes to the project. It's the default that gets created.
This is likely an issue with your jdk version. What does javac -version report back? I run into the same stack trace with version 12. Switching to 1.8 works.
On MacOS, this answer helps: How to set or change the default Java (JDK) version on OS X?
Other platforms should have similar ways to switch versions.
This looks to be a JDK12 issue - it seems JDK12 is restricting the system properties exposed to programs, I've run into a similar issue with the OS version before.
I've reported it to Google, you can star it so they feel the weight of the matter: https://issuetracker.google.com/issues/140787205
I have just installed osx mavericks, and Java SE6 just disappeared from my system... anyway, I already have Java SE7 and I am happy with that, no need to reinstall Java SE6 since my NetBeans already works on Java7 and NetLogo too if I start it from terminal...
I am wondering how to tell the plist file of my NetLogo 5.0.4 to look for the JavaSE7 folder... any help much appreciated.
Best,
Simone
Answer
You might think that changing "1.5" to "1.7" in these Info.plist lines:
<key>JVMVersion</key>
<string>1.5+</string>
would work, but it doesn't. That's because Java 6 is from Apple but Java 7 is from Oracle, and "Apple java applications and Oracle's aren't executable compatible" (source).
Unless you want to mess with making a new NetLogo app bundle using Oracle's AppBundler tool, the simplest way to get the app running under Java 7 is to download the Linux version of NetLogo and use the supplied netlogo.sh launch script.
More info
When running headless, NetLogo has been tested thoroughly on Java 7. For headless runs, I definitely recommend Java 7 because it's faster.
The NetLogo GUI, however, hasn't been tested with Java 7. Once you get it launched, it will probably mostly work, but you might have problems or incompatibilities. We'll probably switch eventually (it's issue 197), but the work on that hasn't been done yet. That ticket would be a good place to record any problems that you find.
If you decide to fall back to Java 6, you can get it from http://support.apple.com/kb/DL1572 . (link is current as of October 2013)
Usually I see all these tabs in VisualVM for locally running Java programs:
However, I have one local program which is currently only showing me Overview and Monitor (even though it usually shows all those shown above):
Also interesting is that VisualVM itself doesn't present the Profile tab:
All three of the programs shown are running with the same JVM with the same Java Home.
What controls which tabs are shown for a particular program? How can I get them all back for my program showing just Overview and Monitor?
I have Visual VM 1.3.5 (latest at this date) and JDK 1.7.0_17.
I found that this was the issue of usage of wrong JDK version. In my case my application was running on 64bit JDK and I started VisualVM from 32bit JDK.
After starting VisualVM from the same JDK on which my application is running, everything was fine. Hope it will help you.
You might need to enable jmx ports on your app. Try adding these switches to your VM and see if the tabs appear again:
-Dcom.sun.management.jmxremote.port=6789 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
I've just removed ~/.visualvm and reran, See https://java.net/jira/browse/VISUALVM-598
As most of the people mentioned,
The issue was due to the version mismatch of virtualvm and your application.
additionally,
visualvm is bundled in oracle which supports jdk up to 9.
If you are using >9, please make sure you go for another profiler.
What worked for me was specifying the "Start profiling from" classes. If I left this blank, I didn't get the profiler tab. When I specified it, I did. I should probably note that this was a web application running under Tomcat, so I specified org.apache.catalina.startup.** as the starting class.
Check that proxy is disabled if you are running VisualVM for local application
I had a similar problem with missing profiler tab in VisualVM. I'm using Oracle JDK 1.8 and want to profile web application running on Tomcat 8 (JPA, Spring, Hibernate, Vaadin, etc).
I tried all above-mentioned solutions and many others found on the internet, but unfortunately, none of them solved missing profiler tab issue.
So I switched to Java Mission Control profiling tool (JMC + Flight Recorder) which is a part of standard Oracle JDK (from JDK 1.7 update 40) and it works great.
In my case, the issue was the usage of wrong JDK version. My App was running on jdk1.7.0_80, VisualVm running with jdk1.8.0_162.
Replacing the APP JDK version from 1.7.0_79 to 1.7.0_80 fixes the problem.
after spending a day reading here and there I decided to ask help as I could not find a solution to my problem.
I have to create a java/swt application embedding a browser with full HTML5 support. That works out of the box on both linux and osx with SWT.NONE browser type (using webkit).
Unfortunatelly I have lot of troubles on windows.
First let me say that I'm using SWT 4.2.x on windows 8 64 bit.
To make SWT browser work with webkit I had to install 32bit JVM and manually point to it (as the -d32 switch on default 64bit JVM says that no 32 bit JVM is installed). ALso installed Safari.
And also I had to use 32bit SWT library. WHen finally I got it run I discovered that Safari for windows does not support drag and drop as experienced and stated here:
http://www.w3schools.com/html/html5_draganddrop.asp
So I decided to switch to mozilla. According to Eclipse/SWT documentation I have downloaded and installed XULRunner 1.8.0.1. I have unzipped it into C:\Program Files (x86)\Mozilla\XULRunner\1.8.0.1\xulrunner and run xulrunner --register-user (and also --register-global)
Finally in my code I added
System.setProperty("org.eclipse.swt.browser.DefaultType", "mozilla");
I have also set a global environment variable "MOZILLA_FIVE_HOME" pointing to the same XULRunner installation dir.
But then, when I run my java program (32bit JRE, 32bit SWT) I get
Exception in thread "main" org.eclipse.swt.SWTError: No more handles [MOZILLA_FIVE_HOME may not point at an embeddable GRE]
How can I fix that?
Thanks in advance!
EDIT:
I was running command prompt not as administrator and xulrunner was not registering. Doing as administrator, worked. However I'm still in trouble: XULRunner 1.9.x seems not to support HTML5. For example element.children is not supported.
I managed installing XULRunner 10.0.2 that seems to have the required support. However as soon as I click into my embedded browser, the application just crashes without printing any error on java output console...
I need to find a solution in order to use either ecent version of mozilla or recent version of webkit on windows
Ok, loading XURLRunner 10.0.2 works. The crashing app was due to a stack overflow error in my js code.
I too am trying to embed XULRunner into my eclipse plug-in, with no luck (currently). I came across your answer here. Just wanted to comment that it is not reasonable that you executed
xulrunner --register-user
nor
xulrunner --register-global
on the XULRunner 10.X since according to this post
https://stackoverflow.com/a/7567781/1743693
the support on installing the XULRunner system-wide was removed (which was a good step IMHO)
Trying to execute the aforementioned commands will result
"Error: couldn't parse application.ini"
As for my problem: I keep running into the runtime error:
Can't load library:
C:\Users\david\.swt\lib\win32\x86_64\swt-xulrunner-win32-4236.dll
C:\Users\david\.swt\lib\win32\x86_64\swt-xulrunner-win32.dll: Can't
load IA 32-bit .dll on a AMD 64-bit platform
And I can't figure out where this is coming from.
I'm running a VirtualBox with Windows 8 64bit
If you can elaborate more on what solved your issue with that - i would really appreciate that.
Thanks.
I am trying to debug a j2ee application in tomcat using Intellij Idea in an OS X 10.6.4 system. I need it specifically to run over a 1.5 JVM and 1.5 JDK so that the jgroups-all component doesn't crash the application through this error:
class: java.lang.ClassNotFoundException: [Lorg.jgroups.Address;
at com.opensymphony.oscache.plugins.clustersupport.JavaGroupsBroadcastingListener.initialize(JavaGroupsBroadcastingListener.java:119)
Has anyone needed to install an older version of JVM or JDK in OS X before?
NOTE: I'm a Mac newbie.
Thanks, everyone.
Well, as far as I know you should be able to choose an older VM in the Java control panel, although I think Apple removes old JREs by default now.
Did you consider Apple's Java Deprecation before starting you project? It looks like you will be out of luck in the near future. If Apple doesn't even want to support some recent JRE anymore it is unlikely that they will offer old, unsupported ones, which even Oracle ended support for.
Even if Oracle will provide some JRE/JDK for Mac OSX it is highly unlikely that they will back-port some Java 5 to Mac OSX. Your best bet is to migrate your application to a version which is supported first, before doing any other steps.
Try the solution here.