Skip to main content

phoneME Feature: javaport FileNotFoundException error

8 replies [Last post]
ebresie
Offline
Joined: 2003-08-06
Points: 0

Hey folks, I am trying to build the MR4 of phoneME Feature and have a problem following configurator compilation.

I am using the following batch file (which is based on the "Getting Started" suggestions for setting up the build environment)

======================
REM
REM Setting Build Variables
REM

REM Setup VIsual Studios Build Environments
call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"

REM If not already set, set your COMPONENTS_DIR environment variable to the directory location where you install the phoneme_feature software.
REM set COMPONENTS_DIR=E:/src/phoneME/feature/mr4/phoneme_feature
REM -- Used the following to get past "target not found %" issue
set COMPONENTS_DIR=/cygdrive/e/src/phoneME/feature/mr4/phoneme_feature

REM Create the directory build_output as a folder and set the BUILD_OUTPUT_DIR variable.
set BUILD_OUTPUT_DIR=%COMPONENTS_DIR%/build

REM Set the JDK_DIR variable.
REM Note: As shown in this command line, the JDK_DIR path must be set using Linux (forward) slashes.
REM set JDK_DIR=C:/java/j2sdk1.6.0_07
REM set JDK_DIR=C:/Program Files/Java/jdk1.6.0_13
REM set JDK_DIR=/cygdrive/c/Program Files/Java/jdk1.6.0_13
REM set JDK_DIR=C:/PROGRA~1/Java/JDK16~3.0_1
REM - Used following to get past "C:\Program " issue.
set JDK_DIR=/cygdrive/c/PROGRA~1/Java/JDK16~3.0_1

REM Set the CYG4ME variable, as shown here:
REM -Using Cygwin instead of cyg4me
set CYG4ME=E:\cygwin

REM Add Cyg4Me and JDK_DIR to your PATH environment variable. Make the bin directory of your Cyg4Me installation the first element of your PATH, as shown here.
set PATH=%CYG4ME%\bin;%JDK_DIR%/bin;%PATH%

REM BuildDir = The location of your phoneME Feature build directory.
REM For example, BuildDir=%COMPONENTS_DIR%/javacall-com/configuration/phoneMEFeature/win32_emul.
set BuildDir=%BUILD_OUTPUT_DIR%

REM JAVACALL_DIR = Specifies the location of the base JavaCall API source code and makefiles, which contains MIDP and specific optional packages, including the following:
REM Java Wireless Messaging (JSR 120)
REM Mobile Media API (JSR 135)
REM Security and Trust Services (JSR 177)
REM Content Handler API (JSR 211)
REM
REM For example, JAVACALL_DIR=%COMPONENTS_DIR%/javacall.
set JAVACALL_DIR=%COMPONENTS_DIR%/javacall

REM PROJECT_JAVACALL_DIR
REM
REM Specifies the location of additional JavaCall API source code and makefiles, which includes additional optional packages, including the following:
REM
REM Personal Information and File Management (JSR 75)
REM Bluetooth (JSR 82)
REM Location API (JSR 179)
REM Wireless Messaging (JSR 205)
REM Advanced Multimedia Supplements (JSR 234)
REM Mobile Sensor API (JSR 256)
REM
REM For example, PROJECT_JAVACALL_DIR=%COMPONENTS_DIR%/javacall-com.
set PROJECT_JAVACALL_DIR=%COMPONENTS_DIR%/javacall-com

REM JAVACALL_OUTPUT_DIR
REM Defines the directory where the build system places its output. For example, JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall.
REM
set JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall

REM USE_MULTIPLE_ISOLATES
REM Required for phoneME Feature to support multitasking.
REM Must be set to true. If not explicitly set to true, the build defaults to false and phoneME Feature is built without multitasking capability.
REM set USE_MULTIPLE_ISOLATES=true
REM
REM Note: If you set USE_MULTIPLE_ISOLATES=true to build the JavaCall porting layer and phoneME Feature software client,
REM you must also set ENABLE_ISOLATES=true to build CLDC, as described in Building a CLDC Reference Port.
REM set ENABLE_ISOLATES=true

REM TOOLS_DIR
REM Defines the directory where needed build tools are located. For example, TOOLS_DIR=%COMPONENTS_DIR%/tools.
set TOOLS_DIR=%COMPONENTS_DIR%/tools

REM TOOLS_OUTPUT_DIR
REM Defines a directory location for tools-specific output. For example, TOOLS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/tools.
set TOOLS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/tools

REM USE_VS2005
REM Tells the build system to use Microsoft Visual Studio 2005 as the default compiler setting, as shown here: USE_VS2005=true.
REM
REM Note: If Microsoft Visual Studio 2005 is your default compiler, you do not need to set this variable.
REM USE_VS2005=true is set for you in the MR4 build scripts. However, if you are using
REM some other compiler (which is possible, but not supported, in MR4), you must set this variable to USE_VS2005=false.
REM set USE_VS2005=false

REM USE_OUTPUT_REDIRECTION
REM Supports the use of the emulator binary plugin. For example, USE_OUTPUT_REDIRECTION=true.
set USE_OUTPUT_REDIRECTION=true

====

I use the following from the "Building the JavaCall Porting Layer" documentation:

"To build an implementation of the JavaCall porting layer, take the following steps:

Set the BuildDir variable, as shown here:
C:\> set BuildDir=%COMPONENTS_DIR%/javacall-com/configuration/phoneMEFeature/win32_emul

Run the make command as a single command-line string, as shown here, using the -C option.
C:\> make -C %BuildDir% JAVACALL_DIR=%COMPONENTS_DIR%/javacall PROJECT_JAVACALL_DIR=%COMPONENTS_DIR%/javacall-com JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall USE_MULTIPLE_ISOLATES=true TOOLS_DIR=%COMPONENTS_DIR%/tools TOOLS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/tools USE_OUTPUT_REDIRECTION=true
"

And I get

E:\src\phoneME>make -C %BuildDir% JAVACALL_DIR=%COMPONENTS_DIR%/javacall PROJECT
_JAVACALL_DIR=%COMPONENTS_DIR%/javacall-com JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DI
R%/javacall USE_MULTIPLE_ISOLATES=true TOOLS_DIR=%COMPONENTS_DIR%/tools TOOLS_OU
TPUT_DIR=%BUILD_OUTPUT_DIR%/tools USE_OUTPUT_REDIRECTION=true
make: Entering directory `/cygdrive/e/src/phoneME/feature/mr4/phoneme_feature/ja
vacall-com/configuration/phoneMEFeature/win32_emul'
java.io.FileNotFoundException: e:\cygdrive\e\src\phoneME\feature\mr4\phoneme_fea
ture\build\javacall\properties.xml (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at java.io.FileInputStream.(FileInputStream.java:66)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection
.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
nection.java:161)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrent
Entity(XMLEntityManager.java:653)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineD
ocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:771)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
ML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
java:107)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.
java:225)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Doc
umentBuilderImpl.java:283)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:208)
at com.sun.xml.transform.CodeTransformerImpl.transform(CodeTransformer.j
ava:313)
at com.sun.xml.transform.CodeTransformer.main(CodeTransformer.java:105)
make: *** [/cygdrive/e/src/phoneME/feature/mr4/phoneme_feature/build/javacall/jw
c_properties.ini] Error 1
make: Leaving directory `/cygdrive/e/src/phoneME/feature/mr4/phoneme_feature/jav
acall-com/configuration/phoneMEFeature/win32_emul'

I believe this to be an issue with a mixture of drive info, specifically around the "e:/cygdrive/e" area.

Does anyone have a suggestion on getting past this?

Eric

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ebresie
Offline
Joined: 2003-08-06
Points: 0

Where is the fixcygpath macro? Is that a cygwin item or a phoneME macro?

Eric

ole00
Offline
Joined: 2008-10-14
Points: 0

it's defined here: phoneme_feature/cldc/build/share/cw/alt_compiler.make

Ole

danila
Offline
Joined: 2006-09-25
Points: 0

It looks like JDK version mismatch. Try to build with JDK 1.4.x

ebresie
Offline
Joined: 2003-08-06
Points: 0

I ask this every time...but as 1.4 is basically EOL (unless you pay) and current JDK is 1.6.x (with 7 in the works)...when will an update occur to support a newer version of Java? With OpenJDK and phoneME available (both open source), I would figure this would make things a little easier.

Eric

ebresie
Offline
Joined: 2003-08-06
Points: 0

I figure this is a path issue so I decided to try going full cygwin based...so I changed my bat file to a sh as follows:

#!/bin/sh
#
# Setting Build Variables
#

# Setup VIsual Studios Build Environments
##call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"

# If not already set, set your COMPONENTS_DIR environment variable to the directory location where you install the phoneme_feature software.
# set COMPONENTS_DIR=E:/src/phoneME/feature/mr4/phoneme_feature
# set COMPONENTS_DIR=E:/src/phoneME/feature/mr4/phoneme_feature
#export COMPONENTS_DIR=/cygdrive/e/src/phoneME/feature/mr4/phoneme_feature
export COMPONENTS_DIR=/src/phoneME/feature/mr4/phoneme_feature

# Create the directory build_output as a folder and set the BUILD_OUTPUT_DIR variable.
export BUILD_OUTPUT_DIR=$COMPONENTS_DIR/build

# Set the JDK_DIR variable.
# Note: As shown in this command line, the JDK_DIR path must be set using Linux (forward) slashes.
# set JDK_DIR=C:/java/j2sdk1.6.0_07
# set JDK_DIR=C:/Program Files/Java/jdk1.6.0_13
# set JDK_DIR=/cygdrive/c/Program Files/Java/jdk1.6.0_13
# set JDK_DIR=C:/PROGRA~1/Java/JDK16~3.0_1
export JDK_DIR=/cygdrive/c/PROGRA~1/Java/JDK16~3.0_1

# Set the CYG4ME variable, as shown here:
#export CYG4ME=E:\cygwin
export CYG4ME=/cygdrive/e/cygwin

# Add Cyg4Me and JDK_DIR to your PATH environment variable. Make the bin directory of your Cyg4Me installation the first element of your PATH, as shown here.
export PATH=$CYG4ME/bin:$JDK_DIR/bin:$PATH

# BuildDir = The location of your phoneME Feature build directory.
# For example, BuildDir=%COMPONENTS_DIR%/javacall-com/configuration/phoneMEFeature/win32_emul.
export BuildDir=$BUILD_OUTPUT_DIR

# JAVACALL_DIR = Specifies the location of the base JavaCall API source code and makefiles, which contains MIDP and specific optional packages, including the following:
# Java Wireless Messaging (JSR 120)
# Mobile Media API (JSR 135)
# Security and Trust Services (JSR 177)
# Content Handler API (JSR 211)
#
# For example, JAVACALL_DIR=%COMPONENTS_DIR%/javacall.
export JAVACALL_DIR=$COMPONENTS_DIR/javacall

# PROJECT_JAVACALL_DIR
#
# Specifies the location of additional JavaCall API source code and makefiles, which includes additional optional packages, including the following:
#
# Personal Information and File Management (JSR 75)
# Bluetooth (JSR 82)
# Location API (JSR 179)
# Wireless Messaging (JSR 205)
# Advanced Multimedia Supplements (JSR 234)
# Mobile Sensor API (JSR 256)
#
# For example, PROJECT_JAVACALL_DIR=%COMPONENTS_DIR%/javacall-com.
export PROJECT_JAVACALL_DIR=$COMPONENTS_DIR/javacall-com

# JAVACALL_OUTPUT_DIR
# Defines the directory where the build system places its output. For example, JAVACALL_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/javacall.
#
export JAVACALL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/javacall

# USE_MULTIPLE_ISOLATES
# Required for phoneME Feature to support multitasking.
# Must be set to true. If not explicitly set to true, the build defaults to false and phoneME Feature is built without multitasking capability.
# set USE_MULTIPLE_ISOLATES=true
#
# Note: If you set USE_MULTIPLE_ISOLATES=true to build the JavaCall porting layer and phoneME Feature software client,
# you must also set ENABLE_ISOLATES=true to build CLDC, as described in Building a CLDC Reference Port.
# set ENABLE_ISOLATES=true

# TOOLS_DIR
# Defines the directory where needed build tools are located. For example, TOOLS_DIR=%COMPONENTS_DIR%/tools.
export TOOLS_DIR=$COMPONENTS_DIR/tools

# TOOLS_OUTPUT_DIR
# Defines a directory location for tools-specific output. For example, TOOLS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%/tools.
export TOOLS_OUTPUT_DIR=$BUILD_OUTPUT_DIR/tools

# USE_VS2005
# Tells the build system to use Microsoft Visual Studio 2005 as the default compiler setting, as shown here: USE_VS2005=true.
#
# Note: If Microsoft Visual Studio 2005 is your default compiler, you do not need to set this variable.
# USE_VS2005=true is set for you in the MR4 build scripts. However, if you are using
# some other compiler (which is possible, but not supported, in MR4), you must set this variable to USE_VS2005=false.
# set USE_VS2005=false
export USE_VS2005=false

# USE_OUTPUT_REDIRECTION
# Supports the use of the emulator binary plugin. For example, USE_OUTPUT_REDIRECTION=true.
export USE_OUTPUT_REDIRECTION=true

export USE_ABSTRACTIONS=true
export ABSTRACTIONS_DIR=$COMPONENTS_DIR/abstractions

export USE_XMLPARSER=true
export XMLPARSER_DIR=$COMPONENTS_DIR/xmlparser

---

Then execute:

$ export BuildDir=/src/phoneME/feature/mr4/phoneme_feature/javacall-com/configu
ration/phoneMEFeature/win32_emul

$ echo $BuildDir
/src/phoneME/feature/mr4/phoneme_feature/javacall-com/configuration/phoneMEFeature/win32_emul

$ make -C $BuildDir JAVA_CALL_DIR=$COMPONENTS_DIR/javacall PROJECT_JAVACALL_DIR=$COMPONENTS_DIR/javacall-com JAVACALL_OUTPUT_DIR=$BUILD_OUTPUT_DIR/javacall USE_MULTIPLE_ISOLATES=true TOOLS_DIR=$COMPONENTS_DIR/tools TOOLS_OUTPUT_DIR=$BUILD_OUTPUT_DIR/tools USE_OUTPUT_REDIRECTION=true

Which eventual gives me:

make: Entering directory `/src/phoneME/feature/mr4/phoneme_feature/javacall-com/configuration/phoneMEFeature/win32_emul'
...compiling: /bin/sh: cl.exe: command not found
make: *** [/src/phoneME/feature/mr4/phoneme_feature/build/javacall/obj/limeio.ob
j] Error 127
make: Leaving directory `/src/phoneME/feature/mr4/phoneme_feature/javacall-com/configuration/phoneMEFeature/win32_emul'

I did not use the VS environment bat file, so I suspect this is a need for some VS related tools that are no longer accessible.

I tried setting CC=gcc and also CC=cc which got me further but then encountered a whole bunch of "unrecognized options" like "-nologo" "-EHsc" "-Foe", "-fp", "-Fd". I suspect there are options for VS version not included in gcc versions.

Does anyone have any suggestions on how do I get around this?

Does this have anything to do with the fact that I am using the javacall-com/configuration/phoneMEFeature/win32_emul configuration files? To use cygwin would there need another set of configuration files?

Are there any suggestions on how to compile pure with cygwin without VS?

Eric

ebresie
Offline
Joined: 2003-08-06
Points: 0

Adding the cygpath path for the VS executables which includes the cl.exe gets me past this error (although this prevents a "pure cygwin build") but then I have the following:

$ make -C $BuildDir USE_XMLPARSER=true XMLPARSER_DIR=$COMPONENTS_DIR/xmlparser
JAVACALL_OUTPUT_DIR=/cygdrive/e/src/phoneME/feature/mr4/phoneme_feature/build/javacall
make: Entering directory `/cygdrive/e/src/phoneME/feature/mr4/phoneme_feature/ja
vacall-com/configuration/phoneMEFeature/win32_emul'
...compiling: make: *** [/cygdrive/e/src/phoneME/feature/mr4/phoneme_feature/bui
ld//javacall/obj/limeio.obj] Error 53
make: Leaving directory `/cygdrive/e/src/phoneME/feature/mr4/phoneme_feature/jav
acall-com/configuration/phoneMEFeature/win32_emul'

Any further ideas?

Eric

ole00
Offline
Joined: 2008-10-14
Points: 0

If you are using cygwin (not cyg4me) with dos based tools you'll probably need to encapsulate several paths in the make files into the "fixcygpath" makro that will translate cygwin path (/cygdrive/c/...) into the dos path (c:/...). Example:

CPP_INCLUDE_DIRS_CYGWIN += -I`$(call fixcygpath, "$(PCSL_DIST_DIR)/inc")`

Hope this helps.
Ole

ebresie
Offline
Joined: 2003-08-06
Points: 0

This is going to sound silly, but I thought one of the selling points of Java was suppose to be it's "backwards compatible".

Why is a new version of Java not usable?

Eric