I had Developed Java Application in Windows 7.
And I had made JAR file of that application.
Now I want to convert that File into DMG format which is compatible for MAC Operating System.
Can any one Suggest me steps please?
I tried into terminal But got this errors.
DEVs-MacBook-Proist idev$ java -jar Soul_Spotter.jar
Exception in thread "main" java.lang.UnsupportedClassVersionError: idev/soulspotter/Login : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
The below link explains the steps. I've also copied the answer which worked for me.
Copied from convert java app to mac installer...dmg
Use "Jar Bundler" in the XCode download from Apple Developer
Connection.
http://developer.apple.com/technology/xcode.html
You will need to register for a free account.
Steps: http://www.centerkey.com/mac/java/
Related
I have Java 8 (JDK and JRE 8) on my machine. I have Eclipse Mars 4.5.1 .
I am trying to create a simple Static Web Project and while running the project on HTTP Preview (or a Dynamic Web Project on Apache Tomcat for that matter), it gives the following error. (Also see the screenshot attached.)
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/jetty/server/Handler : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
The problem is that you're using JDK1.8 to compile your code (with target runtime of 1.8).
However, your server is configured to run with JDK 1.6 (you can see it at the top of the console window [ HTTP preview at...])
Change your workspace default JRE to your JDK 1.8 if you want to use the http preview (I tried and saw no option to specify a runtime JRE).
If you want to use tomcat, then specify the correct JRE on the first page of the 'New Server' wizard.
I'm trying to use Aletheia and tesseract-orc with some images in mac. But I faced many problems:
I can't make Aletheia work with wine, it just doesn't open
I followed the instruction of the question Stackoverflow question but I've got this result regarding the use of Tesseract OCR to Page (TPT) and Page Viewer (PVT):
$ java -XstartOnFirstThread -jar JPageViewer.jar "$dl/Downloads/paper-3-tool.xml" "$dl/Downloads/paper-3.tif"
2015-12-08 18:53:34.327 java[33741:1234051] *** WARNING: Method userSpaceScaleFactor in class NSWindow is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
2015-12-08 18:53:34.336 java[33741:1234051] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/primaresearch/dla/page/layout/physical/shared/ContentType : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.primaresearch.page.viewer.ui.MainWindow.init(MainWindow.java:51)
at org.primaresearch.page.viewer.PageViewer.<init>(PageViewer.java:79)
at org.primaresearch.page.viewer.PageViewer.main(PageViewer.java:50)
Any suggestions?? Sorry, If I put the question in the wrong place before. Thanks!!
Thanks in advance for your help.
I am new to the Google developer tools and I have been messing around trying to figure out how to get one of their features to work.
This one most specifically:
https://developers.google.com/appengine/docs/java/tools/eclipse#Running_the_Project
So this is how far I've gotten.
I updated my Java package to 1.7. I installed the Google plug in for eclipse.,
I created a new project named "Guestbook", made sure the boxes were checked, run->DebugAs-> WebApplication, and then I get this huge error:
Exception in thread "main" FATAL ERROR in native method: processing of
-javaagent failed java.lang.UnsupportedClassVersionError: com/google/appengine/tools/development/agent/AppEngineDevAgent :
Unsupported major.minor version 51.0 at
java.lang.ClassLoader.defineClass1(Native Method) at
java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) at
java.lang.ClassLoader.defineClass(ClassLoader.java:621) at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at
java.net.URLClassLoader.access$000(URLClassLoader.java:58) at
java.net.URLClassLoader$1.run(URLClassLoader.java:197) at
java.security.AccessController.doPrivileged(Native Method) at
java.net.URLClassLoader.findClass(URLClassLoader.java:190) at
java.lang.ClassLoader.loadClass(ClassLoader.java:306) at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at
java.lang.ClassLoader.loadClass(ClassLoader.java:247) at
sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:280)
at
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:338)
I don't know what all this means.
I am still fairly new to java, so any help would be excellent.
Hope all is well
I'm getting the NoClassDefError when I try to run my program from the command line. It works fine in Netbeans, and javac compiles correctly.
I have a class called DistributedSystem which so far is only supposed to print "hello.".
The directory is src/distributedsystem/ which contains DistributedSystem.java, and DistributedSystem.class after the compile.
If I'm inside src/distributedsystem/ and run
java DistributedSystem
then I get
Exception in thread "main" java.lang.NoClassDefFoundError: DistributedSystem (wrong name: distributedsystem/DistributedSystem)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
I also get the exact same error if I'm inside src/distributedsystem/ and run
java -cp . DistributedSystem
which is what I thought would fix the problem. I have also tried making sure classpath isn't set somewhere else, even though -cp should overwrite it. Anyone have any ideas what could be wrong?
Go to folder src then compile from there and then run
The classpath should point to the base directory. It looks as if you are attempting to run class DistributedSystem in package distributedsystem, but your classpath is set to project/bin/distributedsystem instead of project/bin.
I created a custom jar for a map-reduce app and tried running it in Amazon EMR job flow. I compiled the code in hadoop 1.0.4, however Amazon EMR has support for Hadoop 1.0.3. Also I compiled the code under jdk 1.7, and I am not sure which version of java does Amazon EMR use and where can we change that ?
Here is the stacktrace
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/test/GWASMapReduce : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.hadoop.util.RunJar.main(RunJar.java:180)
It appears that Java 7 isn't supported by Amazon EMR. You'll need to try compiling your jar to to target an older JVM:
javac -target 1.6 -cp .... etc
As per Muel Java 7 is not supported by Amazon EMR and as of today Amazon EMR supports version 1.0.3, 0.20.205.
Java 7 is still not supported on the EMR platform, see here
Its now supported since a while. Minimum is AMI version 2.4. See http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/ami-versions-supported.html