Discussions
Categories
- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 584 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 666 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
Could not find or load main class I2CExemple. Can someone help me?

I'm trying to run a Java ME Embedded application in raspberry pi, using I2C protocols. But when I try to run the command: java -jar I2CExemple, I get an error: Could not find or load main class I2CExemple. Already researched some ways around this error, but I was not successful. Can someone help me?
Answers
-
Hi!
You are unlikely running JavaME Embedded since its binary doesn't contain "java" executable. Do you mean JavaSE Embedded? If so please ask question in corresponding conference.
/Sergey
-
OK, but I'm trying to run an example from Oracle's website: Working with the I2C Bus
and it says Java ME Embedded 8.1. What am I doing wrong?
-
Have you installed JavaME8.1 runtime? Please note that JavaME requires application to be installed prior to run. Please check how to page
-
ok, really had no attack for this detail. I'll try! Thaky
Thank you
-
Corrects errors for the Java ME Embedded runtime. But I could not even install, the other error!
[email protected] ~/bin $ ./installMidlet.sh /home/pi/NetBeansProjects/I2CExemple/dist/I2CExemple.jar
Java is starting. Press Ctrl-C to exit
Error installing the suite: Reason = 13
Invalid JAD Exception, reason: 13 (MISSING_SUITE_NAME), message: Reason = 13, extra data: MIDlet-Name
- com/sun/midp/installer/Installer.checkJarAttributes(), bci=53
- com/sun/midp/installer/Installer.installStep7(), bci=720
- com/sun/midp/installer/Installer.performInstall(), bci=147
- com/sun/midp/installer/Installer.install(), bci=60
- com/sun/midp/scriptutil/CommandLineInstaller.run(), bci=139
- java/lang/Thread.run(), bci=5
-
Looks like you are unfamiliar with JavaME application and provisioning model. To reduce a number of potential mistakes you can use Netbeans and JavaME-E SDK to create correct application and run sanity check with emulator. And only then connect your RPi board to SDK and install verified application. See SDK how to
-
Hi, Sergey!
Sorry for all this work. But I'm using netbeans, use the sdk normally. Already managed to run some examples Java ME Embedded via netbeans, including k64F board too. But this example to use i2c in Raspi is complicated ... lol When I try to run it in sdk happens this:
TRACE: <at java.lang.NullPointerException>,
java.lang.NullPointerException
- com/sun/midp/installer/InstallerCommandHandler.handleGetVersionCommand(), bci=36
- com/oracle/midp/proxy/ProxyEventListener.handleDeveloperAgentEvent(), bci=814
- com/oracle/midp/proxy/ProxyEventListener.packetReceived(), bci=10
- com/oracle/midp/proxy/JavaChannelDispatcher.process(), bci=142
- com/sun/midp/events/EventQueue.run(), bci=129
- java/lang/Thread.run(), bci=5
I do not understand what's wrong. : /
-
Hmm, this error indicates problem in SDK GUI-to-runtime channel. Does it happens when you run application with emulator or real device?
-
This error was generated when running in the emulator. Something corrupted? can be?
-
When I run the same application, which uses i2c in k64f he performs. But nothing happens with the display of 7 segments.
Should run the same code on two boards(raspi and k64f) if the display has connected to the correct pins?