You are not logged in.

#1 2008-12-27 12:06:52

syms
Member
Registered: 2008-12-25
Posts: 296

[Solved] Java application dont starts

Hello,
no matter onejdk or jre, java program dont starts, i got this error:

[simas@myhost ~]$ java interfaceLanguage ./browser.jar
Exception in thread "main" java.lang.NoClassDefFoundError: interfaceLanguage
Caused by: java.lang.ClassNotFoundException: interfaceLanguage
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Could not find the main class: interfaceLanguage. Program will exit.

in ubuntu everythink was fine, i just installed java from synaptic and everythink worked, but in arch linux it dont works. i use 32 bit arch linux.

Last edited by syms (2008-12-27 13:20:42)

Offline

#2 2008-12-27 12:10:22

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,410
Website

Re: [Solved] Java application dont starts

Did you source /etc/profile or logout and login so the java environmental variables were set after the install?

Offline

#3 2008-12-27 12:14:35

syms
Member
Registered: 2008-12-25
Posts: 296

Re: [Solved] Java application dont starts

Allan wrote:

Did you source /etc/profile or logout and login so the java environmental variables were set after the install?

no i didnt source /etc/profile, but i had restarted system many times. ive installed java by typing

sudo pacman -S jre6

Heres my /etc/profile:

# 
# /etc/profile
#
# This file is intended to be used for ALL common
# Bourne-compatible shells. Shell specifics should be
# handled in /etc/profile.$SHELL where $SHELL is the name
# of the binary being run (discounting symlinks)
#
# Sections taken from SuSe's /etc/profile
# Note the explicit use of 'test' to cover all bases
#  and potentially incompatible shells

#Determine our shell without using $SHELL, which may lie
shell="sh"
if test -f /proc/mounts; then
   case $(/bin/ls -l /proc/$$/exe) in
        *bash) shell=bash ;;
        *dash) shell=dash ;;
        *ash)  shell=ash ;;
        *ksh)  shell=ksh ;;
        *zsh)  shell=zsh ;;
    esac
fi

# Load shell specific profile settings
test -f "/etc/profile.$shell" &&  . "/etc/profile.$shell"

#Set our umask
umask 022

# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH

# Some readline stuff that is fairly common
HISTSIZE=1000
HISTCONTROL="erasedups"

INPUTRC="/etc/inputrc"
LESS="-R"
LC_COLLATE="C"

export HISTSIZE HISTCONTROL INPUTRC LESS LC_COLLATE

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
    for profile in /etc/profile.d/*.sh; do
        test -x $profile && . $profile
    done
    unset profile
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH

Last edited by syms (2008-12-27 12:26:06)

Offline

#4 2008-12-27 13:19:29

syms
Member
Registered: 2008-12-25
Posts: 296

Re: [Solved] Java application dont starts

I fixed this, just needed to run app with this command:

java -jar ./browser.jar

oh man, i just needed to add that stupid command roll

Offline

Board footer

Powered by FluxBB