当前位置: 首页>>代码示例>>Java>>正文


Java ConnectionNotFoundException.printStackTrace方法代码示例

本文整理汇总了Java中javax.microedition.io.ConnectionNotFoundException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java ConnectionNotFoundException.printStackTrace方法的具体用法?Java ConnectionNotFoundException.printStackTrace怎么用?Java ConnectionNotFoundException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.microedition.io.ConnectionNotFoundException的用法示例。


在下文中一共展示了ConnectionNotFoundException.printStackTrace方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
/**
 * @inheritDoc
 */
public void execute(String url) {
    try {
        mid.platformRequest(url);
    } catch (ConnectionNotFoundException ex) {
        ex.printStackTrace();
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:11,代码来源:GameCanvasImplementation.java

示例2: playAudio

import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
public void playAudio() throws AudioException, FileException
{
    errorItem.setLabel("");
    errorItem.setText("");
    System.err.println("Attempting to play audio...");
    messageItem.setText("Starting the Player...");

    recordService.startPlayback();

    try
    {
        if(recMid!= null)
            recMid.platformRequest(fullName);
        else
            throw new ConnectionNotFoundException("Since midlet is null, try 2nd method of playback");
    }
    catch(ConnectionNotFoundException cnfe)
    {
        cnfe.printStackTrace();
        /*If the platform request fails, which it shouldn't, attempt to start playback
         * through the service.*/
          recordService.startPlayback();
    }

    System.err.println("Player has started.");
    messageItem.setText("Player has started!");

    form.removeCommand(eraseCommand);
    form.removeCommand(saveCommand);
    form.removeCommand(playCommand); //"Hide" playCommand when playing has started
    form.removeCommand(recordCommand); //"Hide" recordCommand when playing has started
    form.addCommand(stopCommand); //Show recordCommand when playing has started

    //Thread.currentThread().sleep(FOREVER);
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:36,代码来源:AudioCaptureState.java

示例3: processView

import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
private void processView(String file) {
    try {
        System.out.println("Opening: " + file);
        midlet.platformRequest(file);
    } catch (ConnectionNotFoundException e) {
        System.out.println("Error displaying image: " + e.getMessage());
        e.printStackTrace();
    }
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:10,代码来源:ImageChooserState.java

示例4: startApp

import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
public void startApp() {
    try {
        platformRequest("http://localhost:8000/tests/Manifest1Updated.jad");
    } catch (ConnectionNotFoundException e) {
        e.printStackTrace();
        System.out.println("FAIL");
    }
    Isolate.currentIsolate().exit(0);
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:10,代码来源:AMIDletUpdater.java

示例5: startApp

import javax.microedition.io.ConnectionNotFoundException; //导入方法依赖的package包/类
public void startApp() {
    try {
        platformRequest("http://localhost:8000/tests/test.html");
    } catch (ConnectionNotFoundException e) {
        e.printStackTrace();
        System.out.println("FAIL");
    }
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:9,代码来源:TestMIDletPeer.java


注:本文中的javax.microedition.io.ConnectionNotFoundException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。