Java « Różności …

Różności …

4 sierpnia 2017

Eclipse font size

Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 07:08

https://marketplace.eclipse.org/content/fontsize

General → Appearance → Colors and Fonts → Java Editor text font

3 sierpnia 2017

the superclass javax.servlet.http.httpservlet was not found on the java build path

Zaszufladkowany do: JAVA EE,Java — Tagi: , — Jacek @ 08:17
  • Maven
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
        <scope>provided</scope>
    </dependency>
  • Gradle
    configurations {
        provided
    }
    sourceSets {
        main { compileClasspath += configurations.provided }
    }
    dependencies {
        provided 'javax.servlet:javax.servlet-api:3.1.0'
    }

ECLIPSE – Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

Zaszufladkowany do: Java — Tagi: — Jacek @ 07:06
in pom.xml:
<project>
  ...
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  ...
</project>
mvn package

22 października 2015

Linux Eclipse EE

Zaszufladkowany do: Java,Linux — Tagi: , — Jacek @ 17:00

1.In Eclipse go Help -> Install new Software…
2.Press Add…
3.In address enter http://download.eclipse.org/releases/indigo/ and name – whatever you like.
4.Install JavaEE Developer Tools (under “Web, XML, JavaEE, and OSGi Enterprise Tools”)
5(Optional, but very useful).Install Marketplace Client (General Purpose Tools -> Marketplace Client)

down vote accepted

No, but you can update classic version for it to be same as Eclipse for J2EE version. The best way (which I know) is:
1.In Eclipse go Help -> Install new Software…
2.Press Add…
3.In address enter http://download.eclipse.org/releases/indigo/ and name – whatever you like.
4.Install JavaEE Developer Tools (under “Web, XML, JavaEE, and OSGi Enterprise Tools”)
5(Optional, but very useful).Install Marketplace Client (General Purpose Tools -> Marketplace Client).

That’s about it, after this you should have the same environment as client you would download from Eclipse.org.

27 kwietnia 2015

Java.lang.OutOfMemory Java Heap Space JDeveloper

Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 16:00

Files that control the amount of memory afforded to the JVM for JDeveloper upon startup, relative to the jdeveloper/ide/bin/ directory, include:

  • jdev.conf
  • ide.conf

Update these files as follows:

  1. Quit JDeveloper.
  2. Edit ide.conf.
  3. Append the following
    AddVMOption -Xms256M
    AddVMOption -Xmx1024M
  4. Edit jdev.conf.
  5. Find the AddVMOption for the “heap size.”
  6. Change the values as follows:
    AddVMOption -Xmx1024M
    AddVMOption -XX:MaxPermSize=1024M

source:

http://stackoverflow.com/questions/3442323/java-lang-outofmemory-java-heap-space-jdeveloper

    25 kwietnia 2015

    NULL VALUE LOV

    Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 13:31

    http://www.gebs.ro/blog/oracle/oracle-adf-select-one-choice-default-selection/

    21 marca 2015

    EMPTY ADF FORM

    Zaszufladkowany do: Java,Programowanie — Tagi: , — Jacek @ 08:28

    Bindings ->

    click on create control binding and select action item. In create action binding wizard select AppModuleDataControl->DepartmentsView1->Operation->createInsert.

    In Executables section click in create executables Binding and select invokeAction item. In Insert invokeAction as CreateInsert

    Edit the invokeCreateInsert and set the refresh to renderModel because when ever the page loaded this will execute the createInsert operation by inserting the empty record in the collection.

    Źródło:

    http://deepakcs.blogspot.com/2013/01/create-adf-input-form-without-first.html

    22 października 2014

    ADF

    Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 08:50

    ADF ADF Rich Client User Interface Guidelines

    http://www.oracle.com/webfolder/ux/middleware/richclient/index.html

    ADF Faces Rich Client Demos – Oracle ADF

    ADF Mobile

    http://www.oracle.com/technetwork/developer-tools/adf/adf-mobile-samples-1865088.html

    ADF Oracle

    http://www.oracle.com/technetwork/developer-tools/adf/overview/index.html

    ———-

    Wyłączenie przewijania tabeli

    3 czerwca 2014

    Solaris – JAVA

    Zaszufladkowany do: Java,Programowanie,Solaris — Tagi: , — Jacek @ 21:15
    1. Set JAVA_HOME to /usr/j2se.
      • In a C shell environment:
        # setenv JAVA_HOME /usr/j2se
      • In a Bourne or Korn shell environment:
        # JAVA_HOME=/usr/j2se
        # export JAVA_HOME

      Tip – Add the appropriate statement to your .login or .cshrc file.


    2. Add /usr/j2se/bin to your system path.
    3. Place /usr/j2se/bin in your PATH before /usr/bin.
    4. Place /usr/bin in your PATH before /usr/ucb

    Source: http://docs.oracle.com/cd/E19062-01/sun.mgmt.ctr36/819-5418/system-prep-proc-3/index.html

    JDK Installation

    java -version

    java -d64 -version

    zcat jdk-6 <update> -solaris-i586.tar.Z | tar -xf -

    pkgadd -d . SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo

    pkgrm SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo

    64Bit – /usr/jdk/jdk1.6.0

    32Bit – /usr/jdk/jdk1.6.0

    /usr/java


    27 grudnia 2013

    jdeveloper info

    Zaszufladkowany do: Java,Linux,Programowanie — Tagi: — Jacek @ 15:57

    instalkę uruchamiać jako zwykły user

    wersja 11.1.1.7 instalka na 64bit linuksie
    najpierw apt-get install libxtst6.i386

    start jdeveloper
    sh /home/jsen/Oracle/Middleware_jdev11117/wlserver_10.3/common/quickstart/quickstart.sh &

    start weblogic server:
    ~/Oracle/Middleware_jdev11117/user_projects/domains/base_domain$ ./startWebLogic.sh

    uruchamianie i zatrzymywanie:
    http://help.adobe.com/en_US/enterpriseplatform/10.0/AdminHelp/WS92d06802c76abadb-5145d5d12905ce07e7-7c8f.html

    1 listopada 2013

    java library path

    Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 05:41

    java.library.path is the path that Java uses to find native libraries (such as lwjgl.dll). You should set it to the directory that contains the DLL files. You specify this with the -D switch on the command line, for example:

    java -Djava.library.path=C:\Java\ljwgl\libs org.mypackage.MyProgram

    http://fedoraproject.org/wiki/Java

    29 października 2013

    sqldeveloper

    Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 16:39

    Type the full pathname of a J2SE installation (or Ctrl-C to quit), the path will be stored in ~/.sqldeveloper/jdk
    /usr/lib/jvm/java

    18 października 2013

    Multiple Java versions.

    Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 20:10
    @echo off
    echo Setting JAVA_HOME
    set JAVA_HOME=”C:\jre6″
    echo setting PATH
    set PATH=”C:\jre6\bin”;%PATH%
    javaw.exe -Djava.library.path=. -Xmx512m -jar C:\Macrologic\system\jTerm\jTerm.jar 192.168.192.192:7777 -ggrupa -a pulpit

    13 października 2013

    java – two versions

    Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 14:31

    Maintaining Multiple Java Versions on Red Hat Linux

    I had the need to maintain more than one Java version on a Red Hat Linux machine.  I was able to install a new version of Java, and then configure the machine to use the new version by default.  It’s also very easy to switch back to using the previous version of Java.

    The first step is to download the Java version that you want from the Oracle/Java web site.  In my case, I downloaded the following file.

    jre-6u27-linux-x64-rpm.bin

    Executing this file as root will perform the installation.  You’ll, of course, have to make the file executable after download.  By default, the installation “wanted” to install Java in the following directory.

    /usr/java/jre1.6.0_27

    I still wanted to make the new installation the default Java used by the machine.  Linux has a nice utility called alternatives to do this, and more specifically, the update-alternatives command.  With this command, I was able to first register the newly installed Java as a version of Java that would be recognized by the utility, and I was then able to use the utility to make the new version of Java the default version.  When I used the utility to make the newly installed Java the default, the /usr/bin/java on the machine was modified to point to the new version.

    Here is the script that I used to have the new version of Java recognized by the alternatives utility.

    JAVA_HOME=/usr/java/jre1.6.0_27

    # The following command added the new java installation as a java alternative.
    # The slave commands bring the related commands with it.
    update-alternatives \
    –install /usr/bin/java java $JAVA_HOME/bin/java 1 \
    –slave /usr/bin/javac javac $JAVA_HOME/bin/javac \
    –slave /usr/bin/javadoc javadoc $JAVA_HOME/bin/javadoc \
    –slave /usr/bin/jar jar $JAVA_HOME/bin/jar \
    –slave /usr/bin/keytool keytool $JAVA_HOME/bin/keytool \
    –slave /usr/local/java java_home $JAVA_HOME

    # A web site suggested that these steps would also be required, but they were not
    #ln -s /etc/alternatives/java /usr/bin/java
    #ln -s /etc/alternatives/javac /usr/bin/javac
    #ln -s /etc/alternatives/javadoc /usr/bin/javadoc
    #ln -s /etc/alternatives/jar /usr/bin/jar
    #ln -s /etc/alternatives/keytool /usr/bin/keytool
    #ln -s /etc/alternatives/java_home /usr/local/java

    It’s important to make sure that JAVA_HOME is set to point to the new installation directory.  The update-alternatives command links multiple Java utility programs together so that when you switch from one Java version to the next, the proper versions of the related tools come with it (note the slave option in the script above).  One web site I visited indicated that I would have to update symbolic links, but the links were made automatically when I tried this on Red Hat 5 and 6.

    Running the script above does not make the new version of Java the default.  It simply registers that version of Java as a known version of java.  Run the following command to change the default.

    update-alternatives –config java

    You should see the following after entering the above command.

    There are 3 programs which provide ‘java’.
    Selection    Command
    ———————————————–
    1           /usr/lib/jvm/jre-1.5.0-gcj/bin/java
    *+ 2           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
    3           /usr/java/jre1.6.0_27/bin/java
    Enter to keep the current selection[+], or type selection number:

    I entered 3, and pressed the enter key, and the newly installed version of Java became the default.  You can run the update-alternatives command again to change the version back.

    I assume that this works on other flavors of Linux as well, but I’ve never tried.  I have done this on both Red Hat Linux 5 and 6

    SOURCE:

    http://mikes-web-site.blogspot.com/2012/02/maintaining-multiple-java-versions-on.html

    22 listopada 2011

    Instalacja Java7 na Fedora 16 (64 bit)

    Zaszufladkowany do: Java,Linux,Programowanie — Tagi: , — Jacek @ 15:55

    http://www.if-not-true-then-false.com/2010/install-sun-oracle-java-jdk-jre-7-on-fedora-centos-red-hat-rhel/

    http://www.oracle.com/technetwork/java/javase/downloads/index.html

    ia32-libs is a Debian(/Ubuntu) package name, it brings the 32-bit
    version of the C standard library. The Fedora equivalent is glibc.i686.
    So here:
    # yum install glibc.i686

    sprawdzenie wersji:

    glibc (ldd –version)

    java (java -version)

    lokalizacja: /usr/java/latest

    18 listopada 2011

    Oracle SOA jdev extension.

    Zaszufladkowany do: Java,Oracle,Programowanie — Tagi: — Jacek @ 17:52

    Extensions for JDeveloper:

    http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/156082.xml

    3 marca 2011

    JAVA (K2,K3)

    Zaszufladkowany do: Java — Tagi: — Jacek @ 11:24

    .jws (aplikacja)
    Projekty zawarte są w aplikacji.

    ADF –  Application Developement Framework

    CTRL + SHIFT + ENTER – auto completion

    JSE – Java Standard Edition – standardowa technologia Javy. Sercem platformy JSE jest JVM (Java Virtual Machine), która wraz z Javą API (interfejs tworzenia aplikacji) służy do uruchomianaia aplikacji Java.
    Te dwa elementy stanowią JRE SE (Java Runtime Environment SE) – środowisko uruchomieniowe standardowej Javy.
    Zainstalowanie tego środowiska umożliwia uruchamianie aplikacji desktopowych lub apletów.

    JDK SE (Java Developement Kit SE) – środowisko do tworzenia aplikacji. (10,10)

    Strona startowa: www.jaceksen.pl