LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 07-22-2014, 06:08 PM   #1
odiliko
LQ Newbie
 
Registered: Aug 2006
Posts: 22

Rep: Reputation: 0
program error with jdk on opensuse 13.1


I wrote example program of java from book, saved it, compile the program using this example:
javac newone.java
the program was run with this example:
java newone
This was the message: Error: could not find or load
main class newone.java

Could you help me to point the mistake if any. Thanks
 
Old 07-22-2014, 08:43 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
try
Code:
cd /to/the/location/of/the/program
java -jar newone.jar
 
Old 07-23-2014, 08:42 PM   #3
odiliko
LQ Newbie
 
Registered: Aug 2006
Posts: 22

Original Poster
Rep: Reputation: 0
I wrote example program of java from book, saved it, compile the program using this example:
javac newone.java
the program was run with this example:
java newone
This was the message: Error: could not find or load
main class newone.java

I tried this suggested command:

java -jar newone.jar

this was the error message:

invalid or corrupt jarfile newone.java
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Installing Oracle JDK on Ububtu 12.04 and openSuse 12.2 LXer Syndicated Linux News 0 09-30-2012 02:00 PM
[SOLVED] What is the fedora program that automatically installs jdk and other things? szboardstretcher Linux - Software 2 07-29-2012 07:14 PM
Where to get JDK 1.5.0_08 and JDK 1.6.0_10 for Linux Redhat Itanium servers java_ascii Linux - Software 1 09-22-2009 11:17 AM
Permission error from compiled program, openSUSE 10.3 Go3rg3 Programming 10 04-05-2008 05:14 AM
Installing and Configuring JDK 1.6.0.5 on openSUSE 10.3 ieduarte73 Linux - General 1 04-03-2008 01:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 05:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration