Linux+Netbeans+Commapi

after following the installation instructions on this site:
http://www.syngress.com/book_catalog/177_lego_JAVA/sample.htm
and using this $java -jar -Djava.library.path=/usr/lib -cp . BlackBox
finally the blackbox example using commapi is working
Now i'm developing an application in netbeans (on linux FC2) to send data to a PIC microcontroller through the serial port using the commapi and when i try to build it or run it throws this error:
Error loading LinuxSerialParallel: java.lang.UnsatisfiedLinkError: no LinuxSerialParallel in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: isDevLink
at com.sun.comm.Unix.isDevLink(Native Method)
at com.sun.comm.PathBundle.add(PathBundle.java:108)
at com.sun.comm.PlatformPortBundle.<init>(PlatformPortBundle.java:44)
at javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:138)
as far as i know it seems to be missing a library(LinuxSerialParallel), if that's right, how could i solve this problem? how can i add the missing library to java.library.path?
thanks in advance!!

Hello,
I need your help... I am using Netbeans+Linux+J2sdk1.4.2_9+CommApi(v3.0 Linux).
While trying to run SimpleRead, I found the following errors:
Found port: /dev/ttyS4
java.io.IOException: Erro getting StatusFlags in call to ioctl(TIOCMGET)
at com.sun.comm.LinuxSerial.nativeGetStatusFlags(Native Method)
at com.sun.comm.LinuxSerial.isCD(LinuxSerial.java:203)
at com.sun.comm.LinuxSerial$SSCheckStatusThread.run(LinuxSerial.java:598)
java.io.IOException: Not all params are supported by kernel
at com.sun.comm.LinuxSerial.nativeSerialPortParams(Native Method)
at com.sun.comm.LinuxSerial.setSerialPortParams(LinuxSerial.java:346)
I am using VCP ftdi_sio for the /dev/ttyS4 comm port.
Did you encounter this errors before??
Any help will be appreciated.... :(

Similar Messages

  • How to Compile and run a GUI project made in Netbeans from shell

    hi all .....
    I develpoed a java project using Netbeans .The project has GUI also (JFrame and various layout ) . The project is building and running fine through netbeans .But when I tried to compile the source files (*.java files) from shell , I failed .
    The project has two files MainFrame.java (JFrame file and this file has the public static void main method ) and helloworld.java (simple java class file). But the "src" folder created by netbeans (at project location) contains one more file named "MainFrame.form" . Moreover netbeans was using two jar files (AbsoluteLayout.jar and Swing-layout-1.0.jar .
    I tried to compile the two .java files . helloworld.java compiled successfully but the MainFrame.java didnt. I used the command :
    linux:~/netbeans projects/Network tool/src/mytool # javac -classpath ".;AbsoluteLayout.jar;Swing-layout-1.0.jar;" MainFrame.java
    The 14 errors were encountered. MOst of them were like :
    MainFrame.java:138: package org.jdesktop.layout does not exist
    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    ^
    Help, suggestion or guidance of any type is welcomed .(Keep in mind that project is running fine when done using netbeansIDE).
    waiting for reply....

    Hello,
    1. The .form file was used by Netbean's GUI builder to create the .java and is not needed for compilation.
    2..../src # javac -classpath "..." mytool/*.java
    I guess the package mytool was not coped with.
    Alternatively it is worth to use the ant build tool also used by Netbeans.
    Then you can make a jar from the class files, indicate in the manifest.mf file:
    1. the main class
    2. the library jars

  • Javafx 1.1linux netbeans

    Just tried following Weiqi Gao's instructions for manually integrating the nbms
    - http://www.weiqigao.com/blog/2008/12/11/javafx_1_0_on_linux_netbeans_plugin.html
    .... and the nbms from
    http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/patch2/javafx2/
    There seems to be an issue with the JavaFX Platform module and - "No plugin providing the capability javafx.sdk.v1_1 could be found".
    Has anyone managed to to get this to work?
    This whole javafx linux (netbeans) problem is becoming a real pain

    Please goto [http://java.dzone.com/tips/javafx-11-linux-netbeans]
    You can debug JavaFX on Linux.

  • Netbeans - glassfish - class not found: PartialViewContextFactory

    Hello,
    Im new in java. I started to learn JSF. I installed (linux) netbeans IDE (7.2.1) + glassfish server (3.1.2). Then I created some "hello world" application example by myself, everything works fine.
    But today when I try to deploy one of my applications, I gave this result:
    --- application output begin ---
    ant -f /home/peter/NetBeansProjects/HelloJSF -DforceRedeploy=false -Ddirectory.deployment.supported=true -Dnb.wait.for.caches=true run
    init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    library-inclusion-in-archive:
    library-inclusion-in-manifest:
    compile:
    compile-jsps:
    In-place deployment at /home/peter/NetBeansProjects/HelloJSF/build/web
    deploy?DEFAULT=/home/peter/NetBeansProjects/HelloJSF/build/web&name=HelloJSF&contextroot=/HelloJSF&force=true failed on GlassFish Server 3+
    Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory. Please see server.log for more details.
    /home/peter/NetBeansProjects/HelloJSF/nbproject/build-impl.xml:1022: The module has not been deployed.
    See the server log for details.
    BUILD FAILED (total time: 4 seconds)
    --- application output end ---
    The server output is:
    --- server ouput begin ---
    Launching GlassFish on Felix platform
    INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)
    INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
    INFO: Grizzly Framework 1.9.50 started in: 62ms - bound to [0.0.0.0:29226]
    INFO: Grizzly Framework 1.9.50 started in: 31ms - bound to [0.0.0.0:29227]
    INFO: Grizzly Framework 1.9.50 started in: 22ms - bound to [0.0.0.0:29194]
    INFO: Grizzly Framework 1.9.50 started in: 13ms - bound to [0.0.0.0:29183]
    INFO: Grizzly Framework 1.9.50 started in: 7ms - bound to [0.0.0.0:29222]
    INFO: GlassFish Server Open Source Edition 3.1.2.2 (5) startup time : Felix (2 515ms), startup services(1 410ms), total(3 925ms)
    INFO: HV000001: Hibernate Validator 4.3.0.Final
    INFO: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://varpacer:29232/jndi/rmi://varpacer:29232/jmxrmi
    INFO: Grizzly Framework 1.9.50 started in: 2ms - bound to [0.0.0.0:29226]
    INFO: Grizzly Framework 1.9.50 started in: 1ms - bound to [0.0.0.0:29227]
    INFO: SEC1002: Security Manager is OFF.
    INFO: SEC1010: Entering Security Startup Service
    INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
    INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
    INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
    INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
    INFO: SEC1011: Security Service(s) Started Successfully
    INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:29226]
    INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:29227]
    INFO: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:29194]
    INFO: WEB0171: Created virtual server [server]
    INFO: WEB0171: Created virtual server [__asadmin]
    INFO: WEB0172: Virtual server [server] loaded default web module []
    INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context '/HelloJSF'
    SEVERE: Critical error during deployment:
    java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
         at com.sun.enterprise.v3.server.APIClassLoaderServiceImpl$APIClassLoader.loadClass(APIClassLoaderServiceImpl.java:206)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
         at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1456)
         at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:264)
         at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:618)
         at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:509)
         at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
         at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:993)
         at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
         at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:303)
         at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:219)
         at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
         at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
         at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
         at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
         at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
         at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
         at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
         at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
         at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
         at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
         at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
         at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
         at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
         at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:722)
    Caused by: java.lang.ClassNotFoundException: javax.faces.context.PartialViewContextFactory
         at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
         ... 70 more
    SEVERE: PWC1306: Startup of context /HelloJSF failed due to previous errors
    SEVERE: PWC1305: Exception during cleanup after start failed
    org.apache.catalina.LifecycleException: PWC2769: Manager has not yet been started
         at org.apache.catalina.session.StandardManager.stop(StandardManager.java:873)
         at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5571)
         at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:5384)
         at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
         at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
         at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
         at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
         at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
         at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
         at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
         at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
         at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
         at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
         at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:722)
    SEVERE: ContainerBase.addChild: start:
    org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
         at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
         at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
         at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
         at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
         at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
         at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
         at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
         at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
         at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
         at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
         at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:722)
    Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
         at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
         at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
         ... 39 more
    Caused by: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
         at com.sun.enterprise.v3.server.APIClassLoaderServiceImpl$APIClassLoader.loadClass(APIClassLoaderServiceImpl.java:206)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
         at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1456)
         at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:264)
         at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:618)
         at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:509)
         at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
         at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:993)
         at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
         at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:303)
         at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:219)
         at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
         ... 42 more
    Caused by: java.lang.ClassNotFoundException: javax.faces.context.PartialViewContextFactory
         at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
         ... 70 more
    WARNING: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
    java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
         at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
         at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
         at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
         at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
         at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
         at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
         at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
         at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
         at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
         at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
         at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:722)
    SEVERE: Exception while invoking class com.sun.enterprise.web.WebApplication start method
    java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
         at com.sun.enterprise.web.WebApplication.start(WebApplication.java:138)
         at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
         at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
         at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
         at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
         at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
         at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
         at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
         at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
         at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
         at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
         at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
         at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
         at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
         at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
         at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
         at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
         at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
         at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
         at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
         at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
         at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
         at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
         at java.lang.Thread.run(Thread.java:722)
    SEVERE: Exception while loading the app
    SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
    --- server output end ---
    When I try to run an empty, new application, I give same error.
    What did I do wrong? Or I missed something?
    (I tried google for the solution but I didn't find useful things. :( )
    (I tried to reinstall glassfish and netbeans too. First deploy worked, but then it went wrong, this error came again.... :( )

    Sorry to hear that you are having problems with your IDE. But what do you expect people to help you with? Try the Netbeans mailing lists for assistance.
    You should realize that your first priority should be to learn how to properly package and deploy web applications WITHOUT the help of an IDE. When you know how to do that, you can diagnose what the IDE is doing wrong and based on that information figure out how to alter the project settings so the problem goes away. The only way to get anywhere in this business is to have in-depth knowledge of the technology you're using; tools are only there to help you, not do the work for you. As you are now finding out the hard way.
    You may also consider switching to Eclipse because in my experience there are more online resources available to help you. Like this one:
    http://balusc.blogspot.com/2011/01/jsf-20-tutorial-with-eclipse-and.html

  • JavaFX in a netbeans NBM module

    Does anyone have an example that uses javafx in a netbeans module. JavaFX and the Netbeans platform could be a strong combination.

    Please goto [http://java.dzone.com/tips/javafx-11-linux-netbeans]
    You can debug JavaFX on Linux.

  • I can't run example from JEE5tutorial - books

    OS- Linux
    NetBeans 5.5.1 ( with ant 1.7 )
    ant 1.6
    I tried run:
    ant 1.6
    [root@zet books(0)]# ant create-tables
    Buildfile: build.xml
    BUILD FAILED
    /home/marcin/3ROK/1SEM/java1/javaeetutorial5/examples/web/books/build.xml:49: The following error occurred while executing this line:
    /home/marcin/3ROK/1SEM/java1/javaeetutorial5/examples/bp-project/main.xml:20: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the "else" attribute.
    Total time: 1 secondon ant 1.7
    [root@zet books(0)]# /usr/local/netbeans-5.5.1/ide7/ant/bin/ant create-tables
    Unknown argument: -cp
    ant [options] [target [target2 [target3] ...]]
    Options:
      -help, -h              print this message
      -projecthelp, -p       print project help information
      -version               print the version information and exit
      -diagnostics           print information that might be helpful to
                             diagnose or report problems.
      -quiet, -q             be extra quiet
      -verbose, -v           be extra verbose
      -debug, -d             print debugging information
      -emacs, -e             produce logging information without adornments
      -lib <path>            specifies a path to search for jars and classes
      -logfile <file>        use given file for log
        -l     <file>                ''
      -logger <classname>    the class which is to perform logging
      -listener <classname>  add an instance of class as a project listener
      -noinput               do not allow interactive input
      -buildfile <file>      use given buildfile
        -file    <file>              ''
        -f       <file>              ''
      -D<property>=<value>   use value for given property
      -keep-going, -k        execute all targets that do not depend
                             on failed target(s)
      -propertyfile <name>   load all properties from file with -D
                             properties taking precedence
      -inputhandler <class>  the class which will handle input requests
      -find <file>           (s)earch for buildfile towards the root of
        -s  <file>           the filesystem and use it
      -nice  number          A niceness value for the main thread:
                             1 (lowest) to 10 (highest); 5 is the default

    A possible cause is a problem with the file places.sqlite that stores the bookmarks and the history.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    What happens if you open Firefox in Save mode?
    *https://support.mozilla.com/kb/Safe+Mode
    *Help > Restart with Add-ons Disabled

  • Commapi portability problem Linux/Windows

    I made a program that uses the serial port to send data, i included the Commapi library and it worked very well (after a long and annoying process of installation of the api).
    Now i want my program to work on windows too, so what should i do if i want my program to run on both OS?
    I added the Commapi library for windows to my program, and wrote some code lines to let my program know if he is running on xp or linux, and adjust the serial port name (tty1-> linux, COM1-> xp)
    What else should i do?
    Besides, i have a few questions, does it matter that both libraries have the same name (comm.jar) when you add them to the Netbean's library manager? do i have to include my program on the CLASSPATH when i use it for the first time on an OS?
    thanks in advance!!!

    1.) Always use / as delimiter and not \, even under
    windows.
    This is a matter of how a String handles \. It is an
    escape character.
    To use it as delimiter you must do the following
    String upImage = "C:\\Images\\books\\book11.jpg";however this is better
    String upImage = "C:/Images/books/book11.jpg";2.) Linux like all unix like systems does not know
    drive letters like c: or d: or so
    All files are relative to the root your directory
    tree (i.e. /)
    Hardcoding file and or directory names in your
    servlets makes them unportable so let it be ! Use
    parameters in your web.xml file or entries in a
    properties file instead.He wants to upload a file, however, so he should not even be attempting to read a file on the local system. He should be attempting to extract whatever file is being uploaded from the inputStream of the request object.

  • How to deploy web app from PC to Linux with Netbeans ?

    I am developing a web app in Netbeans 6.0 on my PC, using the Tomcat comes with the IDE, now I need to deploy it to a Linux server running Tomcat, can I do it from inside the IDE ? Can it copy all the servlets and other java classes to the Linux for me ? If so, what info does it need from me ? Login, password ... ?
    If not, how can I do it by hand ?
    Frank

    RTFM
    You need to consult the NetBeans Help to see if it will export a WAR/EAR. Regarding getting it over to Linux, there are some issues there. But if you have visibility to the Linux deploy directory from your PC then it's possible. It's certainly possible to do ALL of this using Apache Ant.

  • Error while installing java and netBeans on Mandriva 2008 linux

    Here are all the lines which are printed on my console during the installation
    [beloo@localhost Desktop]$ ./jdk-6u4-nb-6_0_1-linux-ml.sh
    Configuring the installer...
    Searching for JVM on the system...
    Preparing bundled JVM ...
    Extracting installation data...
    Running the installer wizard...
    /usr/share/themes/Ia Ora Free/gtk-2.0/gtkrc:9: error: lexical error or unexpected token, expected valid token
    [beloo@localhost Desktop]$
    If anybody knows the solution please help me!
    ps: when i install java separated from netBeans i can succesfully install java, but NetBeans install does not starts.
    thx

    Here are all the lines which are printed on my console during the installation
    [beloo@localhost Desktop]$ ./jdk-6u4-nb-6_0_1-linux-ml.sh
    Configuring the installer...
    Searching for JVM on the system...
    Preparing bundled JVM ...
    Extracting installation data...
    Running the installer wizard...
    /usr/share/themes/Ia Ora Free/gtk-2.0/gtkrc:9: error: lexical error or unexpected token, expected valid token
    [beloo@localhost Desktop]$
    If anybody knows the solution please help me!
    ps: when i install java separated from netBeans i can succesfully install java, but NetBeans install does not starts.
    thx

  • Error when running netbeans 5.5 on Linux

    hi all
    I am facing the following error when I start netbeans 5.5 linux.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    java.lang.NullPointerException
    at org.netbeans.mdr.persistence.btreeimpl.btreestorage.BtreeDatabase.getIfExists(BtreeDatabase.java:726)
         at org.netbeans.mdr.storagemodel.MdrStorage.getObject(MdrStorage.java:702)
         at org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:359)
         at org.netbeans.mdr.handlers.PackageProxyHandler.getPackageDelegate(PackageProxyHandler.java:77)
         at org.netbeans.mdr.handlers.PackageProxyHandler._handleGetClassProxy(PackageProxyHandler.java:108)
         at org.netbeans.jmi.javamodel.JavaModelPackage$Impl.getResource(Unknown Source)
         at org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:630)
         at org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:582)
         at org.netbeans.modules.javacore.JMManager.getResource(JMManager.java:557)
         at org.netbeans.modules.java.JavaEditor$JavaEditorComponent.createNode(JavaEditor.java:1309)
         at org.netbeans.modules.java.JavaEditor$JavaEditorComponent.access$1000(JavaEditor.java:1230)
         at org.netbeans.modules.java.JavaEditor$JavaEditorComponent$1$1.run(JavaEditor.java:1282)
         at org.openide.util.Mutex.readAccess(Mutex.java:227)
         at org.netbeans.modules.java.JavaEditor$JavaEditorComponent$1.run(JavaEditor.java:1280)
         at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
    [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    When I press Cntrl & Space my text predictor does not work.I really really need this to code.
    please help me.

    java version 1.6
    linux version centos 4
    I installed netbeans as user.I use Netbeans 5.5 on Linux FC7 and Ubuntu 7.04 and have used it on FC5. I have run Netbeans 5.5 with JDK 1.5 and 1.6. I install as user.
    I also use (in a very minor way) Netbeans on Windows 2000 and XP using VMWARE hosted on Ubuntu 7.04 .
    All of these work well without any of the problems you are experiencing.
    I have just looked at installing Centos 4 but it has a 3.5 GByte download so I'm not inclined to follow this line a the moment.
    Since you are using Centos 4 and not 5, one possibility is that JDK 1.6 has problems on Centos 4. If I were you I would try in order
    0) The Netbeans mailing list.
    1) Re-installing JDK1.6 (Make sure you have the JDK and not just the JRE)
    2) The Centos Mailing List
    3) Install using JDK1.5 and then add JDK 1.6 as a platform under Tools -> Java Platform Manager
    If none of these works then I suspect you are on your own.
    Message was edited by:
    sabre150

  • Netbeans + JavaFX + linux the easy way

    Following the now popular Weiqi Gao instructions on how to install netbeans on linux with JavaFX support, i've created a package with even more simple steps to get those running.
    Installation instructions and the package itself can be downloaded at:
    http://www.leo-sa.com/?p=59
    Comments on improvements are welcome!

    OK. We made some progress :)
    It looks like Suse is more Oracle friendly than RH :)
    Damir, thanks for useful link.
    In this moment, we can assume that:
    - >>Suse7.2 + 9iAS 1.0.2.2.1<< will work fine.
    - >>9i database + RH or Suse 7.x<<, too (according to link provided by Damir, there is acceptable procedure to get these things together).
    BUT, what is with combination
    9iAS 1.0.2.2.1 + 9i Database (9.0.1)<<?Is there real compatibility within these two products, or there is just casual sharing of small italic i and some numbers in their names :)
    ciao
    Srdjan

  • Netbeans linux problem

    hi i have a problem about netbeans
    i have a project which i wrote in netbeans under windows and i take the same project and compiled,run it in netbeans under linux but i get this error
    what should i do?
    Warning:
        Name: HorScrollBar
        Class: XmScrollBar
        The specified scrollbar value is greater than the maximum
        scrollbar value minus the scrollbar slider size.does anyone know anything about it?
    Thanks

    Have googled it? It seems to be a bug/error inMotif
    (which is what AWT is based on Unix). Does the
    warning have any other negative effect on your
    application?my applet doesnt working i dont expect any more
    negative effectsAre you sure this "doesnt working" is caused by the warning?
    I use JDK 5 release 4 on Redhat 9 (not up to date) and also on Fedora Core 3 (up to date) with Netbeans 4.1 . I don't get a warning and both Netbeans and Applets work OK for me. I can run Applets from within Netbeans and from within Firefox.
    Have you tried writing some simple test programs. Start with HelloWorld not using X and then create and AWT HelloWorld and then create an Applet HelloWorld.

  • SetForeground in Applet does not work (Netbeans under Linux)

    I'm attempting to make a Breakout version of java (if I go through with it) and the first issue that I encountered is that I can't change the color of the moving rectangle (you know, the thing you hit the ball with). I tried the code under Textpad on a Windows machine and that worked fine, but not under Netbeans in Linux using jdk 1.6.0_01.
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class Breakout extends Applet implements MouseListener, MouseMotionListener{
         int mouse_x, mouse_y;
         Thread t;
         public void init(){
              addMouseListener(this);
              addMouseMotionListener(this);
         public void start(){
              t= new Thread();
              t.start();
         public void run(){}
         public void mouseClicked(MouseEvent me){ }
         public void mouseEntered(MouseEvent me){ }
         public void mouseExited(MouseEvent me){ }
         public void mousePressed(MouseEvent me){ }
         public void mouseReleased(MouseEvent me){ }
         public void mouseDragged(MouseEvent me){ }
         public void mouseMoved(MouseEvent me){
              mouse_x = me.getX();
              if(mouse_x>=400)
                   mouse_x=400;
              repaint();
         public void stop() {}
         public void destroy(){ }
         public void paint(Graphics g){
              setBackground(Color.black);
              setForeground(Color.white); //doesn't work              
              g.drawRoundRect(mouse_x, 600, 50, 20, 20, 20);
    }I'm wondering if it's because the Applet under Linux uses the Native l&f theme while appets under Windows uses the Windows l&f theme.
    Any thoughts would be helpful!

    setForeground(Color.white); //doesn't work
    g.drawRoundRect(mouse_x, 600, 50, 20, 20, 20);Change this to:
    g.setColor(Color.WHITE);
    g.drawRoundRect(mouse_x, 600, 50, 20, 20, 20);You can move the background setting into method init(), calling it once is enough.
    I'm wondering if it's because the Applet under Linux
    uses the Native l&f theme while appets under Windows
    uses the Windows l&f theme.You use java.awt.Applet, so you use AWT which means there's no L&F theme (as in Swing) but it's native components being responsible.

  • JDBC + Mandrake Linux + Mysql + netbeans

    I'm trying to conecto to a mysql server using the following code of netbeans. It compiles, but I got a java.lang.NoClassDefFoundError on execution time.
    Does anyone have any clue of how to solve it?
    (I got the netbeans+sdk package, is it complete? Maybe the jdbc class is missing? Where can I get it?)
    Thanks!
    import java.sql.*;
    public class Connect
    public static void main (String[] args)
    Connection conn = null;
    try
    String userName = "root";
    String password = "kron9013";
    String url = "jdbc:mysql://192.168.0.109/Solbet";
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();
    conn = DriverManager.getConnection (url, userName, password);
    System.out.println ("Database connection established");
    catch (Exception e)
         System.out.println (e.toString());
    System.err.println ("Cannot connect to database server");
    finally
    if (conn != null)
    try
    conn.close ();
    System.out.println ("Database connection terminated");
    catch (Exception e) { /* ignore close errors */ }
    Exception in thread "main" java.lang.NoClassDefFoundError: mysql/Connect (wrong name: Connect)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

    On this line:
    Class.forName ("com.mysql.jdbc.Driver").newInstance ();I'm 99.99% sure you can drop the newInstance() part. However, I'm not certain if that's why it's failing.

  • Installing Netbeans on RedHat Enterprise 5 Linux

    Hello,
    After installing both the jre-6u2 and jdk-6u2 RPMs I have had no problems getting netbeans to work...
    However what caused me to stay up rather late trying to get this thing installed originally was the fact that the installer asks specifically for the location of the j2se sdk location (not the normal jdk) but when the path to that sdk is given it says that it is not a compatible sdk. I doubt that this is a spelling mistake on the installer but I am confused to why the j2se-sdk is not needed.
    If anyone can clear this up for me, I would be greatful.
    Regards,
    Karsten

    Hello,
    After installing both the jre-6u2 and jdk-6u2 RPMs I have had no problems getting netbeans to work...
    However what caused me to stay up rather late trying to get this thing installed originally was the fact that the installer asks specifically for the location of the j2se sdk location (not the normal jdk) but when the path to that sdk is given it says that it is not a compatible sdk. I doubt that this is a spelling mistake on the installer but I am confused to why the j2se-sdk is not needed.
    If anyone can clear this up for me, I would be greatful.
    Regards,
    Karsten

Maybe you are looking for