Board logo

Subject: Java Games [Print This Page]

Author: magnanimus    Time: 21-1-2008 05:36 AM     Subject: Java Games

How do i install the java games?? I have a bb 8300.

thanks...
Author: MonkeyBBAdict    Time: 21-1-2008 07:11 AM     Subject: Danm Propriatary Formats

As I understand it the Java Game has to be in ALX or COD format to install properly.  I'm still working on figuring out how to properly convert .jar and .jad files over, so far with no success myself.


Author: magnanimus    Time: 21-1-2008 07:36 AM

The java game has JAR extention, so i canĀ“t upload it with the desktop manager.

How can i do??


Author: amigaman    Time: 12-2-2008 02:56 AM

It's really easy if you can use OTA like getjar.
just go to wap.getjar.com
and download the .jar
but if you want to do it by usb, you need to install black berry JDK (4.1.2)
and use the javaloader command in DOS
of course you need to have .jad or use a program to convert .jar to obtain .jad
you can also try to convert your game in .cod using the RAPC command.
and upload by desktop manager.
Author: xafhl    Time: 12-2-2008 05:18 AM

Attention: you cannot immediate packing JAR to BB;
Usually JAR cannot transform COD directly through the RAPC command, moreover transforms COD cannot install BB
Author: kofman13    Time: 2-3-2008 07:36 AM

can any1 tell me how to adjust screen sizes and key mapping of java games, to work onblackberry
Author: slinec    Time: 29-3-2008 09:33 AM

thanks a lot
Author: tc490225    Time: 13-4-2008 09:48 PM

Here is what I have found out..  Im including some code snippits so we can collobarate on this.  Lets make a script to facilitate the process.  but if you in a huge hurry just place the .JAR on a www server and browse to the .JAR with the BlackBerry Browser and download the >JAR to the phone.  There will be the possibilty that itll get removed by the Desktop Manager since there is not .JAD or .ALX *shrug*  dunno

First..  If you only have a .JAR then youll need to create a .JAD file, there are several .EXE's out there, im using ..
http://www.geocities.com/mangokun/jadmaker/jadmaker.htm

I have found a sample .vbs that has sompossibility..  needs tweaking !

' -- Begin VBS--

Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'se preia directorul aplicatiei
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")

'MsgBox(WScript.ScriptFullName)

Set fs = CreateObject("Scripting.FileSystemObject")
'MsgBox (WshShell.CurrentDirectory)

Set f = fs.GetFolder(WshShell.CurrentDirectory)
Set fc = f.Files
For Each f1 In fc
    If InStr(f1.Name, ".jar") Then
      numeFisier = f1.Name

      WshShell.Run "unzip -jo " & numeFisier & " META-INF/MANIFEST.MF", 1, true

      numeFisier1 = Replace(numeFisier, ".jar", ".jad")

      Set inFile = fs.GetFile(WshShell.CurrentDirectory & "\MANIFEST.MF")
      Set inf = inFile.OpenAsTextStream(ForReading, TristateUseDefault)
'      MyString = inf.ReadAll
      fs.CreateTextFile WshShell.CurrentDirectory & "\" & numeFisier1, True
      Set outFile = fs.GetFile(WshShell.CurrentDirectory & "\" & numeFisier1)
      Set outf = outFile.OpenAsTextStream(ForWriting, TristateUseDefault)
      MyString1=""
                Do While Not inf.AtEndOfStream
                     MyString = inf.ReadLine
                     If instr(MyString,"Manifest-Version") Then
                     ElseIf instr(MyString,"Go-Bible-") Then
                       MyString1 = MyString1 & vbCrLf & MyString
                     ElseIf instr(MyString,":") = 0 Then
                     ElseIf Len(MyString) = 0 Then  
                     Else
                       outf.WriteLine MyString
                     End If
                Loop       
                outf.WriteLine("MIDlet-Jar-URL: " & numeFisier)
                outf.Write("MIDlet-Jar-Size: " & f1.size)               
                outf.Write MyString1
      inf.Close
      outf.Close
    End If

Next
'   MsgBox "cmd /K del " & Chr(34) & WshShell.CurrentDirectory & "\MANIFEST.MF" & Chr(34)
'  WshShell.Run Chr(34) & "del " & WshShell.CurrentDirectory & "\MANIFEST.MF" & Chr(34) , 1, true
'    fs.DeleteFile(WshShell.CurrentDirectory & "\MANIFEST.MF")
Set WshShell = Nothing

' -- End VBS--


I hate running a .EXE from some unknown person so I am going to make a .vbs that will create the .JAR / .ALX and .COD
then use this .bat file I found..
-- Begin BAT

@echo off
cls

:: get jde location
set jde=
set /p jde=what is the complete path to your Blackberry JDE directory?
echo.

:: get jad and jar locations
set sve=
set /p sve=enter the complete path where your jad and jar files are located:
echo.

:: get the name of the jad and jar files
set jar=
set /p jar=what is the name of your jar file?
echo.

:: copy jad and jar files to the jde directory
xcopy "%sve%\%jar%.jad" "%jde%\bin\"
xcopy "%sve%\%jar%.jar" "%jde%\bin\"

::create the cod files
cd /d "%jde%/bin"
pause
rapc import="%jde%\lib\net_rim_api.jar" codename=%jar% -midlet jad=%jar%.jad %jar%.jar
pause

:: move the cod file to the jad and jar directory
move "%jde%\bin\%jar%.*" "%sve%\"
pause


:: change to the new directory
cd /d %sve%

:: create the new alx file

echo ^<loader version="1.0"^> >%jar%.alx
echo ^<application id="%jar%"^> >>%jar%.alx
echo ^<name^>%jar%^</name^> >>%jar%.alx
echo ^<description^>%jar%^</description^> >>%jar%.alx
echo ^<version^> ^</version^> >>%jar%.alx
echo ^<vendor^> ^</vendor^> >>%jar%.alx
echo ^<copyright^> ^</copyright^> >>%jar%.alx
echo ^<fileset Java="1.0"^> >>%jar%.alx
echo ^<files^>%jar%.cod^</files^> >>%jar%.alx
echo ^</fileset^> >>%jar%.alx
echo ^</application^> >>%jar%.alx
echo ^</loader^> >>%jar%.alx
pause

:end

-- End BAT
Author: bb818    Time: 16-4-2008 07:42 PM

Simple change java games resolution!!!
Hi, someone found out, how to change a resolution of java games. You have to open a *.jar file for example in WinRar and than open file "manifest.mf" from folder "META-INF". Than write there this in the end:

Nokia-MIDlet-Original-Display-Size: 176,208
Nokia-MIDlet-Target-Display-Size: 352,416
Author: bazz7777777    Time: 5-5-2008 01:41 AM

ive put .jar and .jad on my 8100 pearl, what i use is use a usb into my computer and phone and say yes to mass storage, and then using desktop manager drag and drop them in a folder. unplug and then go to file in phone and install,and then you should be good to go.
Author: lowellton    Time: 7-3-2011 01:21 AM

use bbsak to convert as simple as that




Welcome to Blackberry Games (http://www.bbsgame.mobi/) Powered by Discuz! 5.0.0