I want to run Siemens LOGO Soft Comfort.
dell#dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$ ./LOGOComfort
Unrecognized option: -Xincgc
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
dell#dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$
This is Siemens LOGO soft comfort 6.1 and I have a license for that. But I have an issue.
Unrecognized option: -Xincgc
So how can I do so latest Java LTS 11 can work with Java from 2008? I assume that is Java SE 6 or J2SE 5.0.
With LOGO software, it comes with two folders bin and lib
Update:
I removed the -Xincgc in LOGOComfort.lax file and now I got this
dell#dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$ ./LOGOComfort
Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)
Stack Trace:
java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at DE.siemens.ad.logo.app.Application.<clinit>(Application.java:141)
at Start.startApplication(Start.java:570)
at Start.main(Start.java:553)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.zerog.lax.LAX.launch(DashoA8113)
at com.zerog.lax.LAX.main(DashoA8113)
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 18 more
This Application has Unexpectedly Quit: Invocation of this Java Application has caused an InvocationTargetException. This application will now exit. (LAX)
dell#dell-Precision-M6400:~/Hämtningar/Logo 6.1/Linux/tools/Application$
Update:
Solution:
Remove -Xincgc
Use Java 8 instead. It requries Swing. Java 11 does not use Swing
open the file 'LOGOComfort', as it is likely a shell script. Find the -Xincgc option and remove it.
If it's gobbledygook, install a java6, which does have the now removed -Xincgc option.
If that's not an option, make a fake java: Make a script that rests at the 'real' java location, and all it does is scan for all command line args, strip -Xincgc from it, and pass the rest through unmolested to the real java. This is a crazy hack and is likely to break other things, but it will probably 'fix' this. I strongly recommend you go with one of the first 2 options first.
There is no way to tell java 11+: Can you 'support' the -Xincgc option.
The error message is saying that it can't find the look and feel profile associated with Windows.
java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
Clearly, this app was intended for Windows in the past. Maybe the script changes the look and feel profile, but I couldn't tell you without looking at it.
Best bet is try this on a Windows machine and see if it goes any further. If not then you'll have to try it with an older JRE that supports that, such as JRE 6.
I know this is a old question, but I still have a solution that may work (it worked for me). You need to make the application java executable by
chmod a+x $PATH_TO_LOGO/Application_64/jre/bin/java
Related
So...I am trying to use CSS for building GUIs to control Tango devices in a Linux server. When running a very simple GUI (just reading voltages from the instrument and updating on a display), the GUI runs, but the process variables are 'disconnected', even though the syntax is correct.
The console gives me the following errors when starting the GUI:
SEVERE [Thread 1] org.csstudio.logging.PluginLogListener (logging) - Unhandled event loop exception
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NoClassDefFoundError: org/omg/CORBA/UserException)
at org.eclipse.swt.SWT.error(SWT.java:4491)
at org.eclipse.swt.SWT.error(SWT.java:4406)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3794)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3433)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
...
Caused by: java.lang.NoClassDefFoundError: org/omg/CORBA/UserException
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
...
Caused by: java.lang.ClassNotFoundException: org.omg.CORBA.UserException cannot be found by tangorb-jacorbfree_9.2.2
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 62 more
And the following errors when closing the GUI window:
SEVERE [Thread 1] org.csstudio.logging.PluginLogListener (logging) - Error disposing widget for : org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl OPI View
java.lang.NullPointerException
at org.csstudio.opibuilder.editparts.AbstractBaseEditPart.deactivate(AbstractBaseEditPart.java:315)
at org.csstudio.opibuilder.editparts.AbstractContainerEditpart.deactivate(AbstractContainerEditpart.java:291)
at org.csstudio.opibuilder.editparts.DisplayEditpart.deactivate(DisplayEditpart.java:181)
at org.eclipse.gef.editparts.AbstractEditPart.deactivate(AbstractEditPart.java:293)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.deactivate(AbstractGraphicalEditPart.java:354)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.unhookControl(AbstractEditPartViewer.java:768)
at org.eclipse.gef.ui.parts.GraphicalViewerImpl.unhookControl(GraphicalViewerImpl.java:442)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.setControl(AbstractEditPartViewer.java:634)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer.handleDispose(AbstractEditPartViewer.java:222)
at org.eclipse.gef.ui.parts.GraphicalViewerImpl.handleDispose(GraphicalViewerImpl.java:109)
at org.eclipse.gef.ui.parts.AbstractEditPartViewer$2.widgetDisposed(AbstractEditPartViewer.java:436)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:123)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1334)
at org.eclipse.swt.widgets.Widget.release(Widget.java:1138)
at org.eclipse.swt.widgets.Control.release(Control.java:3814)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:1376)
at org.eclipse.swt.widgets.Widget.release(Widget.java:1141)
at org.eclipse.swt.widgets.Control.release(Control.java:3814)
at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:1376)
at org.eclipse.swt.widgets.Widget.release(Widget.java:1141)
at org.eclipse.swt.widgets.Control.release(Control.java:3814)
at org.eclipse.swt.widgets.Widget.dispose(Widget.java:478)
at org.eclipse.e4.ui.workbench.renderers.swt.SWTPartRenderer.disposeWidget(SWTPartRenderer.java:177)
at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.disposeWidget(ContributedPartRenderer.java:272)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeRemoveGui(PartRenderingEngine.java:914)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$1(PartRenderingEngine.java:842)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$3.run(PartRenderingEngine.java:837)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
...
When I google about it, (I believe) I could already rule out some common scenarios:
Problem with gtk 3: my cs-studio ini file has this line forcing to use gtk 2.
Wrong java class path: checking the installation details/configurations of CSS, the java class path is set correctly.
Now, the two following cases may be more likely:
Deprecated CORBA classes after JDK 8 (released 2012): it seems after JDK 8 some corba class definitions were removed, maybe affecting any calls of dependencies. Well, that could be possible, but these GUIs have been developed and used after 2018 in JDK 11 (though on a Windows machine with local instruments, and now I am trying on remote tango servers on a Debian 10 machine). Why should it be still calling deprecated corba classes at this point?
Missing *.jar files related to SWT in the plug-ins folder: when checking for these files, I just find org.eclipse.swt.gtk.linux.x86_64_3.104.2.v20160212-1350.jar and org.eclipse.swt_3.104.2.v20160212-1350.jar. However (from: Eclipse FAQ):
Q: Why do I get the error "java.lang.NoClassDefFoundError: org/eclipse/swt/internal/XXX/OS."?
A: On some platforms such as GTK, SWT is broken into multiple jars. Therefore, you must ensure that all required jars are on the classpath. The required jars are:
swt.jar (all platforms)
swt-pi.jar (some platforms like GTK and Carbon)
swt-mozilla.jar (for Browser widget on GTK and Motif)
swt-gtk.jar (on Linux Motif)
So far I haven't found out how to download these files. Anyone?
Anyway, could this be it? Did anyone experience any of these issues?
I appreciate any help.
Cheers!
I tried installing Commandbox from Ortus by downloading the zip file that also contains the JRE. This landed in the Downloads folder on my Mac running OSX Sierra. I unzipped it and tried running box. It first initialized stuff, then ran fine.
The installation tip here: https://ortus.gitbooks.io/commandbox-documentation/content/setup/installation.html
suggests placing the box binary in /usr/bin. I tried but couldn't. I even tried using sudo to mv it but it said I was not permitted.
SO then I decided to use the Homebrew method of installation. I installed Homebrew. When installation was complete, I then ran "brew install commandbox". It completed ok. I then typed "which box" to see which one it would find, the one in my Downloads dir or another. It showed it was in /usr/local/bin/box. Seems to be ok.
I then ran box. It crashes and burns!
$ box
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:205)
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:705)
Caused by: java.lang.NoClassDefFoundError: sun/misc/VM
at lucee.commons.collection.Hashing.randomHashSeed(Hashing.java:263)
at lucee.commons.collection.HashMapPro.<init>(HashMapPro.java:195)
at lucee.commons.collection.HashMapPro.<init>(HashMapPro.java:236)
at lucee.commons.collection.LinkedHashMapPro.<init>(LinkedHashMapPro.java:70)
at lucee.runtime.type.StructImpl.<init>(StructImpl.java:82)
at lucee.runtime.type.StructImpl.<init>(StructImpl.java:68)
at lucee.runtime.type.scope.ScopeSupport.<init>(ScopeSupport.java:85)
at lucee.runtime.type.scope.ArgumentImpl.<init>(ArgumentImpl.java:67)
at lucee.runtime.PageContextImpl.<init>(PageContextImpl.java:263)
at lucee.runtime.CFMLFactoryImpl.getPageContextImpl(CFMLFactoryImpl.java:154)
at lucee.runtime.CFMLFactoryImpl.getLuceePageContext(CFMLFactoryImpl.java:140)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:435)
at lucee.runtime.engine.CFMLEngineImpl.cli(CFMLEngineImpl.java:760)
at lucee.loader.engine.CFMLEngineWrapper.cli(CFMLEngineWrapper.java:267)
at luceecli.CLIMain.run(CLIMain.java:223)
... 6 more
Caused by: java.lang.ClassNotFoundException: sun.misc.VM
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at lucee.loader.classloader.LuceeClassLoader.loadClass(LuceeClassLoader.java:173)
at lucee.loader.classloader.LuceeClassLoader.loadClass(LuceeClassLoader.java:138)
... 21 more
Cause:
java.lang.NoClassDefFoundError: sun/misc/VM
at lucee.commons.collection.Hashing.randomHashSeed(Hashing.java:263)
at lucee.commons.collection.HashMapPro.<init>(HashMapPro.java:195)
at lucee.commons.collection.HashMapPro.<init>(HashMapPro.java:236)
at lucee.commons.collection.LinkedHashMapPro.<init>(LinkedHashMapPro.java:70)
at lucee.runtime.type.StructImpl.<init>(StructImpl.java:82)
at lucee.runtime.type.StructImpl.<init>(StructImpl.java:68)
at lucee.runtime.type.scope.ScopeSupport.<init>(ScopeSupport.java:85)
at lucee.runtime.type.scope.ArgumentImpl.<init>(ArgumentImpl.java:67)
at lucee.runtime.PageContextImpl.<init>(PageContextImpl.java:263)
at lucee.runtime.CFMLFactoryImpl.getPageContextImpl(CFMLFactoryImpl.java:154)
at lucee.runtime.CFMLFactoryImpl.getLuceePageContext(CFMLFactoryImpl.java:140)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:435)
at lucee.runtime.engine.CFMLEngineImpl.cli(CFMLEngineImpl.java:760)
at lucee.loader.engine.CFMLEngineWrapper.cli(CFMLEngineWrapper.java:267)
at luceecli.CLIMain.run(CLIMain.java:223)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:205)
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:705)
Caused by: java.lang.ClassNotFoundException: sun.misc.VM
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
at lucee.loader.classloader.LuceeClassLoader.loadClass(LuceeClassLoader.java:173)
at lucee.loader.classloader.LuceeClassLoader.loadClass(LuceeClassLoader.java:138)
... 21 more
I have no idea what to do now to fix this.
I suspect it may have fouled up things when I ran box from the Downloads folder, not realizing it would initialize stuff. I deleted the Downloads version containing both the box binary and the JRE folder and emptied the Trash.
Any suggestions on how to get Commandbox up and running now?
I just did some local testing and confirmed that you're on Java 9 which isn't supported right now by CommandBox. The fix is easy and you can leave Java 9 installed as the main JVM for your PC. What you need to do is take the JRE folder that you downloaded before, or just download a server version of Java 8 and rename the folder to JRE. Then place that folder in the same directory as the box binary.
When CommandBox first starts, it checks to see if there is a folder called JRE in the same folder, and if so it uses it. If it doesn't find the folder, then it will fall back to the general version of Java your operating system has installed.
Since Java 9 is popping up more in the wild, I'll see about getting a check for it put into CommandBox to alert people with a more useful message. We already have a similar check in place, but it only looks for Java versions less then 7.
I recently--as in, today--became interested in learning to program with clojure. Now after having installed the latest version of java's jdk and downloading the leiningen script, I followed the installation instructions for the latter, specifically those given at: http:/www.lispcast.com/clojure-ubuntu.
Now, after the running lein version and downloading the relevant jar file, the program exits with an error about a class not being found. The error in question reads as follows:
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)>
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForName(RT.java:2177)
at clojure.lang.RT.loadClassForName(RT.java:2196)
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core__init.load(Unknown Source)
at clojure.core__init.(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForName(RT.java:2177)
at clojure.lang.RT.loadClassForName(RT.java:2196)
at clojure.lang.RT.load(RT.java:443)
at clojure.lang.RT.load(RT.java:419)
at clojure.lang.RT.doInit(RT.java:461)
at clojure.lang.RT.(RT.java:331)
at clojure.main.(main.java:20)
Caused by: java.lang.ClassNotFoundException: java/sql/Timestamp
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:375)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForNameNonLoading(RT.java:2181)
at clojure.instant$loading__5569__auto____6869.invoke(instant.clj:9)
at clojure.instant__init.load(Unknown Source)
at clojure.instant__init.(Unknown Source)
... 23 more
My java 9 jdk is installed in /usr/lib/jvm/java-9-oracle/bin/java, with my JAVA_HOME variable set to /usr/lib/jvm/java-9-oracle but I tried /usr/lib/jvm/java-9-oracle/bin as well, just in case. I am running xubuntu 16.04.3, if this is of any importance. I did try setting the default java jdk back to the openjdk which is bundled with xubuntu but this also was to no avail.
As an aside, the entire problem originated because I tried running the REPL
in intellij after installing the cursive plugin, which didn't work. I then surmised that it might be because I had not installed leiningen beforehand (I thought that the IDE and cursive would have this bundled along). However, the actual information on what intellij and clojure require to run successfully has eluded me, since much of the information is rather 'scattered' and I'm not sure whether I missed something along the way.
In any case, I am having quite a hard time of getting everything to work--probably because I'm not yet that savvy when it comes to these kinds of issues, having only been on a linux distro for a short while as well as being completely unfamiliar with clojure. If I'm missing something obvious, I apologize, but it stands to reason that something can only be obvious once it is shown to be so.
Any and all suggestions will be greatly appreciated.
That looks like a problem caused by Java 9's new concept of "modules": Clojure expects to be able to access java.sql.Timestamp, but it can't. I haven't kept up with Java development or Clojure development, so I can't say for sure that's your problem, but it looks that way to me. Try with an earlier JDK.
If you cant downgrade your JAVA version, run lein upgrade 2.8.1 or the latest Leiningen would do. Leiningen has been updated to include support for Java 9.
I'm using JNA 4.2.1 to access Windows Registry from Java (unfortunately it's only way to get the list of paired Bluetooth devices). It was working okay, until Windows 10 has installed some updates, now I have the following problem:
com.sun.jna.platform.win32.Win32Exception: The system cannot find the
file specified. at
com.sun.jna.platform.win32.Advapi32Util.registryGetValues(Advapi32Util.java:1649)
at IntelleWave.Devices.Device.getCOMportByBTUID(Device.java:243) at
IntelleWave.Devices.Device.getBTDeviceInstances(Device.java:163) at
IntelleWave.Devices.Device.getDeviceInstances(Device.java:112) at
IntelleWave.Devices.Device.(Device.java:72) at
IntelleWave.Devices.DeviceEnumerator.InitDevices(DeviceEnumerator.java:101)
at
IntelleWave.SettingsScreenController.UpdateDeviceList(SettingsScreenController.java:662)
at
IntelleWave.SettingsScreenController.initialize(SettingsScreenController.java:153)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548) at
javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) at
javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) at
IntelleWave.ScreensController.loadScreen(ScreensController.java:46)
at IntelleWave.IntelleWave.init(IntelleWave.java:175) at
com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:841)
at
com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)
For me it looks strange that I see Win32 Exception but in fact I have a Windows 64. Maybe problem related to that difference and I have to tell JNI to use x64 library (Advapi32Util)?
could you please advice.
For 3 days now, I have been trying to install glassfish 4.1 on eclipse Luna version 4.4.1. I first installed the plugin from eclipse marketplace then added it in my runtime using jdk 8. I also made jdk my default since eclipse default uses jre. I have to point out that I have been been using glassfish on netbeans and tomcat on eclipse but I decided to play around with glassfish on eclipse. Every information I got on the internet didn't fix my issue.
Below is the error I got in the console. Right now, this is driving me nuts so I have decided to come to you for direction.
Thanks
Launching GlassFish on Felix platform
ERROR: Unable to create cache directory: C:\Program Files\glassfish-4.1\glassfish\domains\domain1\osgi-cache\felix
ERROR: Error creating bundle cache. (java.lang.RuntimeException: Unable to create cache directory.)
java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Exception in thread "Thread-1" java.lang.RuntimeException: org.osgi.framework.BundleException: Error creating bundle cache.
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:90)
Caused by: org.osgi.framework.BundleException: Error creating bundle cache.
at org.apache.felix.framework.Felix.init(Felix.java:645)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiFrameworkLauncher$1.run(OSGiFrameworkLauncher.java:88)
Caused by: java.lang.RuntimeException: Unable to create cache directory.
at org.apache.felix.framework.cache.BundleCache.<init>(BundleCache.java:131)
at org.apache.felix.framework.Felix.init(Felix.java:640)
... 1 more
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: org.glassfish.embeddable.GlassFishException: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:170)
at org.glassfish.embeddable.GlassFishRuntime._bootstrap(GlassFishRuntime.java:157)
at org.glassfish.embeddable.GlassFishRuntime.bootstrap(GlassFishRuntime.java:110)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:112)
... 6 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.newFramework(OSGiGlassFishRuntimeBuilder.java:241)
at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishRuntimeBuilder.build(OSGiGlassFishRuntimeBuilder.java:135)
... 9 more
Error stopping framework: java.lang.NullPointerException
java.lang.NullPointerException
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher$1.run(GlassFishMain.java:203)
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Run Eclipse or any other IDE you use in Administrator mode.
Works for me.
I think your comment deserves to be posted as the main answer but I have been trying to mark your comment as answer but I wash't able to. So I decided to post post your comment here and then back it up with my own experience.
Answer by unwichtich:
I guess this is a similar problem. The cause may be that you have installed Glassfish in c:\Program Files. You can try to move your Glassfish installation to a directory where your normal user account has full access rights but you then have to change the path to the Glassfish installation in Eclipse.
My own experience:
Turns out that all the problems I had with the glassfish server (including exit code 1 error) was because glassfish could not handle folder names with spaces in it. So I moved the glassfish-4.1 folder from C:\Program File\glassfish-4.1.. path to C:\ glassfish-4.1.. It wiped all my tears away. This is really important in eclipse and netbeans IDEs (if you are installing the netbeans that does not come with a glassfish bundled zip).
I had the same problem and fixed it by installing Glassfish under C:\ instead of C:\Program Files. Try that.
use JDk 7 instead of JDK 8 am also faced the same issue i just changed to jdk7 its working now.