Minecraft in Wine

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
OakRaider4Life
Newbie
Newbie
Posts: 2
Joined: Wed Feb 15, 2012 8:27 pm

Minecraft in Wine

Post by OakRaider4Life »

I'm currently running a Windows version of Minecraft in Wine (don't ask why...), and wanted to know if there was a way to configure the java virtual machine which is run in wine so as to run Minecraft in a ramdisk machine. I know if I was running a linux native version, I could use the command

Code: Select all

java -Xmx[Memory] -Xms[Memory] -jar [/path/to/minecraft]
What I would like to be able to do is configure my java VM in wine similarly... any tips?
xyz32
Level 2
Level 2
Posts: 19
Joined: Sun Jul 24, 2011 8:06 am

Post by xyz32 »

Wow, this is... Confusing.
There is no windows/linux version of a java application. Just JVM is aware of the OS, the application is not.

In fedora you have the "alternatives" tool.

eg:
$> alternatives --config java

You can add the wine java as an alternative whit the --install option and then set it as default.

I think this is what your question was about.

Regards.
Martin Gregorie

Minecraft in Wine

Post by Martin Gregorie »

On Thu, 2012-02-16 at 07:46 -0600, xyz32 wrote:
Wow, this is... Confusing.
There is no windows/linux version of a java application. Just JVM is
aware of the OS, the application is not.
That's true for pute Java apps, but there are applications out there
that depend on JNI, which allows native code to be included as part of
it. These are seldom, if ever, portable between operating systems.
In fedora you have the "alternatives" tool.
... and most other Linuxes and many Unices too, probably, but I don't
think its relevant here. Its use is to allow a seamless switch between
functionally identical Linux/UNIX services, such as the sendmail and
Postfix mail servers (MTAs). To be useful the services must have
identical interfaces for both programs and users. For instance, all MTAs
communicate for the SMTP protocol and, because sendmail (the archetype
of MTAs), provides the 'sendmail' command line utility which can be used
by programs as well as people to send mail messages, every alternative
to the sendmail MTA has to provide such a program and it must have
identical functionality to the Sendmail sendmail or using an alternative
such as Postfix or Qmail would break the system.

You'll notice that 'alternatives', correctly, doesn't deal with
databases. This is because they all have their own SQL dialect and these
are mutually incompatible to a greater or lesser extent, with Oracle and
MySQL being the most deviant dialects.

There is a set of Java alternatives, but this seems to be restricted to
OpenJava and gcj. Oracle/Sun Java, which I use, is not an available
alternative. Fortunately I can easily tune OpenJava out by adjusting its
place in the PATH list, so alternatives becomes irrelevant for this
switch.

Martin
xyz32
Level 2
Level 2
Posts: 19
Joined: Sun Jul 24, 2011 8:06 am

Post by xyz32 »

Oh, so you want to run the java application using the nativ JVM and run the JNI using wine?

If that is so, then I don't have any idea.

Regards.
OakRaider4Life
Newbie
Newbie
Posts: 2
Joined: Wed Feb 15, 2012 8:27 pm

Post by OakRaider4Life »

Sorry for the confusion... I'll try to be a bit more clear in what I'm asking.

If I was running a native linux version of Minecraft, in order to set the memory usage for the JVM running Minecraft, I understand that I would only need to run the command

Code: Select all

java -Xmx[Memory] -Xms[Memory] -jar [/path/to/minecraft] 
However, I'm just tooling around a little bit just to see how well I can get a Windows version running on wine, so I am trying to figure out how to set Wine to do the same thing with the JVM when it runs Minecraft.

I should probably make sure to be clear that running Minecraft in wine require running a windows native version of Java, so I'm using the Windows version of SunJava.

So what I am trying to figure out how to do is configure a JVM in SunJava run through Wine, and then force my Minecraft.exe to run using that JVM.
Martin Gregorie

Minecraft in Wine

Post by Martin Gregorie »

On Thu, 2012-02-16 at 12:26 -0600, OakRaider4Life wrote:
So what I am trying to figure out how to do is configure a JVM in
SunJava run through Wine, and then force my Minecraft.exe to run using
that JVM.
Install the Windows JVM in a Wine prefix. Then you should be able to run
it with a command somewhat like:

wine java -Xmx[Memory] -Xms[Memory] -jar [/path/to/minecraft]

though of course it would be a good idea to start by running some pure
Java app or game under the Windows Java to confirm that the JVM works OK
under Wine. Then you'll have a fairly clear indication that the problem
is in the JNI part of Minecraft if it falls over.

Martin
Locked