JME3 runs without Java installed on computer?

Hello all,

So basically I was updating to Java 8 and something happened so I had to uninstall, opened JME3 moments ago, and tried running my program(yes on purpose, I wanted to see what would happen without Java on JME).

Everything tried to run like normal, and I got only 1 line of the error stack trace I would if I had Java installed. I just got done installing Java8 and the stack trace performed normal(only tried running without Java once, so it’s possible it did the same thing either way).

So what exactly am I asking? Why is JME not throwing errors all over the place with no Java on my system? How can I run my program without Java?

Is it due to JMonkey’s own Libraries and such which are different from Java’s (even though we use Java classes/libraries as well).

Anyone have any idea why everything “seemed okay?”

NOTE: I’m not advocating doing this or anything, I’m just curious “WHY” :slight_smile:

Thanks all… Have a great day.

Can’t say as I only know what you think you saw. A jME application cannot run without Java and the error message you get depends on how you start the app (JAR vs. deployed exe etc.). Generally you can package a JRE with your app, check the options for launch4j in the resources folder.

@normen said: Can't say as I only know what you *think* you saw. A jME application cannot run without Java and the error message you get depends on how you start the app (JAR vs. deployed exe etc.). Generally you can package a JRE with your app, check the options for launch4j in the resources folder.

I just went to “run” in the IDE as I normally would to try and run my application.

The error was a numberFormatException, which is exactly what it was the second time.

First Stack:
java.lang.NumberFormatException: For input string: “.5538462”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

Second Stack:

java.lang.NumberFormatException: For input string: “.5538462”
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:481)
at java.lang.Integer.parseInt(Integer.java:527)
at mygame.planHead.<init>(planHead.java:189)
at mygame.Main.<init>(Main.java:61)
at mygame.Main.main(Main.java:69)

I should have mentioned the stacks are normal, I have an error in my code I need to address, but having the sameish stack is weird(I’ve had times I ran the IDE before with cut off stacks like the first one before, so I believe if I did run it a second time it would have produced a similar stack to either of the 2). I should have done more tests, maybe I’ll uninstall and try again…

I also forgot to mention that on the first stack I clicked “NumberFormatException” and the class popped up(like it normally would), so I would also think that shouldn’t have popped up without Java…

I figured I’d ask just to see what others suggested, the weird world of software :D.

I’m wondering if these 2 issues are related.

All the best Normen, thank you,

~Jason

The SDK comes a Java 1.7u51 JDK that it uses to run. jME3 applications need an installed JVM by default.

1 Like

Also, I’m curious, because the reason I uninstalled Java8 the first time was because I had errors installing Netbeans with Java8. If I tried the bundle it said I was having a Bundle error(which apparently has to do with 32/64-bit). I tried both installs with no go. I also tried installing Java8 first, and the Netbeans from the site… Netbeans gave me an error that said “Incompatible JRE” or something like that. Now that you mention it comes with Java 1.7 Update 51… Is it possible that Netbeans might be having issues because of that(I’ve never had an error installing Netbeans with JMonkey, so is this new, or possibly just unrelated)?

I will uninstall JMonkey and find out…(and hopefully it reinstalls :p).

If somehow this is the reason why, then wow I lucked out making this topic :P(Netbeans Forum hasn’t been of any help).

Thanks again for the help,

~Jason

No, thats not possible, the JDK that the SDK uses isn’t registered in the system.

1 Like
@normen said: No, thats not possible, the JDK that the SDK uses isn't registered in the system.

Oh wells…

So where would this “Default JVM” be if I uninstalled everything? Was something left behind after the uninstall? It might be why I have the “Incompatible JRE” with Netbeans?

I would still think that there would be some sort of issue trying to use the code?

Thanks for the help.

if you open up your command line for your operating system and type “java -version” i believe that is the “default” java installation that is registered with your computer.

are you trying to troubleshoot installing netbeans itself and comparing to your working installation of jmonkey because jmonkey sdk is based off of netbeans? or are you trying to install jmonkey sdk? your posts are starting to confuse me.

@icamefromspace said: if you open up your command line for your operating system and type "java -version" i believe that is the "default" java installation that is registered with your computer.

That will use what ever java program it finds first when searching the path (on Windows at least). In my case, it fails because it’s not set up on my path

@icamefromspace said: if you open up your command line for your operating system and type "java -version" i believe that is the "default" java installation that is registered with your computer.

are you trying to troubleshoot installing netbeans itself and comparing to your working installation of jmonkey because jmonkey sdk is based off of netbeans? or are you trying to install jmonkey sdk? your posts are starting to confuse me.

2 completely different topics which I ended up wondering if they had something to do with each other… I know JME is a fork of Netbeans, but I don’t expect errors to be the same.

I think youre a little confused on the java family of products.

There are two ways to install “java”.

  1. the common way is to install the java runtime envrioment (jre) which includes a java virtual machine (jvm). This is what users need if they only want to run java applications developed by others.

  2. java developers dont usually install the jre package. they install the java development kit (jdk) for the version of java you want to compile your programs in. the jdk includes a jvm for running programs, as well as whatever is needed to build java programs.

If you have no version of either jre or jdk installed, you can not normally run a java application (netbeans itself is a java application). The only exception to this is if the program is packaged such that it includes a jvm within it.

jmonkey sdk includes a jvm (and the whole jdk).

netbeans does not do this. you need to obtain the jdk yourself.