Can't create a new project - 'cannot find 'jar:file'

I’m new to jME and each time I try to create a new project and press the Finish button I just get the following message:

'Cannot find ‘jar:file:/C:/Program%20Files/jMonkeyProjects/jmonkeyplatform/modules/com-jme3-gde-templates.jar!/com/jme3/gde/templates/GradleDesktopGameProject.zip’ .

I am using v3.6.1-stable on windows 11.

It seems like an SDK issue, maybe @tonihele can give you an answer…

[ NOTE ]

The SDK is not the only way to create a JME project. You can create a Gradle project in any IDE of your choice and simply add whatever jme3 dependencies you need.

You can also use the online JME3 initializer to generate the structure of your Gradle project (which is very easy and I highly recommend it) and open it with your preferred IDE (Apache Netbeans, Intellij IDEA, etc.)

1 Like

Thanks, but ideally I wanted to use the SDK for my project.

Hi,

so you got this release Release SDK Release 3.6.1-sdk4 · jMonkeyEngine/sdk · GitHub? And you chose the installer one?

It does work for Windows 10 and Linux at least. Can you attach the IDE log here? After you have tried this creating a new Gradle project. Under View | IDE log.

Edit: also note that if you had any previous version of the SDK:
There is no upgrade path per se, but if you have had any older SDK version on your computer. This new version might fail to start. To fix this you need to delete the following folder (old SDK settings):
C:\Users\user\AppData\Roaming\jmonkeyplatform (Windows)
/home/user/.jmonkeyplatform (Linux)

3 Likes

Hi, yes I installed the most recent release and have tried uninstalling and reinstalling the SDK.
the IDE log:

WARNING [org.openide.filesystems.Ordering]: Not all children in Templates/Project/Maven2/ marked with the position attribute: [settings.xml], but some are: [JavaApp, org-netbeans-modules-maven-newproject-idenative-PomJavaNativeMWI, org-netbeans-modules-maven-newproject-MavenWizardIterator, org-netbeans-modules-maven-newproject-ExistingWizardIterator]
INFO [com.jme3.gde.templates.gradledesktop.options.SemanticPlusTagVersionInfo]: Failed to parse version information from version string -SNAPSHOT
INFO [com.jme3.gde.templates.gradledesktop.options.CachedOptionsContainer]: Failed to acquire version information for Maven artifact MonkeyNetty (com.github.tlf30:monkey-netty)
INFO [com.jme3.gde.templates.gradledesktop.options.CachedOptionsContainer]: Failed to acquire version information for Maven artifact ShaderBlowEx (com.github.polincdev:ShaderBlowEx)
INFO [org.openide.WizardDescriptor]
java.nio.file.NoSuchFileException: C:\Program Files\jMonkeyProjects\jmonkeyplatform\modules\com-jme3-gde-templates.jar
	at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
	at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:53)
	at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(WindowsFileAttributeViews.java:38)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(WindowsFileSystemProvider.java:199)
	at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1428)
	at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:718)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:252)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:181)
	at java.base/java.util.jar.JarFile.<init>(JarFile.java:346)
	at java.base/sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:103)
	at java.base/sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:72)
	at java.base/sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:191)
	at java.base/sun.net.www.protocol.jar.JarFileFactory.getOrCreate(JarFileFactory.java:91)
	at java.base/sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:132)
	at java.base/sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:175)
	at org.netbeans.core.startup.layers.BinaryFS$BFSFile.getInputStream(BinaryFS.java:863)
Caused: java.io.FileNotFoundException: Cannot find 'jar:file:/C:/Program%20Files/jMonkeyProjects/jmonkeyplatform/modules/com-jme3-gde-templates.jar!/com/jme3/gde/templates/GradleDesktopGameProject.zip'
	at org.netbeans.core.startup.layers.BinaryFS$BFSFile.getInputStream(BinaryFS.java:866)
	at org.openide.filesystems.MultiFileObject.getInputStream(MultiFileObject.java:640)
	at org.openide.filesystems.MultiFileObject.getInputStream(MultiFileObject.java:640)
	at com.jme3.gde.templates.gradledesktop.GradleDesktopGameWizardIterator.instantiate(GradleDesktopGameWizardIterator.java:125)
	at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1050)
	at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:602)
	at org.netbeans.modules.project.ui.NewProjectWizard.handleInstantiate(NewProjectWizard.java:51)
	at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:436)
	at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:223)
	at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:135)
	at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1605)
	at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1546)
	at org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:67)
[catch] at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2233)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1420)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2035)
INFO [null]: Last record repeated again.

2 Likes

So it really can’t find the file, nothing else seems to be wrong with it. Is the file really missing? Can you verify this?

Note that JAR files are just ZIP archives, you can open them with i.e. 7-zip.

1 Like

The file exists although on a different path to the one in the error message:

C:\Program Files\jmonkeyplatform\jmonkeyplatform\modules\com-jme3-
gde-templates.jar\com\jme3\gde\templates\GradleDesktopGameProject.zip

Can I ask what is the file path then? Or was that it? To me is looks identical, apart from the casing but that doesn’t matter on Windows.

Yes that’s it. In the error message it is looking in ‘jMonkeyProjects’ which is the folder I created for storing projects in

1 Like

Ah okay, now I see it. Well, one thing you could try… Folders under Program Files are typically protected, as in you would probably need to start the SDK as admin. So I would suggest placing your projects to c:\projects etc if you are old school, or modernly under My Documents somewhere.

The projects folder is placed outside of Program Files already.

One hack you can of course try… Download the ZIP release, or just strip the file from the installation and place it where it wants it to be found. As simple as that.

I don’t unfortunately have a Windows 11 so I don’t think I can troubleshoot this much.

Did you move it after this? Because here it’s inside ‘Program Files’

And it’s not something about spaces in the file path?